summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/net2280.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-05-05 16:23:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:04:10 -0700
commit2d61bde7a0e630e1906e6478b6b2a7aeaaa8f8da (patch)
treeb52f1ed6ea51a5503ef859e2ae3d4eaa16ee4b05 /drivers/usb/gadget/net2280.c
parentb383539e04c413e040d998aedcc120c49aa670da (diff)
downloadop-kernel-dev-2d61bde7a0e630e1906e6478b6b2a7aeaaa8f8da.zip
op-kernel-dev-2d61bde7a0e630e1906e6478b6b2a7aeaaa8f8da.tar.gz
[PATCH] USB: net2280: add a shutdown routine
The net2280 board has an annoying habit of surviving soft reboots with interrupts enabled. This patch (as674) adds a shutdown routine to the driver so that the board can be put in a quiescent state. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/net2280.c')
-rw-r--r--drivers/usb/gadget/net2280.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 020d3c4..1facdea 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -2966,6 +2966,22 @@ done:
return retval;
}
+/* make sure the board is quiescent; otherwise it will continue
+ * generating IRQs across the upcoming reboot.
+ */
+
+static void net2280_shutdown (struct pci_dev *pdev)
+{
+ struct net2280 *dev = pci_get_drvdata (pdev);
+
+ /* disable IRQs */
+ writel (0, &dev->regs->pciirqenb0);
+ writel (0, &dev->regs->pciirqenb1);
+
+ /* disable the pullup so the host will think we're gone */
+ writel (0, &dev->usb->usbctl);
+}
+
/*-------------------------------------------------------------------------*/
@@ -2995,6 +3011,7 @@ static struct pci_driver net2280_pci_driver = {
.probe = net2280_probe,
.remove = net2280_remove,
+ .shutdown = net2280_shutdown,
/* FIXME add power management support */
};
OpenPOWER on IntegriCloud