One of them prevents certain devices from binding to the driver;
probably it'd affect most host-to-host network links.  The other
just prevents some bogus error statistics.  Please merge!

- Dave
Two bugfixes to usbnet.  The important one is that it's OK when the
minidriver doesn't want to use a status endpoint.  That shouldn't
be treated as an error ... errors prevent probe() from succeeding!

The minor fix is that software driven interface shutdown should neither
be accounted as an error, nor generate a diagnostic.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

--- 1.128/drivers/usb/net/usbnet.c	2005-03-09 13:47:16 -08:00
+++ edited/drivers/usb/net/usbnet.c	2005-03-21 01:04:33 -08:00
@@ -390,7 +390,7 @@
 	unsigned	period;
 
 	if (!dev->driver_info->status)
-		return -ENODEV;
+		return 0;
 
 	pipe = usb_rcvintpipe (dev->udev,
 			dev->status->desc.bEndpointAddress
@@ -3319,6 +3319,11 @@
 		switch (urb->status) {
 		case -EPIPE:
 			defer_kevent (dev, EVENT_TX_HALT);
+			break;
+
+		/* software-driven interface shutdown */
+		case -ECONNRESET:		// async unlink
+		case -ESHUTDOWN:		// hardware gone
 			break;
 
 		// like rx, tx gets controller i/o faults during khubd delays

Reply via email to