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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
48f2497014
commit
5a9cdf332e
@@ -603,6 +603,7 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
|
||||
u32 mask;
|
||||
int ports, i, retval = 1;
|
||||
unsigned long flags;
|
||||
u32 ppcd = 0;
|
||||
|
||||
/* if !USB_SUSPEND, root hub timers won't get shut down ... */
|
||||
if (!HC_IS_RUNNING(hcd->state))
|
||||
@@ -632,7 +633,15 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
|
||||
|
||||
/* port N changes (bit N)? */
|
||||
spin_lock_irqsave (&ehci->lock, flags);
|
||||
|
||||
/* get per-port change detect bits */
|
||||
if (ehci->has_ppcd)
|
||||
ppcd = ehci_readl(ehci, &ehci->regs->status) >> 16;
|
||||
|
||||
for (i = 0; i < ports; i++) {
|
||||
/* leverage per-port change bits feature */
|
||||
if (ehci->has_ppcd && !(ppcd & (1 << i)))
|
||||
continue;
|
||||
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user