Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2008 21:31:35 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 132916 for review
Message-ID:  <200801092131.m09LVZOB045690@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132916

Change 132916 by hselasky@hselasky_laptop001 on 2008/01/09 21:31:12

	
	Mark all USB errors as such. Scripted by:
	
	sed -e "s/USBD_NORMAL_COMPLETION/USBD_ERR_NORMAL_COMPLETION/g" |
	sed -e "s/USBD_PENDING_REQUESTS/USBD_ERR_PENDING_REQUESTS/g" |
	sed -e "s/USBD_NOT_STARTED/USBD_ERR_NOT_STARTED/g" |
	sed -e "s/USBD_INVAL/USBD_ERR_INVAL/g" |
	sed -e "s/USBD_NOMEM/USBD_ERR_NOMEM/g" |
	sed -e "s/USBD_CANCELLED/USBD_ERR_CANCELLED/g" |
	sed -e "s/USBD_BAD_ADDRESS/USBD_ERR_BAD_ADDRESS/g" |
	sed -e "s/USBD_BAD_BUFSIZE/USBD_ERR_BAD_BUFSIZE/g" |
	sed -e "s/USBD_BAD_FLAG/USBD_ERR_BAD_FLAG/g" |
	sed -e "s/USBD_NO_CALLBACK/USBD_ERR_NO_CALLBACK/g" |
	sed -e "s/USBD_IN_USE/USBD_ERR_IN_USE/g" |
	sed -e "s/USBD_NO_ADDR/USBD_ERR_NO_ADDR/g" |
	sed -e "s/USBD_NO_PIPE/USBD_ERR_NO_PIPE/g" |
	sed -e "s/USBD_ZERO_NFRAMES/USBD_ERR_ZERO_NFRAMES/g" |
	sed -e "s/USBD_ZERO_MAXP/USBD_ERR_ZERO_MAXP/g" |
	sed -e "s/USBD_SET_ADDR_FAILED/USBD_ERR_SET_ADDR_FAILED/g" |
	sed -e "s/USBD_NO_POWER/USBD_ERR_NO_POWER/g" |
	sed -e "s/USBD_TOO_DEEP/USBD_ERR_TOO_DEEP/g" |
	sed -e "s/USBD_IOERROR/USBD_ERR_IOERROR/g" |
	sed -e "s/USBD_NOT_CONFIGURED/USBD_ERR_NOT_CONFIGURED/g" |
	sed -e "s/USBD_TIMEOUT/USBD_ERR_TIMEOUT/g" |
	sed -e "s/USBD_SHORT_XFER/USBD_ERR_SHORT_XFER/g" |
	sed -e "s/USBD_STALLED/USBD_ERR_STALLED/g" |
	sed -e "s/USBD_INTERRUPTED/USBD_ERR_INTERRUPTED/g" |
	sed -e "s/USBD_DMA_LOAD_FAILED/USBD_ERR_DMA_LOAD_FAILED/g" |
	sed -e "s/USBD_BAD_CONTEXT/USBD_ERR_BAD_CONTEXT/g" |
	sed -e "s/USBD_NO_ROOT_HUB/USBD_ERR_NO_ROOT_HUB/g" |
	sed -e "s/USBD_NO_INTR_THREAD/USBD_ERR_NO_INTR_THREAD/g"

Affected files ...

.. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#32 edit
.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#31 edit
.. //depot/projects/usb/src/sys/dev/usb/README#33 edit
.. //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#69 edit
.. //depot/projects/usb/src/sys/dev/usb/if_aue.c#43 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#45 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#47 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cue.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kue.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rue.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rum.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/if_udav.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#51 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#35 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#56 edit
.. //depot/projects/usb/src/sys/dev/usb/uark.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/ubsa.c#36 edit
.. //depot/projects/usb/src/sys/dev/usb/ubser.c#28 edit
.. //depot/projects/usb/src/sys/dev/usb/ucycom.c#31 edit
.. //depot/projects/usb/src/sys/dev/usb/udbp.c#24 edit
.. //depot/projects/usb/src/sys/dev/usb/ufoma.c#38 edit
.. //depot/projects/usb/src/sys/dev/usb/uftdi.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/ugen.c#36 edit
.. //depot/projects/usb/src/sys/dev/usb/ugensa.c#20 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci.c#57 edit
.. //depot/projects/usb/src/sys/dev/usb/uhid.c#30 edit
.. //depot/projects/usb/src/sys/dev/usb/uhub.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/uipaq.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/ukbd.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/ulpt.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/umass.c#42 edit
.. //depot/projects/usb/src/sys/dev/usb/umct.c#30 edit
.. //depot/projects/usb/src/sys/dev/usb/umodem.c#40 edit
.. //depot/projects/usb/src/sys/dev/usb/umoscom.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/ums.c#38 edit
.. //depot/projects/usb/src/sys/dev/usb/uplcom.c#38 edit
.. //depot/projects/usb/src/sys/dev/usb/urio.c#24 edit
.. //depot/projects/usb/src/sys/dev/usb/usb.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/usb.h#31 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#11 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#83 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#92 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_template.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#102 edit
.. //depot/projects/usb/src/sys/dev/usb/uscanner.c#23 edit
.. //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#6 edit
.. //depot/projects/usb/src/sys/dev/usb/uvisor.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/uvscom.c#36 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#25 edit
.. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#20 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#32 (text) ====

