lkml.org 
[lkml]   [2020]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices
Thu, May 28, 2020 at 05:12:40PM CEST, vadym.kochan@plvision.eu wrote:

[...]

>+static int prestera_port_create(struct prestera_switch *sw, u32 id)
>+{
>+ struct prestera_port *port;
>+ struct net_device *dev;
>+ int err;
>+
>+ dev = alloc_etherdev(sizeof(*port));
>+ if (!dev)
>+ return -ENOMEM;
>+
>+ port = netdev_priv(dev);
>+
>+ port->dev = dev;
>+ port->id = id;
>+ port->sw = sw;
>+
>+ err = prestera_hw_port_info_get(port, &port->fp_id,
>+ &port->hw_id, &port->dev_id);
>+ if (err) {
>+ dev_err(prestera_dev(sw), "Failed to get port(%u) info\n", id);
>+ goto err_port_init;
>+ }
>+
>+ dev->features |= NETIF_F_NETNS_LOCAL;
>+ dev->netdev_ops = &netdev_ops;
>+
>+ netif_carrier_off(dev);

No need.

\
 
 \ /
  Last update: 2020-06-03 16:30    [W:0.226 / U:16.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site