diff options
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index b268537e389e..874418552789 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -73,13 +73,14 @@ ohci_pci_start (struct usb_hcd *hcd) | |||
73 | else if (pdev->vendor == PCI_VENDOR_ID_NS) { | 73 | else if (pdev->vendor == PCI_VENDOR_ID_NS) { |
74 | struct pci_dev *b; | 74 | struct pci_dev *b; |
75 | 75 | ||
76 | b = pci_find_slot (pdev->bus->number, | 76 | b = pci_get_slot (pdev->bus, |
77 | PCI_DEVFN (PCI_SLOT (pdev->devfn), 1)); | 77 | PCI_DEVFN (PCI_SLOT (pdev->devfn), 1)); |
78 | if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO | 78 | if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO |
79 | && b->vendor == PCI_VENDOR_ID_NS) { | 79 | && b->vendor == PCI_VENDOR_ID_NS) { |
80 | ohci->flags |= OHCI_QUIRK_SUPERIO; | 80 | ohci->flags |= OHCI_QUIRK_SUPERIO; |
81 | ohci_dbg (ohci, "Using NSC SuperIO setup\n"); | 81 | ohci_dbg (ohci, "Using NSC SuperIO setup\n"); |
82 | } | 82 | } |
83 | pci_dev_put(b); | ||
83 | } | 84 | } |
84 | 85 | ||
85 | /* Check for Compaq's ZFMicro chipset, which needs short | 86 | /* Check for Compaq's ZFMicro chipset, which needs short |
@@ -135,6 +136,11 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | |||
135 | } | 136 | } |
136 | ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); | 137 | ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); |
137 | (void)ohci_readl(ohci, &ohci->regs->intrdisable); | 138 | (void)ohci_readl(ohci, &ohci->regs->intrdisable); |
139 | |||
140 | /* make sure snapshot being resumed re-enumerates everything */ | ||
141 | if (message.event == PM_EVENT_PRETHAW) | ||
142 | ohci_usb_reset(ohci); | ||
143 | |||
138 | clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); | 144 | clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
139 | bail: | 145 | bail: |
140 | spin_unlock_irqrestore (&ohci->lock, flags); | 146 | spin_unlock_irqrestore (&ohci->lock, flags); |
@@ -171,11 +177,14 @@ static const struct hc_driver ohci_pci_hc_driver = { | |||
171 | */ | 177 | */ |
172 | .reset = ohci_pci_reset, | 178 | .reset = ohci_pci_reset, |
173 | .start = ohci_pci_start, | 179 | .start = ohci_pci_start, |
180 | .stop = ohci_stop, | ||
181 | .shutdown = ohci_shutdown, | ||
182 | |||
174 | #ifdef CONFIG_PM | 183 | #ifdef CONFIG_PM |
184 | /* these suspend/resume entries are for upstream PCI glue ONLY */ | ||
175 | .suspend = ohci_pci_suspend, | 185 | .suspend = ohci_pci_suspend, |
176 | .resume = ohci_pci_resume, | 186 | .resume = ohci_pci_resume, |
177 | #endif | 187 | #endif |
178 | .stop = ohci_stop, | ||
179 | 188 | ||
180 | /* | 189 | /* |
181 | * managing i/o requests and associated device resources | 190 | * managing i/o requests and associated device resources |
@@ -194,6 +203,7 @@ static const struct hc_driver ohci_pci_hc_driver = { | |||
194 | */ | 203 | */ |
195 | .hub_status_data = ohci_hub_status_data, | 204 | .hub_status_data = ohci_hub_status_data, |
196 | .hub_control = ohci_hub_control, | 205 | .hub_control = ohci_hub_control, |
206 | .hub_irq_enable = ohci_rhsc_enable, | ||
197 | #ifdef CONFIG_PM | 207 | #ifdef CONFIG_PM |
198 | .bus_suspend = ohci_bus_suspend, | 208 | .bus_suspend = ohci_bus_suspend, |
199 | .bus_resume = ohci_bus_resume, | 209 | .bus_resume = ohci_bus_resume, |
@@ -224,6 +234,8 @@ static struct pci_driver ohci_pci_driver = { | |||
224 | .suspend = usb_hcd_pci_suspend, | 234 | .suspend = usb_hcd_pci_suspend, |
225 | .resume = usb_hcd_pci_resume, | 235 | .resume = usb_hcd_pci_resume, |
226 | #endif | 236 | #endif |
237 | |||
238 | .shutdown = usb_hcd_pci_shutdown, | ||
227 | }; | 239 | }; |
228 | 240 | ||
229 | 241 | ||