ChangeSet 1.2329.2.2, 2005/01/14 16:22:09-08:00, [EMAIL PROTECTED]

[PATCH] USB: CDC ACM module and Zoom 2985 modem

there's a bug in the acm driver's work arounds. This fixes it.

Signed-Off-By: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/class/cdc-acm.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)


diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c       2005-01-17 13:50:54 -08:00
+++ b/drivers/usb/class/cdc-acm.c       2005-01-17 13:50:54 -08:00
@@ -544,24 +544,24 @@
        
        /* normal probing*/
        if (!buffer) {
-               err("Wierd descriptor references");
+               err("Wierd descriptor references\n");
                return -EINVAL;
        }
 
        if (!buflen) {
                if (intf->cur_altsetting->endpoint->extralen && 
intf->cur_altsetting->endpoint->extra) {
-                       dev_dbg(&intf->dev,"Seeking extra descriptors on 
endpoint");
+                       dev_dbg(&intf->dev,"Seeking extra descriptors on 
endpoint\n");
                        buflen = intf->cur_altsetting->endpoint->extralen;
                        buffer = intf->cur_altsetting->endpoint->extra;
                } else {
-                       err("Zero length descriptor references");
+                       err("Zero length descriptor references\n");
                        return -EINVAL;
                }
        }
 
        while (buflen > 0) {
                if (buffer [1] != USB_DT_CS_INTERFACE) {
-                       err("skipping garbage");
+                       err("skipping garbage\n");
                        goto next_desc;
                }
 
@@ -614,14 +614,10 @@
                }
        }
        
-               if (data_interface_num != call_interface_num)
-                       dev_dbg(&intf->dev,"Seperate call control interface. 
That is not fully supported.");
+       if (data_interface_num != call_interface_num)
+               dev_dbg(&intf->dev,"Seperate call control interface. That is 
not fully supported.\n");
 
 skip_normal_probe:
-       if (usb_interface_claimed(data_interface)) { /* valid in this context */
-               dev_dbg(&intf->dev,"The data interface isn't available\n");
-               return -EBUSY;
-       }
 
        /*workaround for switched interfaces */
        if (data_interface->cur_altsetting->desc.bInterfaceClass != 
CDC_DATA_INTERFACE_TYPE) {
@@ -636,6 +632,13 @@
                        return -EINVAL;
                }
        }
+       
+       if (usb_interface_claimed(data_interface)) { /* valid in this context */
+               dev_dbg(&intf->dev,"The data interface isn't available\n");
+               return -EBUSY;
+       }
+
+
        if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
                return -EINVAL;
 



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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