Re: cdc_acm bug? read buffer bytes shifted

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

 



>>> 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.
> 

Some more precisions: I just had access to the FTDI version of the
device instead of the Microchip one and the bug did not appear under the
ftdi_sio driver, by running the previous script approx. 5 minutes.

-- 
Julio Guerra
--
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