]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
amd-xgbe: Stop the PHY before releasing interrupts
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Tue, 28 Feb 2017 21:02:51 +0000 (15:02 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 22 Mar 2017 14:02:34 +0000 (08:02 -0600)
BugLink: http://bugs.launchpad.net/bugs/1675032
[ Upstream commit 402168b4c2dc0734b8fbd282eff77da0275c5129 ]

Some configurations require the use of the hardware's MDIO support to
communicate with external PHYs. The MDIO commands indicate completion
through the device interrupt. When bringing down the device the interrupts
were released before stopping the external PHY, resulting in MDIO command
timeouts. Move the stopping of the PHY to before the releasing of the
interrupts.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c

index 1c87cc20407590fc84710c9ecb4f8047cf811797..0f4bbe1fd5dc8afb96c61c38cb6b0d90d63611fd 100644 (file)
@@ -1131,12 +1131,12 @@ static void xgbe_stop(struct xgbe_prv_data *pdata)
        hw_if->disable_tx(pdata);
        hw_if->disable_rx(pdata);
 
+       phy_if->phy_stop(pdata);
+
        xgbe_free_irqs(pdata);
 
        xgbe_napi_disable(pdata, 1);
 
-       phy_if->phy_stop(pdata);
-
        hw_if->exit(pdata);
 
        channel = pdata->channel;