>> Another example:
>>> 00 00 00 00 00 00 00 01
>> ...
>>> 01 00 00 00 00 00 00 00
>> ...
>>> 00 01 00 00 00 00 00 00
>> ...
>>> 00 00 01 00 00 00 00 00
>> after a random number of times, while usbmon shows the usb payload
>> "00 00 00 00 00 00 00 01".
> 
> Hi, how many bytes does read() return?
> 

Exactly 8 bytes, always. I set the tty in raw non-canonical mode with
vmin = 8 and vtime = 0. I also tried with vmin = 1 and did the copy of
exactly 8 bytes by looping in userspace, without any improvement.

I wrote a small workaround for now that detects this problem (because I
exactly know what the buffer is supposed to look like) to close() and
re-open() the device. The next read buffer is then correct.

-- 
Julio Guerra
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to