diff options
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index e051b30c1847..4c32cb19b405 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -343,7 +343,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
343 | u32 temp; | 343 | u32 temp; |
344 | u32 power_okay; | 344 | u32 power_okay; |
345 | int i; | 345 | int i; |
346 | u8 resume_needed = 0; | 346 | unsigned long resume_needed = 0; |
347 | 347 | ||
348 | if (time_before (jiffies, ehci->next_statechange)) | 348 | if (time_before (jiffies, ehci->next_statechange)) |
349 | msleep(5); | 349 | msleep(5); |
@@ -416,7 +416,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
416 | if (test_bit(i, &ehci->bus_suspended) && | 416 | if (test_bit(i, &ehci->bus_suspended) && |
417 | (temp & PORT_SUSPEND)) { | 417 | (temp & PORT_SUSPEND)) { |
418 | temp |= PORT_RESUME; | 418 | temp |= PORT_RESUME; |
419 | resume_needed = 1; | 419 | set_bit(i, &resume_needed); |
420 | } | 420 | } |
421 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); | 421 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); |
422 | } | 422 | } |
@@ -431,8 +431,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
431 | i = HCS_N_PORTS (ehci->hcs_params); | 431 | i = HCS_N_PORTS (ehci->hcs_params); |
432 | while (i--) { | 432 | while (i--) { |
433 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); | 433 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); |
434 | if (test_bit(i, &ehci->bus_suspended) && | 434 | if (test_bit(i, &resume_needed)) { |
435 | (temp & PORT_SUSPEND)) { | ||
436 | temp &= ~(PORT_RWC_BITS | PORT_RESUME); | 435 | temp &= ~(PORT_RWC_BITS | PORT_RESUME); |
437 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); | 436 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); |
438 | ehci_vdbg (ehci, "resumed port %d\n", i + 1); | 437 | ehci_vdbg (ehci, "resumed port %d\n", i + 1); |