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
Wed, Jun 03, 2020 at 04:29:44PM CEST, jiri@resnulli.us wrote:
>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.

Actually, it is. Sorry :)

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