]> err.no Git - linux-2.6/blobdiff - drivers/usb/gadget/net2280.c
Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / usb / gadget / net2280.c
index 020d3c42b1af047297113b5c1950a3908f1d4202..09243239d948cf4c034515c89838b41b769b7817 100644 (file)
@@ -46,7 +46,6 @@
 #undef DEBUG           /* messages on error and most fault paths */
 #undef VERBOSE         /* extra debug messages (success too) */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
@@ -2896,7 +2895,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
                goto done;
        }
 
-       if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev)
+       if (request_irq (pdev->irq, net2280_irq, IRQF_SHARED, driver_name, dev)
                        != 0) {
                ERROR (dev, "request interrupt %d failed\n", pdev->irq);
                retval = -EBUSY;
@@ -2966,6 +2965,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 +3010,7 @@ static struct pci_driver net2280_pci_driver = {
 
        .probe =        net2280_probe,
        .remove =       net2280_remove,
+       .shutdown =     net2280_shutdown,
 
        /* FIXME add power management support */
 };