Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

From: Jiri Pirko
Date: Wed Jun 03 2020 - 10:30:01 EST


Thu, May 28, 2020 at 05:12:40PM CEST, vadym.kochan@xxxxxxxxxxx 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.