Low & full speed devices stop working after testusb run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While working on the isp1760 driver I have now reached a point where I can
repeatably trigger the problem described below. I believe this problem exist
in the current driver as well, although it triggers very rarely.

The problem is that low- and full-speed devices stop working while running the
testusb suite. It looks like this:

# ./testusb -a
...
usbtest 1-1.3:3.0: TEST 10:  queue 32 control calls, 1000 times
/proc/bus/usb/001/004 test 10,   10.007019 secs
usbtest 1-1.3:3.0: TEST 11:  unlink 1000 reads of 512
/proc/bus/usb/001/004 test 11,   16.370657 secs
usbtest 1-1.3:3.0: TEST 12:  unlink 1000 writes of 512
/proc/bus/usb/001/004 test 12,   16.189282 secs
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 13 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 14 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 15 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 16 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 17 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 18 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 19 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 20 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 21 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 22 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 23 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 24 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 25 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 26 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 27 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 28 --> 110 (error 110)
usbtest 1-1.3:3.0: set altsetting to 0 failed, -110
/proc/bus/usb/001/003 test 29 --> 110 (error 110)
#

After this, plugging in a full speed device yields this (on any port):
/var/log/messages:
usb 1-1.2: new full speed USB device using isp1760 and address 23
usb 1-1.2: device descriptor read/64, error -110
hub 1-1:1.0: unable to enumerate USB device on port 2

High speed devices however works just fine (on any port).


The usbmon dump ends with one line of -ENOENT (-2) for every line of "error 110"
in the output above:

...
93e26a80 2856118575 C Bo:1:003:2 0 512 >
93e26a80 2856119258 C Bo:1:003:2 0 512 >
93e26a80 2861121006 C Co:1:003:0 -2 0
93e26a80 2861129835 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93e26a80 2866200342 C Co:1:003:0 -2 0
93e26800 2866274552 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93e26800 2871272866 C Co:1:003:0 -2 0
93e26800 2871286662 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93e26800 2876285011 C Co:1:003:0 -2 0
93e26800 2876298504 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93e26800 2881296584 C Co:1:003:0 -2 0
93e1e980 1290938303 S Co:1:003:0 s 02 03 0000 0081 0000 0
93e1e980 1290938596 C Co:1:003:0 0 0
93e1e980 1290938885 S Ci:1:003:0 s 82 00 0000 0081 0002 2 <
93e1e980 1290939235 C Ci:1:003:0 0 2 = 0100
93e1ee80 1290939482 S Bi:1:003:1 -115 512 <
93e1ee80 1290939667 C Bi:1:003:1 -32 0
93e1ee80 1290939799 S Bi:1:003:1 -115 512 <
93e1ee80 1290940053 C Bi:1:003:1 -32 0
93e1e980 1290940288 S Co:1:003:0 s 02 01 0000 0081 0000 0
93e1e980 1290940608 C Co:1:003:0 0 0
93e1e980 1290941190 S Ci:1:003:0 s 82 00 0000 0081 0002 2 <
93e1e980 1290941563 C Ci:1:003:0 0 2 = 0000
93e1ee80 1290945105 S Bi:1:003:1 -115 512 <
93e1ee80 1290945882 C Bi:1:003:1 0 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046068046 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046068046 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046069413 C Bo:1:003:2 0 512 >
93edc900 2046070102 C Bo:1:003:2 0 512 >
93edc900 2046070863 C Bo:1:003:2 0 512 >
93edc900 2046070915 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046071644 C Bo:1:003:2 0 512 >
93edc900 2046072339 C Bo:1:003:2 0 512 >
93edc900 2046073025 C Bo:1:003:2 0 512 >
93edc900 2046073078 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046074952 C Bo:1:003:2 0 512 >
93edc900 2046075691 C Bo:1:003:2 0 512 >
93edc900 2046076383 C Bo:1:003:2 0 512 >
93edc900 2046077073 C Bo:1:003:2 0 512 >
93edc900 2046077859 C Bo:1:003:2 0 512 >
93edc900 2046078596 C Bo:1:003:2 0 512 >
93edc900 2046080073 C Bo:1:003:2 0 512 >
93edc900 2046080126 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046080798 C Bo:1:003:2 0 512 >
93edc900 2046080850 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046082759 C Bo:1:003:2 0 512 >
93edc900 2046083453 C Bo:1:003:2 0 512 >
93edc900 2046084153 C Bo:1:003:2 0 512 >
93edc900 2046084204 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046084921 C Bo:1:003:2 0 512 >
93edc900 2046085983 C Bo:1:003:2 0 512 >
93edc900 2046086038 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046086763 C Bo:1:003:2 0 512 >
93edc900 2046087536 C Bo:1:003:2 0 512 >
93edc900 2046088239 C Bo:1:003:2 0 512 >
93edc900 2046088290 S Bo:1:003:2 -115 512 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
93edc900 2046089637 C Bo:1:003:2 0 512 >
93edc900 2051090280 C Co:1:003:0 -2 0
93edc900 2051099154 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2056098181 C Co:1:003:0 -2 0
93edc900 2056107164 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2061105862 C Co:1:003:0 -2 0
93edc900 2061115525 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2066114177 C Co:1:003:0 -2 0
93edc900 2066123163 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2071122180 C Co:1:003:0 -2 0
93edc900 2071131135 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2076130187 C Co:1:003:0 -2 0
93edc900 2076139151 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2081138169 C Co:1:003:0 -2 0
93edc900 2081147150 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2086146204 C Co:1:003:0 -2 0
93edc900 2086155154 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2091154286 C Co:1:003:0 -2 0
93edc900 2091163153 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2096162171 C Co:1:003:0 -2 0
93edc900 2096171180 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2101170259 C Co:1:003:0 -2 0
93edc900 2101179146 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2106178187 C Co:1:003:0 -2 0
93edc900 2106187182 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2111186278 C Co:1:003:0 -2 0
93edc900 2111195155 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2116194160 C Co:1:003:0 -2 0
93edc900 2116207268 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2121206180 C Co:1:003:0 -2 0
93edc900 2121215178 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2126214186 C Co:1:003:0 -2 0
93edc900 2126223188 S Co:1:003:0 s 01 0b 0000 0000 0000 0
93edc900 2131221631 C Co:1:003:0 -2 0


Any idea what could be causing this? (The driver itself never sets urb->status
to -ENOENT, but I can see that this is done in the usb core code for numerous
reasons.)

Another clue may be that with the addition of this printk to core/urb.c, the
error does not occur, so it would have to be a timing dependent issue:

 void usb_kill_urb(struct urb *urb)
 {
	might_sleep();
	if (!(urb && urb->dev && urb->ep))
		return;
	atomic_inc(&urb->reject);

+	printk(KERN_ERR "E\n");
	usb_hcd_unlink_urb(urb, -ENOENT);
	wait_event(usb_kill_urb_queue, atomic_read(&urb->use_count) == 0);

	atomic_dec(&urb->reject);
 }
 EXPORT_SYMBOL_GPL(usb_kill_urb);


Thanks,
Arvid Brodin
Enea Services Stockholm AB
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux