public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.6-rc1: cdc-acm still (differently) broken
@ 2004-04-15 18:11 Colin Leroy
  2004-04-15 18:50 ` [linux-usb-devel] " Oliver Neukum
  2004-04-15 18:54 ` David Brownell
  0 siblings, 2 replies; 10+ messages in thread
From: Colin Leroy @ 2004-04-15 18:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Hi,

cdc-acm was broken since after 2.6.4, due to the alt_cursetting changes. I sent a patch, which has been integrated (well, the same one has ;-)) not long ago.
I gave 2.6.6-rc1 a try, and found that cdc-acm is now broken is a new way:
when plugging the phone, acm_probe() fails on interface #0; I traced the problem to this: usb_interface_claimed() returns true - and in fact intf->dev.driver is already cdc-acm (despite the fact that this is the first call to acm_probe() !), for reasons beyond my comprehension.

But, even if the interface is claimed, the intfdata hasn't been set, which allows to do another check: the attached patch fixes this bug. 

HTH,
-- 
Colin

[-- Attachment #2: cdc-acm.patch --]
[-- Type: application/octet-stream, Size: 468 bytes --]

--- drivers/usb/class/cdc-acm.c.orig	2004-04-15 20:04:47.051145144 +0200
+++ drivers/usb/class/cdc-acm.c	2004-04-15 20:05:52.419207688 +0200
@@ -585,7 +585,8 @@
 
 		for (j = 0; j < cfacm->desc.bNumInterfaces - 1; j++) {
 		    
-			if (usb_interface_claimed(cfacm->interface[j]) ||
+			if ((usb_interface_claimed(cfacm->interface[j]) 
+				&& usb_get_intfdata(cfacm->interface[j]) != NULL ) ||
 			    usb_interface_claimed(cfacm->interface[j + 1]))
 				continue;
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-17 10:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox