1 From 40a635881d8fedff7242598cd3bf892e4733f7dc Mon Sep 17 00:00:00 2001
2 From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
3 Date: Wed, 29 May 2013 21:32:43 +0200
4 Subject: [PATCH 18/29] net: mv643xx_eth: use phy_disconnect instead of
7 Using a separated mdio bus driver with mvmdio, phy_detach on network device
8 removal will not stop the phy and finally lead to NULL pointer dereference
9 in mvmdio due to non-existent network device. Use phy_disconnect instead
10 to properly stop phy device from accessing network device prior removal of
13 Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
15 drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
19 index d1cbfb1..748dcd3 100644
20 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c
21 +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
22 @@ -2805,7 +2805,7 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
24 unregister_netdev(mp->dev);
26 - phy_detach(mp->phy);
27 + phy_disconnect(mp->phy);
28 cancel_work_sync(&mp->tx_timeout_task);