Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15445
b: refs/heads/master
c: 2c1c3c4
h: refs/heads/master
i:
  15443: 8383c96
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 93f8ce6 commit 5667106
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 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: 8d7802ed3c617120863f84346638d1cf1c96137b
refs/heads/master: 2c1c3c4cd5f796b1912c65aaf3bf48c0ddf11f5e
2 changes: 1 addition & 1 deletion trunk/drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
}

/* remote wakeup [4.3.1] */
if ((status & STS_PCD) && hcd->remote_wakeup) {
if ((status & STS_PCD) && device_may_wakeup(&hcd->self.root_hub->dev)) {
unsigned i = HCS_N_PORTS (ehci->hcs_params);

/* resume root hub? */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/host/ehci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)

if ((t1 & PORT_PE) && !(t1 & PORT_OWNER))
t2 |= PORT_SUSPEND;
if (hcd->remote_wakeup)
if (device_may_wakeup(&hcd->self.root_hub->dev))
t2 |= PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E;
else
t2 &= ~(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E);
Expand Down Expand Up @@ -517,7 +517,7 @@ static int ehci_hub_control (
if ((temp & PORT_PE) == 0
|| (temp & PORT_RESET) != 0)
goto error;
if (hcd->remote_wakeup)
if (device_may_wakeup(&hcd->self.root_hub->dev))
temp |= PORT_WAKE_BITS;
writel (temp | PORT_SUSPEND,
&ehci->regs->port_status [wIndex]);
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,16 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
/* Serial Bus Release Number is at PCI 0x60 offset */
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);

/* REVISIT: per-port wake capability (PCI 0x62) currently unused */
/* Workaround current PCI init glitch: wakeup bits aren't
* being set from PCI PM capability.
*/
if (!device_can_wakeup(&pdev->dev)) {
u16 port_wake;

pci_read_config_word(pdev, 0x62, &port_wake);
if (port_wake & 0x0001)
device_init_wakeup(&pdev->dev, 1);
}

retval = ehci_pci_reinit(ehci, pdev);
done:
Expand Down

0 comments on commit 5667106

Please sign in to comment.