- usbnet doesn't need usb_interface_claimed() test, ever
since usb_driver_claim_interface() finally began to
return fault codes. - When binding secondary interfaces (CDC), don't use the
usb_driver_release_interface() calls except to clean up
after failed initialization. Instead, just let the
second disconnect() call happen -- but ignore it.I expect "cdc-acm" and "audio" should get corresponding changes.
- Dave
--- 1.75/drivers/usb/net/usbnet.c Thu Sep 18 20:41:39 2003
+++ edited/drivers/usb/net/usbnet.c Tue Oct 7 10:27:41 2003
@@ -974,8 +974,6 @@
d->bInterfaceClass);
goto bad_desc;
}
- if (usb_interface_claimed (info->data))
- return -EBUSY;
break;
case 0x0F: /* Ethernet Networking */
if (info->ether) {
@@ -1017,7 +1015,7 @@
/* claim data interface and set it up ... with side effects.
* network traffic can't flow until an altsetting is enabled.
*/
- status = usb_driver_claim_interface (&usbnet_driver, info->data, dev);
+ status = usb_driver_claim_interface (&usbnet_driver, info->data, 0);
if (status < 0)
return status;
status = get_endpoints (dev, info->data);
@@ -2889,6 +2890,8 @@
dev = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
+
+ /* secondary interfaces take this path */
if (!dev)
return;
@@ -2902,9 +2905,6 @@
/* we don't hold rtnl here ... */
flush_scheduled_work ();
-
- if (dev->driver_info->unbind)
- dev->driver_info->unbind (dev, intf);
kfree(dev->net);
kfree (dev);
