[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPv3WKcKK8fS-6koSgV7ABi8bvkRgzaqJDpOETCpGoTc2sWV=w@mail.gmail.com>
Date: Tue, 12 Jan 2016 23:40:40 +0100
From: Marcin Wojtas <mw@...ihalf.com>
To: Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc: "David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Florian Fainelli <f.fainelli@...il.com>,
Jason Cooper <jason@...edaemon.net>,
Andrew Lunn <andrew@...n.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Lior Amsalem <alior@...vell.com>,
Nadav Haklai <nadavh@...vell.com>,
Simon Guinot <simon.guinot@...uanux.org>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Boris BREZILLON <boris.brezillon@...e-electrons.com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Willy Tarreau <w@....eu>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH net-next 10/10] net: mvneta: Use the new hwbm framework
Hi Gregory,
A quick remark below. All changes look fine to me at a first look, but
I will test and dig more into code soon.
>
> @@ -3946,11 +3965,6 @@ static int mvneta_probe(struct platform_device *pdev)
> dev->priv_flags |= IFF_UNICAST_FLT;
> dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
>
> - err = register_netdev(dev);
> - if (err < 0) {
> - dev_err(&pdev->dev, "failed to register\n");
> - goto err_free_stats;
> - }
The purpose of shifting register_netdev() was to be able to obtain
pp->id from net_device, before mvneta_bm_port_init is called. It is
needed for proper port - pool mapping control.
>
> pp->id = dev->ifindex;
>
> @@ -3965,6 +3979,12 @@ static int mvneta_probe(struct platform_device *pdev)
> }
> }
>
> + err = register_netdev(dev);
> + if (err < 0) {
> + dev_err(&pdev->dev, "failed to register\n");
> + goto err_free_stats;
> + }
> +
> err = mvneta_init(&pdev->dev, pp);
> if (err < 0)
> goto err_netdev;
Best regards,
Marcin
Powered by blists - more mailing lists