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: Mon, 25 May 2020 14:28:10 +0200 [thread overview]
Message-ID: <1590409690.2838.7.camel@suse.com> (raw)
In-Reply-To: <20200525120026.GA11378@math.uni-bielefeld.de>
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
Am Montag, den 25.05.2020, 14:00 +0200 schrieb Jean Rene Dawin:
> Hi,
>
> I use a Nokia 515 connected via USB as a UMTS modem for my PC:
> CPU0: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz (family: 0x6, model: 0x17, stepping: 0xa)
>
> Output of lsusb -v -d for the device is attached.
>
> The battery of the phone is old, and sometimes the phone just turns off.
> Up intil recently (before 5.6.10) turning on the phone again would restore the connection.
>
> But roughly since commits 0afccd7601514c4b83d8cc58c740089cc447051d and/or 4e7279cd1d19f48f0af2a10ed020febaa9ac092 the kernel gets an Oops and eventually the system hangs.
> The behaviour is reproducible by taking out the battery from the phone during a connection.
>
> Tested wtih 5.6.10, 5.6.14 and 5.7-rc6. The following dmesg output is from 5.7-rc6:
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
[-- Attachment #2: CDC-ACM-heed-quirk-also-in-error-handling.patch --]
[-- Type: text/x-patch, Size: 954 bytes --]
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
next prev parent reply other threads:[~2020-05-25 12:28 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 [this message]
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
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=1590409690.2838.7.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.