aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.h
diff options
context:
space:
mode:
authorAleksey Gorelov <dared1st@yahoo.com>2006-08-08 20:24:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:54 -0400
commit64a21d025d3a979a8715f2ec7acabca7b5406c8a (patch)
treee3cbcef560d848e177cddde6d093aa2411cddd53 /drivers/usb/core/hcd.h
parenta94da8971e836f32315f8832b0bf3e88bee9efae (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/core/hcd.h')
-rw-r--r--drivers/usb/core/hcd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 7022aafb2ae8..58c7767bc904 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -192,6 +192,9 @@ struct hc_driver {
192 /* cleanly make HCD stop writing memory and doing I/O */ 192 /* cleanly make HCD stop writing memory and doing I/O */
193 void (*stop) (struct usb_hcd *hcd); 193 void (*stop) (struct usb_hcd *hcd);
194 194
195 /* shutdown HCD */
196 void (*shutdown) (struct usb_hcd *hcd);
197
195 /* return current frame number */ 198 /* return current frame number */
196 int (*get_frame_number) (struct usb_hcd *hcd); 199 int (*get_frame_number) (struct usb_hcd *hcd);
197 200
@@ -227,6 +230,9 @@ extern int usb_add_hcd(struct usb_hcd *hcd,
227 unsigned int irqnum, unsigned long irqflags); 230 unsigned int irqnum, unsigned long irqflags);
228extern void usb_remove_hcd(struct usb_hcd *hcd); 231extern void usb_remove_hcd(struct usb_hcd *hcd);
229 232
233struct platform_device;
234extern void usb_hcd_platform_shutdown(struct platform_device* dev);
235
230#ifdef CONFIG_PCI 236#ifdef CONFIG_PCI
231struct pci_dev; 237struct pci_dev;
232struct pci_device_id; 238struct pci_device_id;
@@ -239,6 +245,8 @@ extern int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t state);
239extern int usb_hcd_pci_resume (struct pci_dev *dev); 245extern int usb_hcd_pci_resume (struct pci_dev *dev);
240#endif /* CONFIG_PM */ 246#endif /* CONFIG_PM */
241 247
248extern void usb_hcd_pci_shutdown (struct pci_dev *dev);
249
242#endif /* CONFIG_PCI */ 250#endif /* CONFIG_PCI */
243 251
244/* pci-ish (pdev null is ok) buffer alloc/mapping support */ 252/* pci-ish (pdev null is ok) buffer alloc/mapping support */