This might be good to get into the final 2.6.11 release, now
that the NF4 boards are starting to appear.

- Dave
Turns out that a workaround for a different EHCI chip trips up at
least one NForce4 board.  Neither controller can multiply right.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

--- 1.115/drivers/usb/host/ehci-hcd.c	2005-01-12 19:31:18 -08:00
+++ edited/drivers/usb/host/ehci-hcd.c	2005-02-05 11:12:57 -08:00
@@ -421,8 +421,29 @@
 	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
 	temp &= 0x0f;
 	if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {
-		temp |= (ehci->hcs_params & ~0xf);
-		ehci->hcs_params = temp;
+		ehci_dbg (ehci, "bogus port configuration: "
+			"cc=%d x pcc=%d < ports=%d\n",
+			HCS_N_CC(ehci->hcs_params),
+			HCS_N_PCC(ehci->hcs_params),
+			HCS_N_PORTS(ehci->hcs_params));
+
+#ifdef	CONFIG_PCI
+		if (hcd->self.controller->bus == &pci_bus_type) {
+			struct pci_dev	*pdev;
+
+			pdev = to_pci_dev(hcd->self.controller);
+			switch (pdev->vendor) {
+			case 0x17a0:		/* GENESYS */
+				/* GL880S: should be PORTS=2 */
+				temp |= (ehci->hcs_params & ~0xf);
+				ehci->hcs_params = temp;
+				break;
+			case PCI_VENDOR_ID_NVIDIA:
+				/* NF4: should be PCC=10 */
+				break;
+			}
+		}
+#endif
 	}
 
 	/* force HC to halt state */

Reply via email to