From: Colin Leroy <colin@colino.net>
To: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.linuxppc.org
Subject: [PATCH] Re: cdc-acm problems
Date: Tue, 13 Jan 2004 21:46:13 +0100 [thread overview]
Message-ID: <20040113214613.07998ff6.colin@colino.net> (raw)
In-Reply-To: <20040113130529.03f5dbac.colin@colino.net>
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
> I have problems with cdc-acm killing ohci. I tried to narrow down the problem,
> but didn't get far.
> Basically `killall -HUP pppd` gives (in dmesg):
>
> drivers/usb/class/cdc-acm.c: acm_ctrl_irq - urb shutting down with status: -2
> ohci_hcd 0001:01:1b.1: OHCI Unrecoverable Error, disabled
> ohci_hcd 0001:01:1b.1: HC died; cleaning up
> usb 4-1: USB disconnect, address 2
> bus usb: remove device 4-1:1.0
> bus usb: remove device 4-1:1.1
> bus usb: remove device 4-1
After having looked some more hours, it looks like acm_tty_close() unlinks
urbs too soon or something like that... The attached patch fixes it for me
(I don't think it's really clean, but it may help ?)
--
Colin
[-- Attachment #2: cdc-acm.diff --]
[-- Type: text/plain, Size: 1275 bytes --]
Index: drivers/usb/class/cdc-acm.c
===================================================================
RCS file: /home/cvsroot/linuxppc/drivers/usb/class/cdc-acm.c,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 cdc-acm.c
--- drivers/usb/class/cdc-acm.c 8 Jan 2004 11:25:51 -0000 1.1.1.1
+++ drivers/usb/class/cdc-acm.c 13 Jan 2004 20:40:39 -0000
@@ -157,6 +157,7 @@
unsigned int minor; /* acm minor number */
unsigned char throttle; /* throttled by tty layer */
unsigned char clocal; /* termios CLOCAL */
+ unsigned int finish_remove; /* finish removing */
};
static struct usb_driver acm_driver;
@@ -214,8 +215,16 @@
goto exit;
}
- if (!ACM_READY(acm))
+ if (!ACM_READY(acm)) {
+ if (acm->finish_remove) {
+ dbg("unlinking urbs");
+ usb_unlink_urb(acm->ctrlurb);
+ usb_unlink_urb(acm->writeurb);
+ usb_unlink_urb(acm->readurb);
+ return;
+ }
goto exit;
+ }
switch (dr->bRequest) {
@@ -382,9 +391,7 @@
if (!--acm->used) {
if (acm->dev) {
acm_set_control(acm, acm->ctrlout = 0);
- usb_unlink_urb(acm->ctrlurb);
- usb_unlink_urb(acm->writeurb);
- usb_unlink_urb(acm->readurb);
+ acm->finish_remove = 1;
} else {
tty_unregister_device(acm_tty_driver, acm->minor);
acm_table[acm->minor] = NULL;
next prev parent reply other threads:[~2004-01-13 20:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-13 12:05 Colin Leroy
2004-01-13 20:46 ` Colin Leroy [this message]
2004-01-15 1:34 ` Benjamin Herrenschmidt
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=20040113214613.07998ff6.colin@colino.net \
--to=colin@colino.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®