26 static void uhci_pci_reset_hc(
struct uhci_hcd *uhci)
37 static int uhci_pci_check_and_reset_hc(
struct uhci_hcd *uhci)
47 static void uhci_pci_configure_hc(
struct uhci_hcd *uhci)
59 static int uhci_pci_resume_detect_interrupts_are_broken(
struct uhci_hcd *uhci)
91 static int uhci_pci_global_suspend_mode_is_broken(
struct uhci_hcd *uhci)
95 static const char bad_Asus_board[] =
"A7V8X";
102 if (sys_info && !
strcmp(sys_info, bad_Asus_board)) {
113 static int uhci_pci_init(
struct usb_hcd *hcd)
115 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
137 uhci_pci_resume_detect_interrupts_are_broken;
139 uhci_pci_global_suspend_mode_is_broken;
156 static void uhci_shutdown(
struct pci_dev *pdev)
158 struct usb_hcd *hcd = pci_get_drvdata(pdev);
160 uhci_hc_died(hcd_to_uhci(hcd));
165 static int uhci_pci_suspend(
struct usb_hcd *hcd,
bool do_wakeup)
167 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
173 spin_lock_irq(&uhci->
lock);
174 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->
dead)
186 pci_write_config_word(pdev,
USBLEGSUP, 0);
187 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
197 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
199 spin_unlock_irq(&uhci->
lock);
203 static int uhci_pci_resume(
struct usb_hcd *hcd,
bool hibernated)
205 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
212 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
214 spin_lock_irq(&uhci->
lock);
232 usb_root_hub_lost_power(hcd->self.root_hub);
234 spin_unlock_irq(&uhci->
lock);
239 if (!uhci->
RD_enable && hcd->self.root_hub->do_remote_wakeup)
240 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
249 static const struct hc_driver uhci_driver = {
250 .description = hcd_name,
251 .product_desc =
"UHCI Host Controller",
252 .hcd_priv_size =
sizeof(
struct uhci_hcd),
259 .reset = uhci_pci_init,
262 .pci_suspend = uhci_pci_suspend,
263 .pci_resume = uhci_pci_resume,
264 .bus_suspend = uhci_rh_suspend,
265 .bus_resume = uhci_rh_resume,
269 .urb_enqueue = uhci_urb_enqueue,
270 .urb_dequeue = uhci_urb_dequeue,
272 .endpoint_disable = uhci_hcd_endpoint_disable,
273 .get_frame_number = uhci_hcd_get_frame_number,
275 .hub_status_data = uhci_hub_status_data,
276 .hub_control = uhci_hub_control,
282 .driver_data = (
unsigned long) &uhci_driver,
289 .name = (
char *)hcd_name,
296 #ifdef CONFIG_PM_SLEEP
298 .pm = &usb_hcd_pci_pm_ops