aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index d43d176161aa..a307d550bdaf 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -361,6 +361,22 @@ static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated)
361} 361}
362#endif 362#endif
363 363
364static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
365{
366 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
367 int rc = 0;
368
369 if (!udev->parent) /* udev is root hub itself, impossible */
370 rc = -1;
371 /* we only support lpm device connected to root hub yet */
372 if (ehci->has_lpm && !udev->parent->parent) {
373 rc = ehci_lpm_set_da(ehci, udev->devnum, udev->portnum);
374 if (!rc)
375 rc = ehci_lpm_check(ehci, udev->portnum);
376 }
377 return rc;
378}
379
364static const struct hc_driver ehci_pci_hc_driver = { 380static const struct hc_driver ehci_pci_hc_driver = {
365 .description = hcd_name, 381 .description = hcd_name,
366 .product_desc = "EHCI Host Controller", 382 .product_desc = "EHCI Host Controller",
@@ -407,6 +423,11 @@ static const struct hc_driver ehci_pci_hc_driver = {
407 .relinquish_port = ehci_relinquish_port, 423 .relinquish_port = ehci_relinquish_port,
408 .port_handed_over = ehci_port_handed_over, 424 .port_handed_over = ehci_port_handed_over,
409 425
426 /*
427 * call back when device connected and addressed
428 */
429 .update_device = ehci_update_device,
430
410 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, 431 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
411}; 432};
412 433