diff options
author | Alek Du <alek.du@intel.com> | 2010-06-04 03:47:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:35 -0400 |
commit | 5a9cdf332eae724b11906cb1712e3a662eba32b2 (patch) | |
tree | 67aad1a4e795b2b26e4e320305accba16c4d201e /drivers/usb/host/ehci-hub.c | |
parent | 48f24970144479c29b8cee6d2e1dbedf6dcf9cfb (diff) |
USB: EHCI: EHCI 1.1 addendum: Enable Per-port change detect bits
This patch will enable Per-port event feature defined in EHCI 1.1
addendum. This feature addresses an issue where HCD is currently
required to read and parse PORTSC for all enabled root hub ports. With
this patch, the overhead will be reduced.
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 8a28dae8a375..84e792d71c22 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -603,6 +603,7 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf) | |||
603 | u32 mask; | 603 | u32 mask; |
604 | int ports, i, retval = 1; | 604 | int ports, i, retval = 1; |
605 | unsigned long flags; | 605 | unsigned long flags; |
606 | u32 ppcd = 0; | ||
606 | 607 | ||
607 | /* if !USB_SUSPEND, root hub timers won't get shut down ... */ | 608 | /* if !USB_SUSPEND, root hub timers won't get shut down ... */ |
608 | if (!HC_IS_RUNNING(hcd->state)) | 609 | if (!HC_IS_RUNNING(hcd->state)) |
@@ -632,7 +633,15 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf) | |||
632 | 633 | ||
633 | /* port N changes (bit N)? */ | 634 | /* port N changes (bit N)? */ |
634 | spin_lock_irqsave (&ehci->lock, flags); | 635 | spin_lock_irqsave (&ehci->lock, flags); |
636 | |||
637 | /* get per-port change detect bits */ | ||
638 | if (ehci->has_ppcd) | ||
639 | ppcd = ehci_readl(ehci, &ehci->regs->status) >> 16; | ||
640 | |||
635 | for (i = 0; i < ports; i++) { | 641 | for (i = 0; i < ports; i++) { |
642 | /* leverage per-port change bits feature */ | ||
643 | if (ehci->has_ppcd && !(ppcd & (1 << i))) | ||
644 | continue; | ||
636 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); | 645 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); |
637 | 646 | ||
638 | /* | 647 | /* |