All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Jean Rene Dawin <jdawin@math.uni-bielefeld.de>,
	linux-usb@vger.kernel.org
Subject: Re: Kernel Oops in cdc_acm
Date: Tue, 26 May 2020 13:13:06 +0200	[thread overview]
Message-ID: <1590491586.2838.38.camel@suse.com> (raw)
In-Reply-To: <20200525191624.GA28647@math.uni-bielefeld.de>

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@suse.com>
> > 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@suse.com>
> > ---
> >  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


  parent reply	other threads:[~2020-05-26 11:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 12:00 Kernel Oops in cdc_acm Jean Rene Dawin
2020-05-25 12:28 ` Oliver Neukum
2020-05-25 19:16   ` Jean Rene Dawin
2020-05-26  8:08     ` Oliver Neukum
2020-05-26 11:16       ` Jean Rene Dawin
2020-05-26 11:13     ` Oliver Neukum [this message]
2020-05-26 19:57       ` Jean Rene Dawin
2020-05-27  8:53         ` Oliver Neukum
2020-05-28  8:51           ` Jean Rene Dawin
2020-06-03  7:26             ` Jean Rene Dawin
2020-05-27  8:28       ` Jean Rene Dawin
2020-05-27  9:33         ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1590491586.2838.38.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=jdawin@math.uni-bielefeld.de \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.