From: Colin Leroy <colin@colino.net>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] 2.6.6-rc1: cdc-acm still (differently) broken
Date: Thu, 15 Apr 2004 21:23:34 +0200 [thread overview]
Message-ID: <20040415212334.4a568c5a@jack.colino.net> (raw)
In-Reply-To: <407EDA4A.2070509@pacbell.net>
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
On 15 Apr 2004 at 11h04, David Brownell wrote:
Hi David,
> That test has always been buggy -- better to just remove it. For
> that matter, usb_interface_claimed() calls should all vanish ... it's
> better to fail if claiming the interface fails (one step, not two).
> Care to try an updated patch?
Like this one? It works. I'm a bit wondering, however, how comes
usb_interface_claimed() returns true, and the check in
usb_driver_claim_interface() passes?
--
Colin
[-- Attachment #2: cdc-acm.patch --]
[-- Type: application/octet-stream, Size: 924 bytes --]
--- drivers/usb/class/cdc-acm.c.orig 2004-04-15 20:04:47.000000000 +0200
+++ drivers/usb/class/cdc-acm.c 2004-04-15 21:20:00.255123616 +0200
@@ -585,10 +585,6 @@
for (j = 0; j < cfacm->desc.bNumInterfaces - 1; j++) {
- if (usb_interface_claimed(cfacm->interface[j]) ||
- usb_interface_claimed(cfacm->interface[j + 1]))
- continue;
-
/* We know we're probe()d with the control interface.
* FIXME ACM doesn't guarantee the data interface is
* adjacent to the control interface, or that if one
@@ -696,7 +692,13 @@
acm->line.databits = 8;
acm_set_line(acm, &acm->line);
- usb_driver_claim_interface(&acm_driver, data, acm);
+ if ( (j = usb_driver_claim_interface(&acm_driver, data, acm)) != 0) {
+ err("claim failed");
+ usb_free_urb(acm->ctrlurb);
+ kfree(acm);
+ kfree(buf);
+ return j;
+ }
tty_register_device(acm_tty_driver, minor, &intf->dev);
next prev parent reply other threads:[~2004-04-15 19:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 18:11 2.6.6-rc1: cdc-acm still (differently) broken Colin Leroy
2004-04-15 18:50 ` [linux-usb-devel] " Oliver Neukum
2004-04-15 18:54 ` David Brownell
2004-04-15 19:23 ` Colin Leroy [this message]
2004-04-15 19:59 ` David Brownell
2004-04-16 10:24 ` Colin Leroy
2004-04-16 18:44 ` David Brownell
2004-04-16 21:48 ` [PATCH] " Colin Leroy
2004-04-17 9:54 ` Colin Leroy
2004-04-15 20:24 ` Alan Stern
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=20040415212334.4a568c5a@jack.colino.net \
--to=colin@colino.net \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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