ChangeSet 1.958, 2003/01/17 11:44:08-08:00, [EMAIL PROTECTED]

[PATCH] usb root hub strings

Someone changed the "get string" logic to use short reads,
not long ones, a while back.  That broke many root hub
string accesses (not through tools like "lsusb"!) because
that logic didn't handle short reads quite right.


diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c    Tue Feb  4 15:18:46 2003
+++ b/drivers/usb/core/hcd.c    Tue Feb  4 15:18:46 2003
@@ -310,9 +310,9 @@
        } else
            return 0;
 
-       data [0] = 2 + ascii2utf (buf, data + 2, len - 2);
+       data [0] = 2 * (strlen (buf) + 1);
        data [1] = 3;   /* type == string */
-       return data [0];
+       return 2 + ascii2utf (buf, data + 2, len - 2);
 }
 
 



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to