aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/net2280.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/net2280.c')
-rw-r--r--drivers/usb/gadget/net2280.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 0b9293493957..1facdea56a8a 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -2822,7 +2822,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2822 unsigned long resource, len; 2822 unsigned long resource, len;
2823 void __iomem *base = NULL; 2823 void __iomem *base = NULL;
2824 int retval, i; 2824 int retval, i;
2825 char buf [8], *bufp;
2826 2825
2827 /* if you want to support more than one controller in a system, 2826 /* if you want to support more than one controller in a system,
2828 * usb_gadget_driver_{register,unregister}() must change. 2827 * usb_gadget_driver_{register,unregister}() must change.
@@ -2896,15 +2895,10 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2896 retval = -ENODEV; 2895 retval = -ENODEV;
2897 goto done; 2896 goto done;
2898 } 2897 }
2899#ifndef __sparc__ 2898
2900 scnprintf (buf, sizeof buf, "%d", pdev->irq);
2901 bufp = buf;
2902#else
2903 bufp = __irq_itoa(pdev->irq);
2904#endif
2905 if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev) 2899 if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev)
2906 != 0) { 2900 != 0) {
2907 ERROR (dev, "request interrupt %s failed\n", bufp); 2901 ERROR (dev, "request interrupt %d failed\n", pdev->irq);
2908 retval = -EBUSY; 2902 retval = -EBUSY;
2909 goto done; 2903 goto done;
2910 } 2904 }
@@ -2953,8 +2947,8 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2953 2947
2954 /* done */ 2948 /* done */
2955 INFO (dev, "%s\n", driver_desc); 2949 INFO (dev, "%s\n", driver_desc);
2956 INFO (dev, "irq %s, pci mem %p, chip rev %04x\n", 2950 INFO (dev, "irq %d, pci mem %p, chip rev %04x\n",
2957 bufp, base, dev->chiprev); 2951 pdev->irq, base, dev->chiprev);
2958 INFO (dev, "version: " DRIVER_VERSION "; dma %s\n", 2952 INFO (dev, "version: " DRIVER_VERSION "; dma %s\n",
2959 use_dma 2953 use_dma
2960 ? (use_dma_chaining ? "chaining" : "enabled") 2954 ? (use_dma_chaining ? "chaining" : "enabled")
@@ -2972,6 +2966,22 @@ done:
2972 return retval; 2966 return retval;
2973} 2967}
2974 2968
2969/* make sure the board is quiescent; otherwise it will continue
2970 * generating IRQs across the upcoming reboot.
2971 */
2972
2973static void net2280_shutdown (struct pci_dev *pdev)
2974{
2975 struct net2280 *dev = pci_get_drvdata (pdev);
2976
2977 /* disable IRQs */
2978 writel (0, &dev->regs->pciirqenb0);
2979 writel (0, &dev->regs->pciirqenb1);
2980
2981 /* disable the pullup so the host will think we're gone */
2982 writel (0, &dev->usb->usbctl);
2983}
2984
2975 2985
2976/*-------------------------------------------------------------------------*/ 2986/*-------------------------------------------------------------------------*/
2977 2987
@@ -3001,6 +3011,7 @@ static struct pci_driver net2280_pci_driver = {
3001 3011
3002 .probe = net2280_probe, 3012 .probe = net2280_probe,
3003 .remove = net2280_remove, 3013 .remove = net2280_remove,
3014 .shutdown = net2280_shutdown,
3004 3015
3005 /* FIXME add power management support */ 3016 /* FIXME add power management support */
3006}; 3017};