aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-01-20 16:55:14 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:55 -0500
commitf8aeb3bb8657b207895aa10f75e63f2c48d08985 (patch)
treea752ed44de17a3f0315cffeddfb944cb33c778aa /drivers/usb/host/ehci-pci.c
parent4186ecf8ad16dd05759a09594de6a87e48759ba6 (diff)
[PATCH] USB: EHCI and NF2 quirk
This teaches the EHCI driver about a quirk seen in older NForce2 chips, adding a workaround to ignore selective suspend requests. Bus-wide (so-called "global") suspend still works, as does USB wakeup of a root hub that's globally suspended. There's still a hole in this support though. Strictly speaking, this should _fail_ selective suspend requests, rather than ignoring them, since doing it this way means that devices which should be able to issue remote wakeup are not going to be able to do that. For now, we'll just live with that problem ... since usbcore expects to do selective suspend on the way towards a full bus suspend, and usbcore needs to be able to do full bus suspend. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 3a6687df5594..1e03f1a5a5fd 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -106,11 +106,11 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
106 } 106 }
107 break; 107 break;
108 case PCI_VENDOR_ID_NVIDIA: 108 case PCI_VENDOR_ID_NVIDIA:
109 switch (pdev->device) {
109 /* NVidia reports that certain chips don't handle 110 /* NVidia reports that certain chips don't handle
110 * QH, ITD, or SITD addresses above 2GB. (But TD, 111 * QH, ITD, or SITD addresses above 2GB. (But TD,
111 * data buffer, and periodic schedule are normal.) 112 * data buffer, and periodic schedule are normal.)
112 */ 113 */
113 switch (pdev->device) {
114 case 0x003c: /* MCP04 */ 114 case 0x003c: /* MCP04 */
115 case 0x005b: /* CK804 */ 115 case 0x005b: /* CK804 */
116 case 0x00d8: /* CK8 */ 116 case 0x00d8: /* CK8 */
@@ -120,6 +120,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
120 ehci_warn(ehci, "can't enable NVidia " 120 ehci_warn(ehci, "can't enable NVidia "
121 "workaround for >2GB RAM\n"); 121 "workaround for >2GB RAM\n");
122 break; 122 break;
123 /* Some NForce2 chips have problems with selective suspend;
124 * fixed in newer silicon.
125 */
126 case 0x0068:
127 pci_read_config_dword(pdev, PCI_REVISION_ID, &temp);
128 if ((temp & 0xff) < 0xa4)
129 ehci->no_selective_suspend = 1;
130 break;
123 } 131 }
124 break; 132 break;
125 } 133 }
@@ -163,6 +171,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
163 device_init_wakeup(&pdev->dev, 1); 171 device_init_wakeup(&pdev->dev, 1);
164 } 172 }
165 173
174#ifdef CONFIG_USB_SUSPEND
175 /* REVISIT: the controller works fine for wakeup iff the root hub
176 * itself is "globally" suspended, but usbcore currently doesn't
177 * understand such things.
178 *
179 * System suspend currently expects to be able to suspend the entire
180 * device tree, device-at-a-time. If we failed selective suspend
181 * reports, system suspend would fail; so the root hub code must claim
182 * success. That's lying to usbcore, and it matters for for runtime
183 * PM scenarios with selective suspend and remote wakeup...
184 */
185 if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev))
186 ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
187#endif
188
166 retval = ehci_pci_reinit(ehci, pdev); 189 retval = ehci_pci_reinit(ehci, pdev);
167done: 190done:
168 return retval; 191 return retval;