summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2007-03-20 16:38:04 -0700
committerJeff Garzik <jeff@garzik.org>2007-03-23 01:48:34 -0400
commitd57ab6fdde30816581f7b0a4fe3c015b3f41f9ca (patch)
treec45873c003649b014d36ccb9933ebb6fa23280a3 /drivers
parent69a43ac0cf40577157111bbe25500e2b98e801ea (diff)
downloadop-kernel-dev-d57ab6fdde30816581f7b0a4fe3c015b3f41f9ca.zip
op-kernel-dev-d57ab6fdde30816581f7b0a4fe3c015b3f41f9ca.tar.gz
mv643xx_eth: add mv643xx_eth_shutdown function
mv643xx_eth_shutdown is needed for kexec. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mv643xx_eth.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 1ee27c3..c9f55bc 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1516,9 +1516,23 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
return 0;
}
+static void mv643xx_eth_shutdown(struct platform_device *pdev)
+{
+ struct net_device *dev = platform_get_drvdata(pdev);
+ struct mv643xx_private *mp = netdev_priv(dev);
+ unsigned int port_num = mp->port_num;
+
+ /* Mask all interrupts on ethernet port */
+ mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), 0);
+ mv_read (MV643XX_ETH_INTERRUPT_MASK_REG(port_num));
+
+ eth_port_reset(port_num);
+}
+
static struct platform_driver mv643xx_eth_driver = {
.probe = mv643xx_eth_probe,
.remove = mv643xx_eth_remove,
+ .shutdown = mv643xx_eth_shutdown,
.driver = {
.name = MV643XX_ETH_NAME,
},
OpenPOWER on IntegriCloud