ChangeSet 1.2223.2.5, 2004/11/24 15:12:52-08:00, [EMAIL PROTECTED]

[PATCH] USB: fix Genesys GL880S EHCI

This has two minor patches to make this driver work better with
the Genesys GL880S:  don't report hardware port indicators (until
the root hub code supports them); and patch the misreported number
of ports (two, not four).

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


 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 drivers/usb/host/ehci-hub.c |    3 +++
 2 files changed, 11 insertions(+)


diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c       2004-11-30 15:44:21 -08:00
+++ b/drivers/usb/host/ehci-hcd.c       2004-11-30 15:44:21 -08:00
@@ -379,6 +379,14 @@
        /* cache this readonly data; minimize PCI reads */
        ehci->hcs_params = readl (&ehci->caps->hcs_params);
 
+       /* at least the Genesys GL880S needs fixup here */
+       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;
+       }
+
        /* force HC to halt state */
        return ehci_halt (ehci);
 }
diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
--- a/drivers/usb/host/ehci-hub.c       2004-11-30 15:44:21 -08:00
+++ b/drivers/usb/host/ehci-hub.c       2004-11-30 15:44:21 -08:00
@@ -281,8 +281,11 @@
        temp = 0x0008;                  /* per-port overcurrent reporting */
        if (HCS_PPC (ehci->hcs_params))
                temp |= 0x0001;         /* per-port power control */
+#if 0
+// re-enable when we support USB_PORT_FEAT_INDICATOR below.
        if (HCS_INDICATOR (ehci->hcs_params))
                temp |= 0x0080;         /* per-port indicators (LEDs) */
+#endif
        desc->wHubCharacteristics = cpu_to_le16 (temp);
 }
 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to