brcm47xx: add support for ipv6 in default network config
[openwrt/svn-archive/archive.git] / target / linux / kirkwood / patches-3.10 / 0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch
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
5 phy_detach
6
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
11 the network device.
12
13 Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
14 ---
15 drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
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)
23
24 unregister_netdev(mp->dev);
25 if (mp->phy != NULL)
26 - phy_detach(mp->phy);
27 + phy_disconnect(mp->phy);
28 cancel_work_sync(&mp->tx_timeout_task);
29
30 if (!IS_ERR(mp->clk))
31 --
32 1.8.4.rc1
33