Oddity with ugen
Karl Denninger
karl at denninger.net
Wed May 18 15:32:31 UTC 2016
On 5/18/2016 02:51, Hans Petter Selasky wrote:
> On 05/17/16 18:53, Karl Denninger wrote:
>> If this is a condition of some sort in the device or driver I've not
>> been able to figure out what it is, or how to force it to clear -- or to
>> prove whether it's in the device or the ugen driver.
>>
>> Any ideas?
>
> Hi,
>
> The most easy way to know this for sure, is to check the real data
> traffic using usbdump:
>
> usbdump -i usbusX -f Y -s 65536 -vvv
>
> My guess is there is some data toggle issue, and that the USB stack
> tries to clear some error using a clear-stall command, which possibly
> your device does not handle properly.
>
> --HPS
Well that doesn't help me... from what I can determine the device thinks
its sending it, well, at least usbdump thinks the device is sending it.
(bunch of ordinary stuff elided)
10:20:15.826093 usbus0.5 SUBM-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=4,IVAL=10
frame[0] WRITE 2 bytes
0000 06 43 -- -- -- -- -- -- -- -- -- -- -- -- -- -- |.C |
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0023
<OPEN|TRANSFERRING|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:15.833049 usbus0.5
DONE-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=0,IVAL=10,ERR=0
frame[0] WRITE 2 bytes
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0021 <OPEN|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:17.183085 usbus0.5
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=4,IVAL=0,ERR=0
frame[0] READ 1 bytes
0000 55 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |U |
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1021
<OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:17.183127 usbus0.5 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=0
frame[0] READ 8 bytes
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1023
<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
Up to here all is ok.
10:20:17.342824 usbus0.5 SUBM-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=4,IVAL=10
frame[0] WRITE 2 bytes
0000 04 4A -- -- -- -- -- -- -- -- -- -- -- -- -- -- |.J |
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0023
<OPEN|TRANSFERRING|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:17.353046 usbus0.5
DONE-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=0,IVAL=10,ERR=0
frame[0] WRITE 2 bytes
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0021 <OPEN|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:20.183068 usbus0.5
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=4,IVAL=0,ERR=0
frame[0] READ 4 bytes
0000 5A 02 00 4A -- -- -- -- -- -- -- -- -- -- -- -- |Z..J |
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1021
<OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:20.183113 usbus0.5 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=0
frame[0] READ 8 bytes
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1023
<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
This is ok; we got the "echo" back (which we usually don't, but we did,
and it's all right that we did.)
10:20:20.367909 usbus0.5 SUBM-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=4,IVAL=10
frame[0] WRITE 2 bytes
0000 06 43 -- -- -- -- -- -- -- -- -- -- -- -- -- -- |.C |
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0023
<OPEN|TRANSFERRING|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:20.373052 usbus0.5
DONE-INTR-EP=00000002,SPD=LOW,NFR=1,SLEN=0,IVAL=10,ERR=0
frame[0] WRITE 2 bytes
flags 0x11 <FORCE_SHORT_XFER|PROXY_BUFFER|0>
status 0xc0021 <OPEN|STARTED|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
Sent the next command..... and....
10:20:21.733059 usbus0.5
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=4,IVAL=0,ERR=0
frame[0] READ 4 bytes
0000 5A 02 00 4A -- -- -- -- -- -- -- -- -- -- -- -- |Z..J |
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1021
<OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:21.733103 usbus0.5 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=0
frame[0] READ 8 bytes
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1023
<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
I got the old one back (instead of either a "55", which is an "ack; you
may proceed with the next request" or the echo of what I sent which also
implies a clear interface once I've processed it.)
10:20:22.353058 usbus0.5
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=4,IVAL=0,ERR=0
frame[0] READ 4 bytes
0000 5A 02 00 4A -- -- -- -- -- -- -- -- -- -- -- -- |Z..J |
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1021
<OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:22.353102 usbus0.5 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=0
frame[0] READ 8 bytes
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1023
<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:24.063055 usbus0.5
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=4,IVAL=0,ERR=0
frame[0] READ 4 bytes
0000 5A 02 00 4A -- -- -- -- -- -- -- -- -- -- -- -- |Z..J |
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1021
<OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
10:20:24.063085 usbus0.5 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=0
frame[0] READ 8 bytes
flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>
status 0xc1023
<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
And then I get a bunch of repeats on ~2 second intervals even though I
haven't sent anything else...
If I'm reading this correctly usbdump is showing me exactly what the
device is sending; that is, there is no "driver" involved here (just bus
traffic) -- correct?
If so that looks like a device bug (and a nasty one that I may have all
sorts of fun trying to work around.)
--
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20160518/72280d94/attachment.bin>
More information about the freebsd-usb
mailing list