Re: Trouble with usb modem
"jidong xiao" <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/10/07, jidong xiao <[email protected]> wrote: > > Judging from the log file of 2.6.5, there usb_new_device fails when it > call usb_get_device_descriptor. > > In 2.6.22, hub_port_init() and usb_new_device() are invoked twice,the > first try fails and the second try got succeed. > > Since from 2.6.10 we introduce a new USB device initialization scheme, > I feel maybe your device is incompatible with the old scheme and only > works against the new scheme. > > Regards > Jason > And we can take a look at the source code of 2.6.5, 1117 for (i = 0; i < NEW_DEVICE_RETRYS; ++i) { 1118 1119 for (j = 0; j < SET_ADDRESS_RETRYS; ++j) { 1120 err = usb_set_address(dev); 1121 if (err >= 0) 1122 break; 1123 wait_ms(200); 1124 } 1125 if (err < 0) { 1126 dev_err(&dev->dev, 1127 "device not accepting address %d, error %d\n", 1128 dev->devnum, err); 1129 goto fail; 1130 } 1131 1132 wait_ms(10); /* Let the SET_ADDRESS settle */ 1133 1134 /* high and low speed devices don't need this... */ 1135 err = usb_get_device_descriptor(dev, 8); 1136 if (err >= 8) 1137 break; 1138 wait_ms(100); 1139 } 1140 1141 if (err < 8) { 1142 dev_err(&dev->dev, "device descriptor read/8, error %d\n", err); 1143 goto fail; 1144 } NEW_DEVICE_RETRYS is defined as a value of 2. So usb_get_device_descriptor will be called twice, but after the loop, err is still less than 8, which induces line 1142 being executed.(we could see this error message in your log file.) So I highly suspect your device is not compatible with the old scheme. Regards Jason ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel