Am Montag, den 25.05.2020, 21:16 +0200 schrieb Jean Rene Dawin: > Oliver Neukum wrote on Mon 25/05/20 14:28: > > > > Hi, > > > > it looks to me like I made a mistake in fixing the error handling for > > some devices. Could you test the attached patch? > > > > Regards > > Oliver > > From 338fe738603d2612a317c9bec98236eb094ae109 Mon Sep 17 00:00:00 2001 > > From: Oliver Neukum <oneukum@xxxxxxxx> > > Date: Mon, 25 May 2020 14:21:44 +0200 > > Subject: [PATCH] CDC-ACM: heed quirk also in error handling > > > > If buffers are iterated over in the error case, the lower limits > > for quirky devices must be heeded. > > > > Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx> > > --- > > drivers/usb/class/cdc-acm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c > > index 7678ae4afd53..be4543569822 100644 > > --- a/drivers/usb/class/cdc-acm.c > > +++ b/drivers/usb/class/cdc-acm.c > > @@ -585,7 +585,7 @@ static void acm_softint(struct work_struct *work) > > } > > > > if (test_and_clear_bit(ACM_ERROR_DELAY, &acm->flags)) { > > - for (i = 0; i < ACM_NR; i++) > > + for (i = 0; i < acm->rx_buflimit; i++) > > if (test_and_clear_bit(i, &acm->urbs_in_error_delay)) > > acm_submit_read_urb(acm, i, GFP_NOIO); > > } > > -- > > 2.16.4 > > > > Hi, > > thanks for the quick reply and the patch. > > With the patch it is a different behaviour: > > The first time the battery is removed and inserted again, everything is > quite fine. Except that the USB cable has to be plugged out and in for the > connection to be re-established. But that was needed in previous > kernels, too. > > But if the battery is removed a second time, and inserted again and the > phone is turned on, it results in the traces below: Hi, may I ask whether you did the test with removing the battery twice with an older kernel? Could you please go back to f6cc6093a729ede1ff5658b493237c42b82ba107 and repeat the test of a second battery removal with that state? I just cannot find anything pointing to a change that could cause this issue within that time. Regards Oliver