[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <09636f3b8dbd3838ba7a568f611a0323e85c4404.camel@suse.com>
Date: Tue, 20 Oct 2020 09:41:34 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Jerome Brunet <jbrunet@...libre.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Kevin Hilman <khilman@...libre.com>,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
Pascal Vizeli <pascal.vizeli@...ucasa.com>
Subject: Re: [PATCH] usb: cdc-acm: fix cooldown mechanism
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@...ucasa.com>
> Cc: Oliver Neukum <oneukum@...e.com>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
Acked-by: Oliver Neukum <oneukum@...e.com>
Powered by blists - more mailing lists