svn commit: r301206 - head/sys/dev/usb/net

Pedro F. Giffuni pfg at FreeBSD.org
Thu Jun 2 15:31:00 UTC 2016


Author: pfg
Date: Thu Jun  2 15:30:58 2016
New Revision: 301206
URL: https://svnweb.freebsd.org/changeset/base/301206

Log:
  usb/uhso: Don't bail out on first USB error.
  
  CID:		1305680
  Submitted by:	hselasky
  MFC after:	3 days

Modified:
  head/sys/dev/usb/net/uhso.c

Modified: head/sys/dev/usb/net/uhso.c
==============================================================================
--- head/sys/dev/usb/net/uhso.c	Thu Jun  2 15:14:40 2016	(r301205)
+++ head/sys/dev/usb/net/uhso.c	Thu Jun  2 15:30:58 2016	(r301206)
@@ -1225,6 +1225,7 @@ uhso_mux_write_callback(struct usb_xfer 
 		    ht->ht_muxport);
 		/* FALLTHROUGH */
 	case USB_ST_SETUP:
+tr_setup:
 		pc = usbd_xfer_get_frame(xfer, 1);
 		if (ucom_get_data(&sc->sc_ucom[ht->ht_muxport], pc,
 		    0, 32, &actlen)) {
@@ -1255,7 +1256,8 @@ uhso_mux_write_callback(struct usb_xfer 
 		UHSO_DPRINTF(0, "error: %s\n", usbd_errstr(error));
 		if (error == USB_ERR_CANCELLED)
 			break;
-		break;
+		usbd_xfer_set_stall(xfer);
+		goto tr_setup;
 	}
 }
 


More information about the svn-src-all mailing list