]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mv643xx_eth: add mv643xx_eth_shutdown function
authorDale Farnsworth <dale@farnsworth.org>
Tue, 20 Mar 2007 23:38:04 +0000 (16:38 -0700)
committerJeff Garzik <jeff@garzik.org>
Fri, 23 Mar 2007 05:48:34 +0000 (01:48 -0400)
mv643xx_eth_shutdown is needed for kexec.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/mv643xx_eth.c

index 1ee27c360a4b845f0631824d9ea585729aa70bf4..c9f55bc57edb3339523e5b484d23343dbc2f70f0 100644 (file)
@@ -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,
        },