On Wed, 1 Aug 2007, Alan Stern wrote:

> Okay, good work.  Thanks to your careful experiments, plus the hints
> from Oliver and Tejun, I figured out the problem.  In short, the
> attribute files were registered on the control interface but the driver
> tried to delete them from the data interface.  I'll post a patch
> tomorrow morning.

And here it is.  You can remove the earlier diagnostic patches; this 
one by itself should fix everything.

Alan Stern


Index: 2.6.22/drivers/usb/class/cdc-acm.c
===================================================================
--- 2.6.22.orig/drivers/usb/class/cdc-acm.c
+++ 2.6.22/drivers/usb/class/cdc-acm.c
@@ -919,6 +919,10 @@ skip_normal_probe:
                        return -EINVAL;
                }
        }
+
+       /* Accept probe requests only for the control interface */
+       if (intf != control_interface)
+               return -ENODEV;
        
        if (usb_interface_claimed(data_interface)) { /* valid in this context */
                dev_dbg(&intf->dev,"The data interface isn't available");
@@ -1107,10 +1111,12 @@ static void acm_disconnect(struct usb_in
                return;
        }
        if (acm->country_codes){
-               device_remove_file(&intf->dev, &dev_attr_wCountryCodes);
-               device_remove_file(&intf->dev, &dev_attr_iCountryCodeRelDate);
+               device_remove_file(&acm->control->dev,
+                               &dev_attr_wCountryCodes);
+               device_remove_file(&acm->control->dev,
+                               &dev_attr_iCountryCodeRelDate);
        }
-       device_remove_file(&intf->dev, &dev_attr_bmCapabilities);
+       device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities);
        acm->dev = NULL;
        usb_set_intfdata(acm->control, NULL);
        usb_set_intfdata(acm->data, NULL);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to