This is mostly Matt's patch, but I include a small cleanup too. Please merge.
- Dave
This has minor PCI tweaks for the EHCI driver:
- If the (nonfunctional) AMD 8111 controller shows up, ignore it.
(Patch from Matt Dharm, with minor coding style tweaks).
- Delete some code that interprets an EHCI capability code; it
should be a PCI capability instead.
Signed-off-by: David Brownell <[EMAIL PROTECTED]>
--- xu26/drivers/usb/host/ehci-hcd.c 2004-10-20 17:27:13.000000000 -0700
+++ gadget-2.6/drivers/usb/host/ehci-hcd.c 2004-10-22 14:11:54.769953616 -0700
@@ -347,9 +344,18 @@
#ifdef CONFIG_PCI
/* EHCI 0.96 and later may have "extended capabilities" */
- if (hcd->self.controller->bus == &pci_bus_type)
+ if (hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
+
+ /* AMD8111 EHCI doesn't work, according to AMD errata */
+ if ((pdev->vendor == PCI_VENDOR_ID_AMD)
+ && (pdev->device == 0x7463)) {
+ ehci_info (ehci, "ignoring AMD8111 (errata)\n");
+ return -EIO;
+ }
+
temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));
- else
+ } else
temp = 0;
while (temp && count--) {
u32 cap;
@@ -362,10 +368,6 @@
if (bios_handoff (ehci, temp, cap) != 0)
return -EOPNOTSUPP;
break;
- case 0x0a: /* appendix C */
- ehci_dbg (ehci, "debug registers, BAR %d offset %d\n",
- (cap >> 29) & 0x07, (cap >> 16) & 0x0fff);
- break;
case 0: /* illegal reserved capability */
ehci_warn (ehci, "illegal capability!\n");
cap = 0;