Re: cdc_acm bug? read buffer bytes shifted

2016-09-20 Thread Oliver Neukum
On Fri, 2016-09-16 at 18:24 +0200, Julio Guerra wrote: > > On Sat, 2016-08-20 at 14:14 +0200, Julio Guerra wrote: > 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

Re: cdc_acm bug? read buffer bytes shifted

2016-09-16 Thread Julio Guerra
> On Sat, 2016-08-20 at 14:14 +0200, Julio Guerra wrote: 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

Re: cdc_acm bug? read buffer bytes shifted

2016-08-22 Thread Oliver Neukum
On Sat, 2016-08-20 at 14:14 +0200, Julio Guerra wrote: > >> 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 >

Re: cdc_acm bug? read buffer bytes shifted

2016-08-21 Thread Julio Guerra
>>> 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

Re: cdc_acm bug? read buffer bytes shifted

2016-08-20 Thread Julio Guerra
>> 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? >

Re: cdc_acm bug? read buffer bytes shifted

2016-08-20 Thread Oliver Neukum
On Sat, 2016-08-20 at 05:40 +0200, Julio Guerra wrote: > 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

cdc_acm bug? read buffer bytes shifted

2016-08-19 Thread Julio Guerra
Hi, I have noticed a problem using a usb device managed by the cdc_acm driver. The data received from the device and copied to userspace ends up being shifted by one byte again and again after some amount of calls to read() and most importantly with previously read data. usbmon shows the usb data