diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 03:36:51 -0400 |
commit | 6396fc3b3ff3f6b942992b653a62df11dcef9bea (patch) | |
tree | db3c7cbe833b43c653adc99f70941431c5ff7c4e /drivers/usb/host/ehci-pci.c | |
parent | 4785879e4d340e24e54f6de2ccfc42728b912808 (diff) | |
parent | 3d30701b58970425e1d45994d6cb82f828924fdd (diff) |
Merge branch 'master' into for-next
Conflicts:
fs/exofs/inode.c
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index d43d176161aa..58b72d741d93 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -114,6 +114,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
114 | break; | 114 | break; |
115 | case PCI_VENDOR_ID_INTEL: | 115 | case PCI_VENDOR_ID_INTEL: |
116 | ehci->need_io_watchdog = 0; | 116 | ehci->need_io_watchdog = 0; |
117 | ehci->fs_i_thresh = 1; | ||
117 | if (pdev->device == 0x27cc) { | 118 | if (pdev->device == 0x27cc) { |
118 | ehci->broken_periodic = 1; | 119 | ehci->broken_periodic = 1; |
119 | ehci_info(ehci, "using broken periodic workaround\n"); | 120 | ehci_info(ehci, "using broken periodic workaround\n"); |
@@ -277,7 +278,7 @@ done: | |||
277 | * Also they depend on separate root hub suspend/resume. | 278 | * Also they depend on separate root hub suspend/resume. |
278 | */ | 279 | */ |
279 | 280 | ||
280 | static int ehci_pci_suspend(struct usb_hcd *hcd) | 281 | static int ehci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) |
281 | { | 282 | { |
282 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 283 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
283 | unsigned long flags; | 284 | unsigned long flags; |
@@ -291,7 +292,7 @@ static int ehci_pci_suspend(struct usb_hcd *hcd) | |||
291 | * the root hub is either suspended or stopped. | 292 | * the root hub is either suspended or stopped. |
292 | */ | 293 | */ |
293 | spin_lock_irqsave (&ehci->lock, flags); | 294 | spin_lock_irqsave (&ehci->lock, flags); |
294 | ehci_prepare_ports_for_controller_suspend(ehci); | 295 | ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup); |
295 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); | 296 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
296 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); | 297 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); |
297 | 298 | ||
@@ -361,6 +362,22 @@ static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated) | |||
361 | } | 362 | } |
362 | #endif | 363 | #endif |
363 | 364 | ||
365 | static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev) | ||
366 | { | ||
367 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
368 | int rc = 0; | ||
369 | |||
370 | if (!udev->parent) /* udev is root hub itself, impossible */ | ||
371 | rc = -1; | ||
372 | /* we only support lpm device connected to root hub yet */ | ||
373 | if (ehci->has_lpm && !udev->parent->parent) { | ||
374 | rc = ehci_lpm_set_da(ehci, udev->devnum, udev->portnum); | ||
375 | if (!rc) | ||
376 | rc = ehci_lpm_check(ehci, udev->portnum); | ||
377 | } | ||
378 | return rc; | ||
379 | } | ||
380 | |||
364 | static const struct hc_driver ehci_pci_hc_driver = { | 381 | static const struct hc_driver ehci_pci_hc_driver = { |
365 | .description = hcd_name, | 382 | .description = hcd_name, |
366 | .product_desc = "EHCI Host Controller", | 383 | .product_desc = "EHCI Host Controller", |
@@ -407,6 +424,11 @@ static const struct hc_driver ehci_pci_hc_driver = { | |||
407 | .relinquish_port = ehci_relinquish_port, | 424 | .relinquish_port = ehci_relinquish_port, |
408 | .port_handed_over = ehci_port_handed_over, | 425 | .port_handed_over = ehci_port_handed_over, |
409 | 426 | ||
427 | /* | ||
428 | * call back when device connected and addressed | ||
429 | */ | ||
430 | .update_device = ehci_update_device, | ||
431 | |||
410 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, | 432 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, |
411 | }; | 433 | }; |
412 | 434 | ||