]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Be sure driver shuts down cleanly on module removal
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Fri, 18 Aug 2017 14:02:40 +0000 (09:02 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 23:30:16 +0000 (16:30 -0700)
commitaed71dbace4294db027b1c255af7c5a77611db4a
treeaa7791b31dc168f27919b6cd4a5729ff4d4fb3b0
parent1991b2fb224639f8c14c047d60aebbf4b00eb19a
amd-xgbe: Be sure driver shuts down cleanly on module removal

Sometimes when the driver is being unloaded while the devices are still
up the driver can issue errors.  This is based on timing and the double
invocation of some routines.  The phy_exit() call needs to be run after
the network device has been closed and unregistered from the system.
Also, the phy_exit() does not need to invoke phy_stop() since that will
be called as part of the device closing, so remove that call.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-main.c
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c