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/ehci-au1xxx.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/ehci-au1xxx.c')
-rw-r--r-- | drivers/usb/host/ehci-au1xxx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 26ed757d22a6..5d1b12aad776 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -200,6 +200,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { | |||
200 | .reset = ehci_init, | 200 | .reset = ehci_init, |
201 | .start = ehci_run, | 201 | .start = ehci_run, |
202 | .stop = ehci_stop, | 202 | .stop = ehci_stop, |
203 | .shutdown = ehci_shutdown, | ||
203 | 204 | ||
204 | /* | 205 | /* |
205 | * managing i/o requests and associated device resources | 206 | * managing i/o requests and associated device resources |
@@ -268,6 +269,7 @@ MODULE_ALIAS("au1xxx-ehci"); | |||
268 | static struct platform_driver ehci_hcd_au1xxx_driver = { | 269 | static struct platform_driver ehci_hcd_au1xxx_driver = { |
269 | .probe = ehci_hcd_au1xxx_drv_probe, | 270 | .probe = ehci_hcd_au1xxx_drv_probe, |
270 | .remove = ehci_hcd_au1xxx_drv_remove, | 271 | .remove = ehci_hcd_au1xxx_drv_remove, |
272 | .shutdown = usb_hcd_platform_shutdown, | ||
271 | /*.suspend = ehci_hcd_au1xxx_drv_suspend, */ | 273 | /*.suspend = ehci_hcd_au1xxx_drv_suspend, */ |
272 | /*.resume = ehci_hcd_au1xxx_drv_resume, */ | 274 | /*.resume = ehci_hcd_au1xxx_drv_resume, */ |
273 | .driver = { | 275 | .driver = { |