diff options
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 1ee27c360a4b..8015a7c5b0c9 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -1379,7 +1379,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
1379 | 1379 | ||
1380 | spin_lock_init(&mp->lock); | 1380 | spin_lock_init(&mp->lock); |
1381 | 1381 | ||
1382 | port_num = pd->port_number; | 1382 | port_num = mp->port_num = pd->port_number; |
1383 | 1383 | ||
1384 | /* set default config values */ | 1384 | /* set default config values */ |
1385 | eth_port_uc_addr_get(dev, dev->dev_addr); | 1385 | eth_port_uc_addr_get(dev, dev->dev_addr); |
@@ -1411,8 +1411,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
1411 | duplex = pd->duplex; | 1411 | duplex = pd->duplex; |
1412 | speed = pd->speed; | 1412 | speed = pd->speed; |
1413 | 1413 | ||
1414 | mp->port_num = port_num; | ||
1415 | |||
1416 | /* Hook up MII support for ethtool */ | 1414 | /* Hook up MII support for ethtool */ |
1417 | mp->mii.dev = dev; | 1415 | mp->mii.dev = dev; |
1418 | mp->mii.mdio_read = mv643xx_mdio_read; | 1416 | mp->mii.mdio_read = mv643xx_mdio_read; |
@@ -1516,9 +1514,23 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev) | |||
1516 | return 0; | 1514 | return 0; |
1517 | } | 1515 | } |
1518 | 1516 | ||
1517 | static void mv643xx_eth_shutdown(struct platform_device *pdev) | ||
1518 | { | ||
1519 | struct net_device *dev = platform_get_drvdata(pdev); | ||
1520 | struct mv643xx_private *mp = netdev_priv(dev); | ||
1521 | unsigned int port_num = mp->port_num; | ||
1522 | |||
1523 | /* Mask all interrupts on ethernet port */ | ||
1524 | mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), 0); | ||
1525 | mv_read (MV643XX_ETH_INTERRUPT_MASK_REG(port_num)); | ||
1526 | |||
1527 | eth_port_reset(port_num); | ||
1528 | } | ||
1529 | |||
1519 | static struct platform_driver mv643xx_eth_driver = { | 1530 | static struct platform_driver mv643xx_eth_driver = { |
1520 | .probe = mv643xx_eth_probe, | 1531 | .probe = mv643xx_eth_probe, |
1521 | .remove = mv643xx_eth_remove, | 1532 | .remove = mv643xx_eth_remove, |
1533 | .shutdown = mv643xx_eth_shutdown, | ||
1522 | .driver = { | 1534 | .driver = { |
1523 | .name = MV643XX_ETH_NAME, | 1535 | .name = MV643XX_ETH_NAME, |
1524 | }, | 1536 | }, |