Re: [PATCH] Fix data loss in cdc-acm

2015-07-22 Thread Sven Brauch
Hi, On 23/07/15 00:12, Peter Hurley wrote: > The premature unthrottle actually leads to the data loss but the throttling > with a mere 2K left is _way too late_. Ok, yes, I think so too. > 10ms is a _really_ long time for a cpu not to attend to a kworker. > Which raises 2 questions: > 1. What are

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Sven Brauch
Hey, On 22/07/15 01:34, Peter Hurley wrote: > I'd like to see that data, if you can, which will help me understand > at least the timing. Sure, please see below for the code which produced the output and the actual output. Let me know if you need anything else. This was run with the unmodified ver

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Sven Brauch
Hi, Thank you for your comments. On 21/07/15 15:43, Oliver Neukum wrote: > But others won't and we'd preserve stale data in preference over fresh > data. If that is important for your device, you should be using an isochronous endpoint, not bulk, no? Also note that the driver currently does this

Re: [PATCH] Fix data loss in cdc-acm

2015-07-20 Thread Sven Brauch
On 20/07/15 19:25, Johan Hovold wrote: > What kernel version are you using? I'm using linux 4.1.2. > The idea of adding another layer of buffering in the cdc-acm driver has > been suggested in the past but was rejected (or at least questioned). > See for example this thread: > > https://lkm

[PATCH] Fix data loss in cdc-acm

2015-07-19 Thread Sven Brauch
case. Please excuse the poor code quality, I have no experience whatsoever in kernel development. Signed-off-by: Sven Brauch --- drivers/usb/class/cdc-acm.c | 93 + drivers/usb/class/cdc-acm.h | 3 ++ 2 files changed, 89 insertions(+), 7 deletions