aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-04-28 14:51:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 17:43:45 -0400
commit02597d2deec2a3de0e2b52c1f83904b65626a0d5 (patch)
treec8953478e54c84b2931c1faf70b3a60a2196216e /drivers/usb
parentc074b416b94c0aa4a371f24bf6cc13d8cf1fab59 (diff)
[PATCH] USB UHCI: Add shutdown method
After all the discussion you might not be interested in this still, but nevertheless here it is. This patch adds a shutdown method to the uhci-hcd driver. Its prerequisite is the patch you wrote adding shutdown support for PCI. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/uhci-hcd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index cec070fa8c83..53ba8a56592e 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -154,6 +154,7 @@ static void reset_hc(struct uhci_hcd *uhci)
154 154
155/* 155/*
156 * Last rites for a defunct/nonfunctional controller 156 * Last rites for a defunct/nonfunctional controller
157 * or one we don't want to use any more.
157 */ 158 */
158static void hc_died(struct uhci_hcd *uhci) 159static void hc_died(struct uhci_hcd *uhci)
159{ 160{
@@ -525,6 +526,20 @@ static int uhci_reset(struct usb_hcd *hcd)
525 return 0; 526 return 0;
526} 527}
527 528
529/* Make sure the controller is quiescent and that we're not using it
530 * any more. This is mainly for the benefit of programs which, like kexec,
531 * expect the hardware to be idle: not doing DMA or generating IRQs.
532 *
533 * This routine may be called in a damaged or failing kernel. Hence we
534 * do not acquire the spinlock before shutting down the controller.
535 */
536static void uhci_shutdown(struct pci_dev *pdev)
537{
538 struct usb_hcd *hcd = (struct usb_hcd *) pci_get_drvdata(pdev);
539
540 hc_died(hcd_to_uhci(hcd));
541}
542
528/* 543/*
529 * Allocate a frame list, and then setup the skeleton 544 * Allocate a frame list, and then setup the skeleton
530 * 545 *
@@ -939,6 +954,7 @@ static struct pci_driver uhci_pci_driver = {
939 954
940 .probe = usb_hcd_pci_probe, 955 .probe = usb_hcd_pci_probe,
941 .remove = usb_hcd_pci_remove, 956 .remove = usb_hcd_pci_remove,
957 .shutdown = uhci_shutdown,
942 958
943#ifdef CONFIG_PM 959#ifdef CONFIG_PM
944 .suspend = usb_hcd_pci_suspend, 960 .suspend = usb_hcd_pci_suspend,