diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-05-05 16:23:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:10 -0400 |
commit | 2d61bde7a0e630e1906e6478b6b2a7aeaaa8f8da (patch) | |
tree | b52f1ed6ea51a5503ef859e2ae3d4eaa16ee4b05 | |
parent | b383539e04c413e040d998aedcc120c49aa670da (diff) |
[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>
-rw-r--r-- | drivers/usb/gadget/net2280.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 020d3c42b1af..1facdea56a8a 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -2966,6 +2966,22 @@ done: | |||
2966 | return retval; | 2966 | return retval; |
2967 | } | 2967 | } |
2968 | 2968 | ||
2969 | /* make sure the board is quiescent; otherwise it will continue | ||
2970 | * generating IRQs across the upcoming reboot. | ||
2971 | */ | ||
2972 | |||
2973 | static 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 | |||
2969 | 2985 | ||
2970 | /*-------------------------------------------------------------------------*/ | 2986 | /*-------------------------------------------------------------------------*/ |
2971 | 2987 | ||
@@ -2995,6 +3011,7 @@ static struct pci_driver net2280_pci_driver = { | |||
2995 | 3011 | ||
2996 | .probe = net2280_probe, | 3012 | .probe = net2280_probe, |
2997 | .remove = net2280_remove, | 3013 | .remove = net2280_remove, |
3014 | .shutdown = net2280_shutdown, | ||
2998 | 3015 | ||
2999 | /* FIXME add power management support */ | 3016 | /* FIXME add power management support */ |
3000 | }; | 3017 | }; |