ChangeSet 1.1722.97.77, 2004/06/17 15:21:44-07:00, [EMAIL PROTECTED]

[PATCH] proper bios handoff in ehci-hcd

Stuart Hayes here at Dell has identified this or/and mix-up in the
ehci-hcd driver.  Because of this, ehci-hcd is not properly released by
BIOSes supporting full 2.0 and port behavior can then become erratic.

(Code predates general availability of such BIOS firmware.  This version
of the patch also fixes minor linewrap issues.)

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


 drivers/usb/host/ehci-hcd.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c       Fri Jun 18 10:52:54 2004
+++ b/drivers/usb/host/ehci-hcd.c       Fri Jun 18 10:52:54 2004
@@ -290,16 +290,17 @@
 {
        if (cap & (1 << 16)) {
                int msec = 500;
+               struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
 
                /* request handoff to OS */
-               cap &= 1 << 24;
-               pci_write_config_dword (to_pci_dev(ehci->hcd.self.controller), where, 
cap);
+               cap |= 1 << 24;
+               pci_write_config_dword(pdev, where, cap);
 
                /* and wait a while for it to happen */
                do {
                        msleep(10);
                        msec -= 10;
-                       pci_read_config_dword (to_pci_dev(ehci->hcd.self.controller), 
where, &cap);
+                       pci_read_config_dword(pdev, where, &cap);
                } while ((cap & (1 << 16)) && msec);
                if (cap & (1 << 16)) {
                        ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to