]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
net: smsc911x: Fix register_netdev, phy startup, driver unload ordering
authorJeremy Linton <jeremy.linton@arm.com>
Thu, 1 Sep 2016 20:15:07 +0000 (15:15 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Sep 2016 00:28:33 +0000 (17:28 -0700)
commitaea95dd52db436f406f3f45a455a710774a3a210
treef7cc61210275c3f639957fb6c29b4c2a16583b77
parent1358bd5a7477b346dfb6b502051d61f29b11a200
net: smsc911x: Fix register_netdev, phy startup, driver unload ordering

Move phy startup/shutdown into the smsc911x_open/stop routines. This
allows the module to be unloaded because phy_connect_direct is no longer
always holding the module use count. This one change also resolves a
number of other problems.

The link status of a downed interface no longer reflects a stale state.
Errors caused by the net device being opened before the mdio/phy was
configured. There is also a potential power savings as the phy's don't
remain powered when the interface isn't running.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c