@@ -637,7 +637,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error == USBD_CANCELLED) {
+		if (xfer->error == USBD_ERR_CANCELLED) {
 			atausb_tr_error(xfer);
 		} else {
 			atausb_transfer_start(sc, ATAUSB_T_BBB_DATA_RD_CS);
@@ -691,7 +691,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error == USBD_CANCELLED) {
+		if (xfer->error == USBD_ERR_CANCELLED) {
 			atausb_tr_error(xfer);
 		} else {
 			atausb_transfer_start(sc, ATAUSB_T_BBB_DATA_WR_CS);
@@ -794,7 +794,7 @@
 
 	default:
 tr_error:
-		if ((xfer->error == USBD_CANCELLED) ||
+		if ((xfer->error == USBD_ERR_CANCELLED) ||
 		    (sc->status_try)) {
 			atausb_tr_error(xfer);
 		} else {
@@ -834,7 +834,7 @@
 {
 	struct atausb_softc *sc = xfer->priv_sc;
 
-	if (xfer->error != USBD_CANCELLED) {
+	if (xfer->error != USBD_ERR_CANCELLED) {
 
 		if (atausbdebug) {
 			device_printf(sc->dev, "transfer failed, %s, in state %d "

==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#31 (text+ko) ====

@@ -1264,7 +1264,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error == USBD_CANCELLED) {
+		if (xfer->error == USBD_ERR_CANCELLED) {
 			return;
 		}
 		goto tr_transferred;
@@ -1341,7 +1341,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error == USBD_CANCELLED) {
+		if (xfer->error == USBD_ERR_CANCELLED) {
 			return;
 		}
 		goto tr_transferred;
@@ -3312,7 +3312,7 @@
 
 		DPRINTF(0, "error=%s\n", usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			chan->flags |= UMIDI_FLAG_READ_STALL;
 			usbd_transfer_start(chan->xfer[3]);
@@ -3558,7 +3558,7 @@
 
 		DPRINTF(0, "error=%s\n", usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			chan->flags |= UMIDI_FLAG_WRITE_STALL;
 			usbd_transfer_start(chan->xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/README#33 (text+ko) ====

@@ -227,7 +227,7 @@
 NOTE: this function must be called with "priv_mtx" locked
 
 NOTE: if the transfer was in progress, the callback will called with 
-      "xfer->error=USBD_CANCELLED", before this function returns
+      "xfer->error=USBD_ERR_CANCELLED", before this function returns
 
 /*------------------------------------------------------------------------*
  * struct usbd_config {
@@ -321,13 +321,13 @@
 	has timed out. This flag can be changed during operation.
 
 	NOTE: If polling is used the "timeout" field should be non-zero!
-	NOTE: USBD_CANCELLED is returned in case of timeout
-	      instead of USBD_TIMEOUT!
+	NOTE: USBD_ERR_CANCELLED is returned in case of timeout
+	      instead of USBD_ERR_TIMEOUT!
 
   pipe_bof
 	This flag causes a failing USB transfer to remain first
 	in the PIPE queue except in the case of "xfer->error" equal
-	to "USBD_CANCELLED". No other USB transfers in the affected
+	to "USBD_ERR_CANCELLED". No other USB transfers in the affected
 	PIPE queue will be started until either:
 
 	1) The failing USB transfer is stopped using "usbd_transfer_stop()".
@@ -371,7 +371,7 @@
 	operation.
 
   no_pipe_ok
-	Setting this flag causes the USBD_NO_PIPE error to be
+	Setting this flag causes the USBD_ERR_NO_PIPE error to be
 	ignored. This flag can not be changed during operation.
 
   stall_pipe

==== //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#13 (text+ko) ====

@@ -1059,7 +1059,7 @@
 	mtx_assert(&sc->sc_bus.mtx, MA_OWNED);
 
 	/* transfer is transferred */
-	at9100_dci_device_done(xfer, USBD_TIMEOUT);
+	at9100_dci_device_done(xfer, USBD_ERR_TIMEOUT);
 
 	/* queue callback for execution */
 	usbd_callback_wrapper(xfer, NULL, USBD_CONTEXT_CALLBACK);
@@ -1198,7 +1198,7 @@
 	xfer->td_transfer_cache = td;
 
 	return (error ?
-	    USBD_STALLED : USBD_NORMAL_COMPLETION);
+	    USBD_ERR_STALLED : USBD_ERR_NORMAL_COMPLETION);
 }
 
 static void
@@ -1289,7 +1289,7 @@
 
 	if (xfer) {
 		/* cancel any ongoing transfers */
-		at9100_dci_device_done(xfer, USBD_STALLED);
+		at9100_dci_device_done(xfer, USBD_ERR_STALLED);
 	}
 	/* set FORCESTALL */
 	sc = AT9100_DCI_BUS2SC(udev->bus);
@@ -1569,7 +1569,7 @@
 static void
 at9100_dci_device_bulk_close(struct usbd_xfer *xfer)
 {
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -1610,7 +1610,7 @@
 static void
 at9100_dci_device_ctrl_close(struct usbd_xfer *xfer)
 {
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -1651,7 +1651,7 @@
 static void
 at9100_dci_device_intr_close(struct usbd_xfer *xfer)
 {
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -1692,7 +1692,7 @@
 static void
 at9100_dci_device_isoc_fs_close(struct usbd_xfer *xfer)
 {
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -1785,7 +1785,7 @@
 	if (sc->sc_root_ctrl.xfer == xfer) {
 		sc->sc_root_ctrl.xfer = NULL;
 	}
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2209,7 +2209,7 @@
 		sc->sc_flags.change_suspend = 0;
 		break;
 	default:
-		std->err = USBD_IOERROR;
+		std->err = USBD_ERR_IOERROR;
 		goto done;
 	}
 	goto tr_valid;
@@ -2234,7 +2234,7 @@
 		sc->sc_flags.port_powered = 1;
 		break;
 	default:
-		std->err = USBD_IOERROR;
+		std->err = USBD_ERR_IOERROR;
 		goto done;
 	}
 	goto tr_valid;
@@ -2308,7 +2308,7 @@
 	goto tr_valid;
 
 tr_stalled:
-	std->err = USBD_STALLED;
+	std->err = USBD_ERR_STALLED;
 tr_valid:
 done:
 	return;
@@ -2347,7 +2347,7 @@
 	if (sc->sc_root_intr.xfer == xfer) {
 		sc->sc_root_intr.xfer = NULL;
 	}
-	at9100_dci_device_done(xfer, USBD_CANCELLED);
+	at9100_dci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2451,7 +2451,7 @@
 
 		if (pf == NULL) {
 			/* should not happen */
-			parm->err = USBD_INVAL;
+			parm->err = USBD_ERR_INVAL;
 			return;
 		}
 	} else {

==== //depot/projects/usb/src/sys/dev/usb/ehci.c#69 (text+ko) ====

@@ -191,7 +191,7 @@
 	}
 
 	if (hcr) {
-		return (USBD_IOERROR);
+		return (USBD_ERR_IOERROR);
 	}
 	return (0);
 }
@@ -258,7 +258,7 @@
 	 */
 	if (EHCI_CMD_FLS(EOREAD4(sc, EHCI_USBCMD)) == 3) {
 		device_printf(sc->sc_bus.bdev, "invalid frame-list-size\n");
-		err = USBD_IOERROR;
+		err = USBD_ERR_IOERROR;
 		goto done;
 	}
 	/* set up the bus struct */
@@ -475,7 +475,7 @@
 	}
 	if (hcr) {
 		device_printf(sc->sc_bus.bdev, "run timeout\n");
-		err = USBD_IOERROR;
+		err = USBD_ERR_IOERROR;
 		goto done;
 	}
 done:
@@ -1215,7 +1215,7 @@
 #endif
 
 	return ((status & EHCI_QTD_HALTED) ?
-	    USBD_STALLED : USBD_NORMAL_COMPLETION);
+	    USBD_ERR_STALLED : USBD_ERR_NORMAL_COMPLETION);
 }
 
 static void
@@ -1303,7 +1303,7 @@
 		status |= le32toh(td->sitd_status);
 
 		if (!(status & EHCI_SITD_ACTIVE)) {
-			ehci_device_done(xfer, USBD_NORMAL_COMPLETION);
+			ehci_device_done(xfer, USBD_ERR_NORMAL_COMPLETION);
 			goto transferred;
 		}
 	} else if (methods == &ehci_device_isoc_hs_methods) {
@@ -1330,7 +1330,7 @@
 
 		/* if no transactions are active we continue */
 		if (!(status & htole32(EHCI_ITD_ACTIVE))) {
-			ehci_device_done(xfer, USBD_NORMAL_COMPLETION);
+			ehci_device_done(xfer, USBD_ERR_NORMAL_COMPLETION);
 			goto transferred;
 		}
 	} else {
@@ -1518,7 +1518,7 @@
 	mtx_assert(&sc->sc_bus.mtx, MA_OWNED);
 
 	/* transfer is transferred */
-	ehci_device_done(xfer, USBD_TIMEOUT);
+	ehci_device_done(xfer, USBD_ERR_TIMEOUT);
 
 	/* queue callback for execution */
 	usbd_callback_wrapper(xfer, NULL, USBD_CONTEXT_CALLBACK);
@@ -2158,7 +2158,7 @@
 static void
 ehci_device_bulk_close(struct usbd_xfer *xfer)
 {
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2208,7 +2208,7 @@
 static void
 ehci_device_ctrl_close(struct usbd_xfer *xfer)
 {
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2314,7 +2314,7 @@
 
 	sc->sc_intr_stat[xfer->qh_pos]--;
 
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2399,7 +2399,7 @@
 static void
 ehci_device_isoc_fs_close(struct usbd_xfer *xfer)
 {
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2682,7 +2682,7 @@
 static void
 ehci_device_isoc_hs_close(struct usbd_xfer *xfer)
 {
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -2939,7 +2939,7 @@
 	if (sc->sc_root_ctrl.xfer == xfer) {
 		sc->sc_root_ctrl.xfer = NULL;
 	}
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -3119,7 +3119,7 @@
 		switch (value >> 8) {
 		case UDESC_DEVICE:
 			if ((value & 0xff) != 0) {
-				std->err = USBD_IOERROR;
+				std->err = USBD_ERR_IOERROR;
 				goto done;
 			}
 			std->len = sizeof(ehci_devd);
@@ -3132,7 +3132,7 @@
 			 */
 		case UDESC_DEVICE_QUALIFIER:
 			if ((value & 0xff) != 0) {
-				std->err = USBD_IOERROR;
+				std->err = USBD_ERR_IOERROR;
 				goto done;
 			}
 			std->len = sizeof(ehci_odevd);
@@ -3141,7 +3141,7 @@
 
 		case UDESC_CONFIG:
 			if ((value & 0xff) != 0) {
-				std->err = USBD_IOERROR;
+				std->err = USBD_ERR_IOERROR;
 				goto done;
 			}
 			std->len = sizeof(ehci_confd);
@@ -3173,7 +3173,7 @@
 			    ptr);
 			break;
 		default:
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		break;
@@ -3192,14 +3192,14 @@
 		break;
 	case C(UR_SET_ADDRESS, UT_WRITE_DEVICE):
 		if (value >= USB_MAX_DEVICES) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		sc->sc_addr = value;
 		break;
 	case C(UR_SET_CONFIG, UT_WRITE_DEVICE):
 		if ((value != 0) && (value != 1)) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		sc->sc_conf = value;
@@ -3209,7 +3209,7 @@
 	case C(UR_SET_FEATURE, UT_WRITE_DEVICE):
 	case C(UR_SET_FEATURE, UT_WRITE_INTERFACE):
 	case C(UR_SET_FEATURE, UT_WRITE_ENDPOINT):
-		std->err = USBD_IOERROR;
+		std->err = USBD_ERR_IOERROR;
 		goto done;
 	case C(UR_SET_INTERFACE, UT_WRITE_INTERFACE):
 		break;
@@ -3223,7 +3223,7 @@
 
 		if ((index < 1) ||
 		    (index > sc->sc_noport)) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		port = EHCI_PORTSC(index);
@@ -3263,7 +3263,7 @@
 			sc->sc_isreset = 0;
 			break;
 		default:
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 #if 0
@@ -3286,7 +3286,7 @@
 		break;
 	case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE):
 		if ((value & 0xff) != 0) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		v = EOREAD4(sc, EHCI_HCSPARAMS);
@@ -3314,7 +3314,7 @@
 		    index));
 		if ((index < 1) ||
 		    (index > sc->sc_noport)) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		v = EOREAD4(sc, EHCI_PORTSC(index));
@@ -3346,14 +3346,14 @@
 		std->len = sizeof(sc->sc_hub_desc.ps);
 		break;
 	case C(UR_SET_DESCRIPTOR, UT_WRITE_CLASS_DEVICE):
-		std->err = USBD_IOERROR;
+		std->err = USBD_ERR_IOERROR;
 		goto done;
 	case C(UR_SET_FEATURE, UT_WRITE_CLASS_DEVICE):
 		break;
 	case C(UR_SET_FEATURE, UT_WRITE_CLASS_OTHER):
 		if ((index < 1) ||
 		    (index > sc->sc_noport)) {
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		port = EHCI_PORTSC(index);
@@ -3404,7 +3404,7 @@
 			if (v & EHCI_PS_PR) {
 				device_printf(sc->sc_bus.bdev,
 				    "port reset timeout\n");
-				std->err = USBD_TIMEOUT;
+				std->err = USBD_ERR_TIMEOUT;
 				goto done;
 			}
 			if (!(v & EHCI_PS_PE)) {
@@ -3435,7 +3435,7 @@
 			break;
 
 		default:
-			std->err = USBD_IOERROR;
+			std->err = USBD_ERR_IOERROR;
 			goto done;
 		}
 		break;
@@ -3445,7 +3445,7 @@
 	case C(UR_STOP_TT, UT_WRITE_CLASS_OTHER):
 		break;
 	default:
-		std->err = USBD_IOERROR;
+		std->err = USBD_ERR_IOERROR;
 		goto done;
 	}
 done:
@@ -3485,7 +3485,7 @@
 	if (sc->sc_root_intr.xfer == xfer) {
 		sc->sc_root_intr.xfer = NULL;
 	}
-	ehci_device_done(xfer, USBD_CANCELLED);
+	ehci_device_done(xfer, USBD_ERR_CANCELLED);
 	return;
 }
 
@@ -3671,7 +3671,7 @@
 		if (usbd_transfer_setup_sub_malloc(
 		    parm, &page_info, &pc, sizeof(*td),
 		    EHCI_ITD_ALIGN)) {
-			parm->err = USBD_NOMEM;
+			parm->err = USBD_ERR_NOMEM;
 			break;
 		}
 		if (parm->buf) {
@@ -3696,7 +3696,7 @@
 		if (usbd_transfer_setup_sub_malloc(
 		    parm, &page_info, &pc, sizeof(*td),
 		    EHCI_SITD_ALIGN)) {
-			parm->err = USBD_NOMEM;
+			parm->err = USBD_ERR_NOMEM;
 			break;
 		}
 		if (parm->buf) {
@@ -3721,7 +3721,7 @@
 		if (usbd_transfer_setup_sub_malloc(
 		    parm, &page_info, &pc, sizeof(*qtd),
 		    EHCI_QTD_ALIGN)) {
-			parm->err = USBD_NOMEM;
+			parm->err = USBD_ERR_NOMEM;
 			break;
 		}
 		if (parm->buf) {
@@ -3750,7 +3750,7 @@
 		if (usbd_transfer_setup_sub_malloc(
 		    parm, &page_info, &pc, sizeof(*qh),
 		    EHCI_QH_ALIGN)) {
-			parm->err = USBD_NOMEM;
+			parm->err = USBD_ERR_NOMEM;
 			break;
 		}
 		if (parm->buf) {

==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#43 (text+ko) ====

@@ -1025,7 +1025,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			sc->sc_flags |= AUE_FLAG_INTR_STALL;
 			usbd_transfer_start(sc->sc_xfer[5]);
@@ -1125,7 +1125,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= AUE_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1228,7 +1228,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= AUE_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#45 (text+ko) ====

@@ -982,7 +982,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			sc->sc_flags |= AXE_FLAG_INTR_STALL;
 			usbd_transfer_start(sc->sc_xfer[5]);
@@ -1132,7 +1132,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= AXE_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1255,7 +1255,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= AXE_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#47 (text+ko) ====

@@ -443,7 +443,7 @@
 	    UDESC_CS_INTERFACE, 0 - 1, UDESCSUB_CDC_ENF, 0 - 1);
 
 	if ((ue == NULL) || (ue->bLength < sizeof(*ue))) {
-		error = USBD_INVAL;
+		error = USBD_ERR_INVAL;
 	} else {
 		error = usbreq_get_string_any
 		    (uaa->device, &Giant, eaddr_str,
@@ -781,7 +781,7 @@
 		/* free all previous mbufs */
 		cdce_free_mq(&(sc->sc_tx_mq));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;
@@ -873,7 +873,7 @@
 		cdce_free_mq(&(sc->sc_tx_mq));
 		ifp->if_oerrors++;
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;
@@ -1248,7 +1248,7 @@
 		DPRINTF(sc, 0, "error = %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;
@@ -1264,7 +1264,7 @@
 	 *
 	 * By safe we mean that if "usbd_transfer_stop()" is called,
 	 * we will get a callback having the error code
-	 * USBD_CANCELLED.
+	 * USBD_ERR_CANCELLED.
 	 */
 	if (fwd_mq) {
 		cdce_fwd_mq(sc, &(sc->sc_rx_mq));
@@ -1344,7 +1344,7 @@
 		/* free all mbufs */
 		cdce_free_mq(&(sc->sc_rx_mq));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;
@@ -1359,7 +1359,7 @@
 	 *
 	 * By safe we mean that if "usbd_transfer_stop()" is called,
 	 * we will get a callback having the error code
-	 * USBD_CANCELLED.
+	 * USBD_ERR_CANCELLED.
 	 */
 	if (m_rx) {
 		mtx_unlock(&(sc->sc_mtx));
@@ -1437,7 +1437,7 @@
 		break;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;
@@ -1471,7 +1471,7 @@
 		break;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			xfer->flags.stall_pipe = 1;
 			goto tr_setup;

==== //depot/projects/usb/src/sys/dev/usb/if_cue.c#39 (text+ko) ====

@@ -696,7 +696,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= CUE_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -832,7 +832,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= CUE_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_kue.c#41 (text+ko) ====

@@ -734,7 +734,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= KUE_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -825,7 +825,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= KUE_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_rue.c#39 (text+ko) ====

@@ -917,7 +917,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			sc->sc_flags |= RUE_FLAG_INTR_STALL;
 			usbd_transfer_start(sc->sc_xfer[5]);
@@ -1009,7 +1009,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= RUE_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1103,7 +1103,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= RUE_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_rum.c#26 (text+ko) ====

@@ -1135,7 +1135,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= RUM_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1562,7 +1562,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= RUM_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_udav.c#41 (text+ko) ====

@@ -952,7 +952,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= UDAV_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);
@@ -1056,7 +1056,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= UDAV_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1100,7 +1100,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* start clear stall */
 			sc->sc_flags |= UDAV_FLAG_INTR_STALL;
 			usbd_transfer_start(sc->sc_xfer[5]);

==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#51 (text+ko) ====

@@ -1144,7 +1144,7 @@
 		return;
 
 	default:			/* Error */
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= URAL_FLAG_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[3]);
@@ -1599,7 +1599,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= URAL_FLAG_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[2]);

==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#35 (text+ko) ====

@@ -449,7 +449,7 @@
 		DPRINTF(sc, 2, "error = %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= ZYD_FLAG_INTR_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_RD]);
@@ -638,7 +638,7 @@
 		DPRINTF(sc, 2, "error = %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= ZYD_FLAG_INTR_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_WR]);
@@ -979,7 +979,7 @@
 	default:			/* Error */
 		DPRINTF(sc, 0, "frame error: %s\n", usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= ZYD_FLAG_BULK_READ_STALL;
 			usbd_transfer_start(sc->sc_xfer[ZYD_TR_BULK_CS_RD]);
@@ -2868,7 +2868,7 @@
 		DPRINTF(sc, 10, "transfer error, %s\n",
 		    usbd_errstr(xfer->error));
 
-		if (xfer->error != USBD_CANCELLED) {
+		if (xfer->error != USBD_ERR_CANCELLED) {
 			/* try to clear stall first */
 			sc->sc_flags |= ZYD_FLAG_BULK_WRITE_STALL;
 			usbd_transfer_start(sc->sc_xfer[ZYD_TR_BULK_CS_WR]);

==== //depot/projects/usb/src/sys/dev/usb/ohci.c#56 (text+ko) ====

@@ -241,7 +241,7 @@
 	}
 	if (hcr) {
 		device_printf(sc->sc_bus.bdev, "reset timeout\n");
-		return (USBD_IOERROR);
+		return (USBD_ERR_IOERROR);
 	}
 #ifdef USB_DEBUG
 	if (ohcidebug > 15) {
@@ -305,7 +305,7 @@
 		ohci_dumpregs(sc);
 	}
 #endif
-	return (USBD_NORMAL_COMPLETION);
+	return (USBD_ERR_NORMAL_COMPLETION);
 }
 
 static struct ohci_ed *
@@ -434,12 +434,12 @@
 
 	if (ohci_controller_init(sc)) {
 		mtx_unlock(&sc->sc_bus.mtx);
-		return (USBD_INVAL);
+		return (USBD_ERR_INVAL);
 	} else {
 		mtx_unlock(&sc->sc_bus.mtx);
 		/* catch any lost interrupts */
 		ohci_do_poll(&(sc->sc_bus));
-		return (USBD_NORMAL_COMPLETION);
+		return (USBD_ERR_NORMAL_COMPLETION);
 	}
 }
 
@@ -816,7 +816,7 @@
 	}
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801092131.m09LVZOB045690>