ChangeSet 1.1722.97.73, 2004/06/14 10:35:58-07:00, [EMAIL PROTECTED]
[PATCH] USB: Fix bug in TT initialization introduced by earlier
This patch repairs a bug introduced by an earlier patch: The TT
initialization code was moved to _after_ the TT's first use. The patch
simply puts the code back the way it used to be.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
drivers/usb/core/hub.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c Fri Jun 18 10:53:52 2004
+++ b/drivers/usb/core/hub.c Fri Jun 18 10:53:52 2004
@@ -1405,6 +1405,19 @@
default: speed = "?"; break;
}; speed;}),
udev->devnum);
+
+ /* Set up TT records, if needed */
+ if (hdev->tt) {
+ udev->tt = hdev->tt;
+ udev->ttport = hdev->ttport;
+ } else if (udev->speed != USB_SPEED_HIGH
+ && hdev->speed == USB_SPEED_HIGH) {
+ struct usb_hub *hub;
+
+ hub = usb_get_intfdata(hdev->actconfig->interface[0]);
+ udev->tt = &hub->tt;
+ udev->ttport = port + 1;
+ }
/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
* Because device hardware and firmware is sometimes buggy in
@@ -1614,16 +1627,6 @@
status = hub_port_init(hdev, udev, port);
if (status < 0)
goto loop;
-
- /* Set up TT records, if needed */
- if (hdev->tt) {
- udev->tt = hdev->tt;
- udev->ttport = hdev->ttport;
- } else if (udev->speed != USB_SPEED_HIGH
- && hdev->speed == USB_SPEED_HIGH) {
- udev->tt = &hub->tt;
- udev->ttport = port + 1;
- }
/* consecutive bus-powered hubs aren't reliable; they can
* violate the voltage drop budget. if the new child has
-------------------------------------------------------
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