lkml.org 
[lkml]   [2020]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: cdc-acm: fix cooldown mechanism
From
Date
Am Montag, den 19.10.2020, 19:07 +0200 schrieb Jerome Brunet:
> Commit a4e7279cd1d1 ("cdc-acm: introduce a cool down") is causing
> regression if there is some USB error, such as -EPROTO.
>
> This has been reported on some samples of the Odroid-N2 using the Combee II
> Zibgee USB dongle.
>
> > struct acm *acm = container_of(work, struct acm, work)
>
> is incorrect in case of a delayed work and causes warnings, usually from
> the workqueue:
>
> > WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:1474 __queue_work+0x480/0x528.
>
> When this happens, USB eventually stops working completely after a while.
> Also the ACM_ERROR_DELAY bit is never set, so the cooldown mechanism
> previously introduced cannot be triggered and acm_submit_read_urb() is
> never called.
>
> This changes makes the cdc-acm driver use a single delayed work, fixing the
> pointer arithmetic in acm_softint() and set the ACM_ERROR_DELAY when the
> cooldown mechanism appear to be needed.
>
> Fixes: a4e7279cd1d1 ("cdc-acm: introduce a cool down")
> Reported-by: Pascal Vizeli <pascal.vizeli@nabucasa.com>
> Cc: Oliver Neukum <oneukum@suse.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Oliver Neukum <oneukum@suse.com>

\
 
 \ /
  Last update: 2020-10-20 09:42    [W:1.985 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site