diff options
author | Aleksey Gorelov <dared1st@yahoo.com> | 2006-08-08 20:24:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 14:58:54 -0400 |
commit | 64a21d025d3a979a8715f2ec7acabca7b5406c8a (patch) | |
tree | e3cbcef560d848e177cddde6d093aa2411cddd53 /drivers/usb/host/ohci-ep93xx.c | |
parent | a94da8971e836f32315f8832b0bf3e88bee9efae (diff) |
USB: Properly unregister reboot notifier in case of failure in ehci hcd
If some problem occurs during ehci startup, for instance, request_irq fails,
echi hcd driver tries it best to cleanup, but fails to unregister reboot
notifier, which in turn leads to crash on reboot/poweroff.
The following patch resolves this problem by not using reboot notifiers
anymore, but instead making ehci/ohci driver get its own shutdown method. For
PCI, it is done through pci glue, for everything else through platform driver
glue.
One downside: sa1111 does not use platform driver stuff, and does not have its
own shutdown hook, so no 'shutdown' is called for it now. I'm not sure if it
is really necessary on that platform, though.
Signed-off-by: Aleks Gorelov <dared1st@yahoo.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-ep93xx.c')
-rw-r--r-- | drivers/usb/host/ohci-ep93xx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index 1a1d320b7995..1bf5e7a4e735 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c | |||
@@ -128,6 +128,7 @@ static struct hc_driver ohci_ep93xx_hc_driver = { | |||
128 | .flags = HCD_USB11 | HCD_MEMORY, | 128 | .flags = HCD_USB11 | HCD_MEMORY, |
129 | .start = ohci_ep93xx_start, | 129 | .start = ohci_ep93xx_start, |
130 | .stop = ohci_stop, | 130 | .stop = ohci_stop, |
131 | .shutdown = ohci_shutdown, | ||
131 | .urb_enqueue = ohci_urb_enqueue, | 132 | .urb_enqueue = ohci_urb_enqueue, |
132 | .urb_dequeue = ohci_urb_dequeue, | 133 | .urb_dequeue = ohci_urb_dequeue, |
133 | .endpoint_disable = ohci_endpoint_disable, | 134 | .endpoint_disable = ohci_endpoint_disable, |
@@ -203,6 +204,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) | |||
203 | static struct platform_driver ohci_hcd_ep93xx_driver = { | 204 | static struct platform_driver ohci_hcd_ep93xx_driver = { |
204 | .probe = ohci_hcd_ep93xx_drv_probe, | 205 | .probe = ohci_hcd_ep93xx_drv_probe, |
205 | .remove = ohci_hcd_ep93xx_drv_remove, | 206 | .remove = ohci_hcd_ep93xx_drv_remove, |
207 | .shutdown = usb_hcd_platform_shutdown, | ||
206 | #ifdef CONFIG_PM | 208 | #ifdef CONFIG_PM |
207 | .suspend = ohci_hcd_ep93xx_drv_suspend, | 209 | .suspend = ohci_hcd_ep93xx_drv_suspend, |
208 | .resume = ohci_hcd_ep93xx_drv_resume, | 210 | .resume = ohci_hcd_ep93xx_drv_resume, |