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.

-- 
Julio Guerra
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux