Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299825
b: refs/heads/master
c: 151b612
h: refs/heads/master
i:
  299823: 01ea963
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 24, 2012
1 parent 4607fef commit 0b4c290
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f6543f53f9ce136e01d7114bf6f0818ca54fb41
refs/heads/master: 151b61284776be2d6f02d48c23c3625678960b97
9 changes: 9 additions & 0 deletions trunk/drivers/usb/core/hcd-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,15 @@ static int hcd_pci_suspend_noirq(struct device *dev)

pci_save_state(pci_dev);

/*
* Some systems crash if an EHCI controller is in D3 during
* a sleep transition. We have to leave such controllers in D0.
*/
if (hcd->broken_pci_sleep) {
dev_dbg(dev, "Staying in PCI D0\n");
return retval;
}

/* If the root hub is dead rather than suspended, disallow remote
* wakeup. usb_hc_died() should ensure that both hosts are marked as
* dying, so we only need to check the primary roothub.
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
hcd->has_tt = 1;
tdi_reset(ehci);
}
if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) {
/* EHCI #1 or #2 on 6 Series/C200 Series chipset */
if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) {
ehci_info(ehci, "broken D3 during system sleep on ASUS\n");
hcd->broken_pci_sleep = 1;
device_set_wakeup_capable(&pdev->dev, false);
}
}
break;
case PCI_VENDOR_ID_TDI:
if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/usb/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ struct usb_hcd {
unsigned wireless:1; /* Wireless USB HCD */
unsigned authorized_default:1;
unsigned has_tt:1; /* Integrated TT in root hub */
unsigned broken_pci_sleep:1; /* Don't put the
controller in PCI-D3 for system sleep */

unsigned int irq; /* irq allocated */
void __iomem *regs; /* device memory/io */
Expand Down

0 comments on commit 0b4c290

Please sign in to comment.