[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <985f76c2-ed63-add2-bc24-fd4a6c3f8153@cogentembedded.com>
Date: Thu, 16 Jun 2016 19:14:06 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Jeremy Linton <jeremy.linton@....com>, netdev@...r.kernel.org
Cc: steve.glendinning@...well.net, andrew@...n.ch
Subject: Re: [PATCH 2/2] net: smsc911x: Fix register_netdev, phy startup
ordering and driver unload
Hello.
On 06/16/2016 06:54 PM, Jeremy Linton wrote:
> Previously the mdio and phy's were started in the drv probe following
> register_netdev(). This could lead to a situation where if the netdev was
> opened before the mdio/phys were configured, it would fail with a
> EAGAIN.
>
> Also, the use of phy_connect_direct() in the drv_probe
> routine results in a situation where the module use count would never
> decrease sufficiently to unload the driver.
It's a bad idea to fix 2 issues with one patch (unless they are caused by
the same reason). "Do one thing per patch" is a rule of thumb here...
> With this patch the mdio bus is allocated/configured before
> register_netdev(), and the phy's are brought online/started in the
> ndo_open and stopped in the ndo_stop. Because of this, the behavior
> of ethtool changes a little if the interface is stopped. Before the
> phy's would remain up, and their last state would be displayed with
> ethtool. Now ethtool reports link has been severed/Link detected: no
> when the net dev is stopped.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@....com>[...]
[...]
MBR, Sergei
Powered by blists - more mailing lists