Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207994
b: refs/heads/master
c: ee0b9be
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 8de9f90 commit de537c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4147200d25c423e627ab4487530b3d9f2ef829c8
refs/heads/master: ee0b9be829803e3ff5adec7456bd59a08425ffa1
4 changes: 4 additions & 0 deletions trunk/drivers/usb/host/ehci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
ehci_writel(ehci, temp | HOSTPC_PHCD, hostpc_reg);
}
}

/* Does the root hub have a port wakeup pending? */
if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD))
usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
}

static int ehci_bus_suspend (struct usb_hcd *hcd)
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/usb/host/ohci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ static void ohci_finish_controller_resume(struct usb_hcd *hcd)
ohci_readl(ohci, &ohci->regs->intrenable);
msleep(20);
}

/* Does the root hub have a port wakeup pending? */
if (ohci_readl(ohci, &ohci->regs->intrstatus) &
(OHCI_INTR_RD | OHCI_INTR_RHSC))
usb_hcd_resume_root_hub(hcd);
}

/* Carry out polling-, autostop-, and autoresume-related state changes */
Expand All @@ -364,7 +369,7 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
int poll_rh = 1;
int rhsc_enable;

/* Some broken controllers never turn off RHCS in the interrupt
/* Some broken controllers never turn off RHSC in the interrupt
* status register. For their sake we won't re-enable RHSC
* interrupts if the interrupt bit is already active.
*/
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/usb/host/uhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,11 @@ static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
/* If interrupts don't work and remote wakeup is enabled then
* the suspended root hub needs to be polled.
*/
if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup) {
if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup)
set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
usb_hcd_poll_rh_status(hcd);
}

/* Does the root hub have a port wakeup pending? */
usb_hcd_poll_rh_status(hcd);
return 0;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/host/uhci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
case UHCI_RH_SUSPENDING:
case UHCI_RH_SUSPENDED:
/* if port change, ask to be resumed */
if (status)
if (status || uhci->resuming_ports)
usb_hcd_resume_root_hub(hcd);
break;

Expand Down

0 comments on commit de537c0

Please sign in to comment.