Module Name:    src
Committed By:   skrll
Date:           Fri Dec  5 13:23:38 UTC 2014

Modified Files:
        src/sys/arch/arm/allwinner [nick-nhusb]: awin_usb.c
        src/sys/arch/arm/at91 [nick-nhusb]: at91ohci.c
        src/sys/arch/arm/broadcom [nick-nhusb]: bcm53xx_usb.c
        src/sys/arch/arm/ep93xx [nick-nhusb]: epohci.c
        src/sys/arch/arm/gemini [nick-nhusb]: obio_ehci.c
        src/sys/arch/arm/imx [nick-nhusb]: imxusb.c
        src/sys/arch/arm/omap [nick-nhusb]: obio_ohci.c omapl1x_ohci.c
        src/sys/arch/arm/s3c2xx0 [nick-nhusb]: ohci_s3c24x0.c
        src/sys/arch/arm/samsung [nick-nhusb]: exynos_usb.c
        src/sys/arch/arm/xscale [nick-nhusb]: pxa2x0_ohci.c
        src/sys/arch/hpcmips/dev [nick-nhusb]: plumohci.c
        src/sys/arch/i386/pci [nick-nhusb]: gcscehci.c
        src/sys/arch/mips/alchemy/dev [nick-nhusb]: ohci_aubus.c
        src/sys/arch/mips/atheros/dev [nick-nhusb]: ehci_arbus.c ohci_arbus.c
        src/sys/arch/mips/ralink [nick-nhusb]: ralink_ehci.c ralink_ohci.c
        src/sys/arch/mips/rmi [nick-nhusb]: rmixl_ehci.c rmixl_ohci.c
        src/sys/arch/playstation2/dev [nick-nhusb]: ohci_sbus.c
        src/sys/dev/cardbus [nick-nhusb]: ehci_cardbus.c ohci_cardbus.c
            uhci_cardbus.c
        src/sys/dev/marvell [nick-nhusb]: ehci_mv.c
        src/sys/dev/pci [nick-nhusb]: ehci_pci.c ohci_pci.c uhci_pci.c
        src/sys/dev/usb [nick-nhusb]: ehci.c ehcivar.h motg.c motgvar.h ohci.c
            ohcivar.h uhci.c uhcivar.h

Log Message:
Use int for return type for [eou]chi_init and motg_init.


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/sys/arch/arm/allwinner/awin_usb.c
cvs rdiff -u -r1.5.28.3 -r1.5.28.4 src/sys/arch/arm/at91/at91ohci.c
cvs rdiff -u -r1.6.4.1 -r1.6.4.2 src/sys/arch/arm/broadcom/bcm53xx_usb.c
cvs rdiff -u -r1.7.14.3 -r1.7.14.4 src/sys/arch/arm/ep93xx/epohci.c
cvs rdiff -u -r1.3.16.1 -r1.3.16.2 src/sys/arch/arm/gemini/obio_ehci.c
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/arch/arm/imx/imxusb.c
cvs rdiff -u -r1.10.6.1 -r1.10.6.2 src/sys/arch/arm/omap/obio_ohci.c
cvs rdiff -u -r1.1.12.3 -r1.1.12.4 src/sys/arch/arm/omap/omapl1x_ohci.c
cvs rdiff -u -r1.8.30.3 -r1.8.30.4 src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/sys/arch/arm/samsung/exynos_usb.c
cvs rdiff -u -r1.9.14.1 -r1.9.14.2 src/sys/arch/arm/xscale/pxa2x0_ohci.c
cvs rdiff -u -r1.14.14.3 -r1.14.14.4 src/sys/arch/hpcmips/dev/plumohci.c
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/sys/arch/i386/pci/gcscehci.c
cvs rdiff -u -r1.15.30.3 -r1.15.30.4 \
    src/sys/arch/mips/alchemy/dev/ohci_aubus.c
cvs rdiff -u -r1.2.16.2 -r1.2.16.3 src/sys/arch/mips/atheros/dev/ehci_arbus.c
cvs rdiff -u -r1.1.30.2 -r1.1.30.3 src/sys/arch/mips/atheros/dev/ohci_arbus.c
cvs rdiff -u -r1.5.4.1 -r1.5.4.2 src/sys/arch/mips/ralink/ralink_ehci.c
cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/sys/arch/mips/ralink/ralink_ohci.c
cvs rdiff -u -r1.5.16.2 -r1.5.16.3 src/sys/arch/mips/rmi/rmixl_ehci.c
cvs rdiff -u -r1.4.30.2 -r1.4.30.3 src/sys/arch/mips/rmi/rmixl_ohci.c
cvs rdiff -u -r1.11.8.3 -r1.11.8.4 src/sys/arch/playstation2/dev/ohci_sbus.c
cvs rdiff -u -r1.32.2.2 -r1.32.2.3 src/sys/dev/cardbus/ehci_cardbus.c
cvs rdiff -u -r1.40.2.2 -r1.40.2.3 src/sys/dev/cardbus/ohci_cardbus.c
cvs rdiff -u -r1.21.2.2 -r1.21.2.3 src/sys/dev/cardbus/uhci_cardbus.c
cvs rdiff -u -r1.5.6.2 -r1.5.6.3 src/sys/dev/marvell/ehci_mv.c
cvs rdiff -u -r1.59.2.2 -r1.59.2.3 src/sys/dev/pci/ehci_pci.c
cvs rdiff -u -r1.53.2.1 -r1.53.2.2 src/sys/dev/pci/ohci_pci.c
cvs rdiff -u -r1.58.2.2 -r1.58.2.3 src/sys/dev/pci/uhci_pci.c
cvs rdiff -u -r1.234.2.14 -r1.234.2.15 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.42.14.4 -r1.42.14.5 src/sys/dev/usb/ehcivar.h
cvs rdiff -u -r1.12.2.10 -r1.12.2.11 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/dev/usb/motgvar.h
cvs rdiff -u -r1.254.2.13 -r1.254.2.14 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.55.6.3 -r1.55.6.4 src/sys/dev/usb/ohcivar.h
cvs rdiff -u -r1.264.4.13 -r1.264.4.14 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.52.14.3 -r1.52.14.4 src/sys/dev/usb/uhcivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_usb.c
diff -u src/sys/arch/arm/allwinner/awin_usb.c:1.17.2.2 src/sys/arch/arm/allwinner/awin_usb.c:1.17.2.3
--- src/sys/arch/arm/allwinner/awin_usb.c:1.17.2.2	Wed Dec  3 12:52:04 2014
+++ src/sys/arch/arm/allwinner/awin_usb.c	Fri Dec  5 13:23:37 2014
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.17.2.2 2014/12/03 12:52:04 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.17.2.3 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -140,7 +140,7 @@ ohci_awinusb_attach(device_t parent, dev
 	aprint_normal(": OHCI USB controller\n");
 
 	int error = ohci_init(sc);
-	if (error != USBD_NORMAL_COMPLETION) {
+	if (error) {
 		aprint_error_dev(self, "init failed, error=%d\n", error);
 		return;
 	}

Index: src/sys/arch/arm/at91/at91ohci.c
diff -u src/sys/arch/arm/at91/at91ohci.c:1.5.28.3 src/sys/arch/arm/at91/at91ohci.c:1.5.28.4
--- src/sys/arch/arm/at91/at91ohci.c:1.5.28.3	Fri Dec  5 09:37:48 2014
+++ src/sys/arch/arm/at91/at91ohci.c	Fri Dec  5 13:23:37 2014
@@ -1,5 +1,5 @@
-/*	$Id: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $	*/
-/*	$NetBSD: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $	*/
+/*	$Id: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $	*/
+/*	$NetBSD: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007 Embedtronics Oy.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,7 +121,6 @@ void
 at91ohci_callback(device_t self)
 {
 	struct at91ohci_softc *sc = device_private(self);
-	usbd_status r;
 
 	/* Disable interrupts, so we don't get any spurious ones. */
 	bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -130,10 +129,10 @@ at91ohci_callback(device_t self)
 	strlcpy(sc->sc.sc_vendor, "Atmel", sizeof sc->sc.sc_vendor);
 
 	sc->sc_ih = at91_intr_establish(sc->sc_pid, IPL_USB, INTR_HIGH_LEVEL, ohci_intr, sc);
-	r = ohci_init(&sc->sc);
+	int err = ohci_init(&sc->sc);
 
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf("%s: init failed, error=%d\n", device_xname(self), r);
+	if (err) {
+		printf("%s: init failed, error=%d\n", device_xname(self), err);
 
 		at91_intr_disestablish(sc->sc_ih);
 		return;

Index: src/sys/arch/arm/broadcom/bcm53xx_usb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.6.4.1 src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.6.4.2
--- src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.6.4.1	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_usb.c	Fri Dec  5 13:23:37 2014
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.6.4.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.6.4.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -123,7 +123,7 @@ ohci_bcmusb_attach(device_t parent, devi
 	aprint_normal(": OHCI USB controller\n");
 
 	int error = ohci_init(sc);
-	if (error != USBD_NORMAL_COMPLETION) {
+	if (error) {
 		aprint_error_dev(self, "init failed, error=%d\n", error);
 		return;
 	}

Index: src/sys/arch/arm/ep93xx/epohci.c
diff -u src/sys/arch/arm/ep93xx/epohci.c:1.7.14.3 src/sys/arch/arm/ep93xx/epohci.c:1.7.14.4
--- src/sys/arch/arm/ep93xx/epohci.c:1.7.14.3	Fri Dec  5 09:37:48 2014
+++ src/sys/arch/arm/ep93xx/epohci.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: epohci.c,v 1.7.14.3 2014/12/05 09:37:48 skrll Exp $ */
+/*	$NetBSD: epohci.c,v 1.7.14.4 2014/12/05 13:23:37 skrll Exp $ */
 
 /*-
  * Copyright (c) 2004 Jesse Off
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epohci.c,v 1.7.14.3 2014/12/05 09:37:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epohci.c,v 1.7.14.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -135,7 +135,6 @@ void
 epohci_callback(device_t self)
 {
 	struct epohci_softc *sc = device_private(self);
-	usbd_status r;
 
 	/* Disable interrupts, so we don't get any spurious ones. */
 	bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -145,10 +144,10 @@ epohci_callback(device_t self)
 
 	sc->sc_ih = ep93xx_intr_establish(sc->sc_intr, IPL_USB,
 		ohci_intr, sc);
-	r = ohci_init(&sc->sc);
+	int err = ohci_init(&sc->sc);
 
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf("%s: init failed, error=%d\n", device_xname(self), r);
+	if (err) {
+		printf("%s: init failed, error=%d\n", device_xname(self), err);
 
 		ep93xx_intr_disestablish(sc->sc_ih);
 		return;

Index: src/sys/arch/arm/gemini/obio_ehci.c
diff -u src/sys/arch/arm/gemini/obio_ehci.c:1.3.16.1 src/sys/arch/arm/gemini/obio_ehci.c:1.3.16.2
--- src/sys/arch/arm/gemini/obio_ehci.c:1.3.16.1	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/gemini/obio_ehci.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: obio_ehci.c,v 1.3.16.1 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: obio_ehci.c,v 1.3.16.2 2014/12/05 13:23:37 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.3.16.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.3.16.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include "locators.h"
 
@@ -101,7 +101,6 @@ ehci_obio_attach(device_t parent, device
 	struct ehci_softc * const sc = device_private(self);
 	struct obio_attach_args * const obio = aux;
 	const char * const devname = device_xname(self);
-	usbd_status r;
 
 	sc->sc_dev = self;
 	sc->sc_bus.ub_hcpriv = sc;
@@ -137,9 +136,9 @@ ehci_obio_attach(device_t parent, device
 	sc->sc_id_vendor = PCI_VENDOR_FARADAY;
 	strlcpy(sc->sc_vendor, "SL351x", sizeof(sc->sc_vendor));
 
-	r = ehci_init(sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error("%s: init failed, error=%d\n", devname, r);
+	int err = ehci_init(sc);
+	if (err) {
+		aprint_error("%s: init failed, error=%d\n", devname, err);
 		return;
 	}
 

Index: src/sys/arch/arm/imx/imxusb.c
diff -u src/sys/arch/arm/imx/imxusb.c:1.7.2.2 src/sys/arch/arm/imx/imxusb.c:1.7.2.3
--- src/sys/arch/arm/imx/imxusb.c:1.7.2.2	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/imx/imxusb.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxusb.c,v 1.7.2.2 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: imxusb.c,v 1.7.2.3 2014/12/05 13:23:37 skrll Exp $	*/
 /*
  * Copyright (c) 2009, 2010  Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi and Hiroyuki Bessho for Genetec Corporation.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.7.2.2 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.7.2.3 2014/12/05 13:23:37 skrll Exp $");
 
 #include "opt_imx.h"
 
@@ -88,7 +88,6 @@ imxehci_attach(device_t parent, device_t
 	ehci_softc_t *hsc = &sc->sc_hsc;
 	bus_space_tag_t iot;
 	uint16_t hcirev;
-	usbd_status r;
 	uint32_t id, hwhost, hwdevice;
 	const char *comma;
 
@@ -204,9 +203,9 @@ imxehci_attach(device_t parent, device_t
 	/* Figure out vendor for root hub descriptor. */
 	strlcpy(hsc->sc_vendor, "i.MX", sizeof(hsc->sc_vendor));
 
-	r = ehci_init(hsc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ehci_init(hsc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		return;
 	}
 

Index: src/sys/arch/arm/omap/obio_ohci.c
diff -u src/sys/arch/arm/omap/obio_ohci.c:1.10.6.1 src/sys/arch/arm/omap/obio_ohci.c:1.10.6.2
--- src/sys/arch/arm/omap/obio_ohci.c:1.10.6.1	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/omap/obio_ohci.c	Fri Dec  5 13:23:37 2014
@@ -1,7 +1,7 @@
-/*	$Id: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$Id: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $	*/
 
 /* adapted from: */
-/*	$NetBSD: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $	*/
 /*	$OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
 
 /*
@@ -24,7 +24,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,7 +105,6 @@ obioohci_attach(device_t parent, device_
 	struct obio_softc *psc = device_private(parent);
 	struct obioohci_softc *sc = device_private(self);
 	struct obio_attach_args *obio = aux;
-	usbd_status r;
 
 	KASSERT(psc->sc_obio_dev == NULL);
 	psc->sc_obio_dev = self;
@@ -150,9 +149,9 @@ obioohci_attach(device_t parent, device_
 	}
 
 	strlcpy(sc->sc.sc_vendor, "OMAP", sizeof(sc->sc.sc_vendor));
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		goto free_intr;
 	}
 

Index: src/sys/arch/arm/omap/omapl1x_ohci.c
diff -u src/sys/arch/arm/omap/omapl1x_ohci.c:1.1.12.3 src/sys/arch/arm/omap/omapl1x_ohci.c:1.1.12.4
--- src/sys/arch/arm/omap/omapl1x_ohci.c:1.1.12.3	Thu Dec  4 07:53:46 2014
+++ src/sys/arch/arm/omap/omapl1x_ohci.c	Fri Dec  5 13:23:37 2014
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: omapl1x_ohci.c,v 1.1.12.3 2014/12/04 07:53:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omapl1x_ohci.c,v 1.1.12.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,7 +92,6 @@ omapl1xohci_attach (struct device *paren
 {
 	struct omapl1xohci_softc *sc = device_private(self);
 	struct tipb_attach_args *tipb = aux;
-	usbd_status r;
 
 	/* Map OHCI registers */
 	if (bus_space_map(tipb->tipb_iot, tipb->tipb_addr, tipb->tipb_size, 0,
@@ -150,9 +149,9 @@ omapl1xohci_attach (struct device *paren
 
 	strlcpy(sc->sc.sc_vendor, "OMAPL1X", sizeof sc->sc.sc_vendor);
 
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		return;
 	}
 

Index: src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c
diff -u src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c:1.8.30.3 src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c:1.8.30.4
--- src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c:1.8.30.3	Fri Dec  5 09:37:49 2014
+++ src/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_s3c24x0.c,v 1.8.30.3 2014/12/05 09:37:49 skrll Exp $ */
+/*	$NetBSD: ohci_s3c24x0.c,v 1.8.30.4 2014/12/05 13:23:37 skrll Exp $ */
 
 /* derived from ohci_pci.c */
 
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_s3c24x0.c,v 1.8.30.3 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_s3c24x0.c,v 1.8.30.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,8 +89,6 @@ ohci_ssio_attach(device_t parent, device
 	struct ohci_ssio_softc *sc = device_private(self);
 	struct s3c2xx0_attach_args *sa = (struct s3c2xx0_attach_args *)aux;
 
-	usbd_status r;
-
 	aprint_normal("\n");
 	aprint_naive("\n");
 
@@ -124,9 +122,9 @@ ohci_ssio_attach(device_t parent, device
 
 	strlcpy(sc->sc.sc_vendor, "Samsung", sizeof sc->sc.sc_vendor);
 
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		return;
 	}
 

Index: src/sys/arch/arm/samsung/exynos_usb.c
diff -u src/sys/arch/arm/samsung/exynos_usb.c:1.13.2.1 src/sys/arch/arm/samsung/exynos_usb.c:1.13.2.2
--- src/sys/arch/arm/samsung/exynos_usb.c:1.13.2.1	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/samsung/exynos_usb.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_usb.c,v 1.13.2.1 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: exynos_usb.c,v 1.13.2.2 2014/12/05 13:23:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: exynos_usb.c,v 1.13.2.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_usb.c,v 1.13.2.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -267,7 +267,6 @@ exynos_ohci_attach(device_t parent, devi
 {
 	struct exynos_usb_softc *usbsc = &exynos_usb_sc;
 	struct ohci_softc *sc = device_private(self);
-	int r;
 
 	sc->sc_dev = self;
 	sc->iot = usbsc->sc_bst;
@@ -282,9 +281,9 @@ exynos_ohci_attach(device_t parent, devi
 	aprint_normal(": OHCI USB controller\n");
 
 	/* attach */
-	r = ohci_init(sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error = %d\n", r);
+	int err = ohci_init(sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error = %d\n", err);
 		/* disable : TBD */
 		return;
 	}
@@ -320,7 +319,6 @@ exynos_ehci_attach(device_t parent, devi
 {
 	struct exynos_usb_softc *usbsc = &exynos_usb_sc;
 	struct ehci_softc *sc = device_private(self);
-	int r;
 
 	sc->sc_dev = self;
 	sc->iot = usbsc->sc_bst;
@@ -339,9 +337,9 @@ exynos_ehci_attach(device_t parent, devi
 	aprint_normal(": EHCI USB controller\n");
 
 	/* attach */
-	r = ehci_init(sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error = %d\n", r);
+	int err = ehci_init(sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error = %d\n", err);
 		/* disable : TBD */
 		return;
 	}

Index: src/sys/arch/arm/xscale/pxa2x0_ohci.c
diff -u src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.9.14.1 src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.9.14.2
--- src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.9.14.1	Wed Dec  3 12:52:05 2014
+++ src/sys/arch/arm/xscale/pxa2x0_ohci.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxa2x0_ohci.c,v 1.9.14.1 2014/12/03 12:52:05 skrll Exp $	*/
+/*	$NetBSD: pxa2x0_ohci.c,v 1.9.14.2 2014/12/05 13:23:37 skrll Exp $	*/
 /*	$OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
 
 /*
@@ -70,7 +70,6 @@ pxaohci_attach(device_t parent, device_t
 {
 	struct pxaohci_softc *sc = device_private(self);
 	struct pxaip_attach_args *pxa = aux;
-	usbd_status r;
 
 #ifdef USB_DEBUG
 	{
@@ -118,9 +117,9 @@ pxaohci_attach(device_t parent, device_t
 	}
 
 	strlcpy(sc->sc.sc_vendor, "PXA27x", sizeof(sc->sc.sc_vendor));
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(sc->sc.sc_dev, "init failed, error=%d\n", r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(sc->sc.sc_dev, "init failed, error=%d\n", err);
 		goto free_intr;
 	}
 

Index: src/sys/arch/hpcmips/dev/plumohci.c
diff -u src/sys/arch/hpcmips/dev/plumohci.c:1.14.14.3 src/sys/arch/hpcmips/dev/plumohci.c:1.14.14.4
--- src/sys/arch/hpcmips/dev/plumohci.c:1.14.14.3	Fri Dec  5 09:37:49 2014
+++ src/sys/arch/hpcmips/dev/plumohci.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: plumohci.c,v 1.14.14.3 2014/12/05 09:37:49 skrll Exp $ */
+/*	$NetBSD: plumohci.c,v 1.14.14.4 2014/12/05 13:23:37 skrll Exp $ */
 
 /*-
  * Copyright (c) 2000 UCHIYAMA Yasushi
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plumohci.c,v 1.14.14.3 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumohci.c,v 1.14.14.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -132,7 +132,6 @@ plumohci_attach(device_t parent, device_
 {
 	struct plumohci_softc *sc = device_private(self);
 	struct plum_attach_args *pa = aux;
-	usbd_status r;
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_bus.ub_hcpriv = sc;
@@ -179,10 +178,10 @@ plumohci_attach(device_t parent, device_
 
 	printf("\n");
 
-	r = ohci_init(&sc->sc);
+	int err = ohci_init(&sc->sc);
 
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf(": init failed, error=%d\n", r);
+	if (err) {
+		printf(": init failed, error=%d\n", err);
 
 		plum_intr_disestablish(pa->pa_pc, sc->sc_ih);
 		plum_intr_disestablish(pa->pa_pc, sc->sc_wakeih);

Index: src/sys/arch/i386/pci/gcscehci.c
diff -u src/sys/arch/i386/pci/gcscehci.c:1.11.2.2 src/sys/arch/i386/pci/gcscehci.c:1.11.2.3
--- src/sys/arch/i386/pci/gcscehci.c:1.11.2.2	Fri Dec  5 09:37:49 2014
+++ src/sys/arch/i386/pci/gcscehci.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscehci.c,v 1.11.2.2 2014/12/05 09:37:49 skrll Exp $ */
+/* $NetBSD: gcscehci.c,v 1.11.2.3 2014/12/05 13:23:37 skrll Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.11.2.2 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.11.2.3 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,7 +98,6 @@ gcscehci_attach(device_t parent, device_
 	pci_intr_handle_t ih;
 	const char *devname = device_xname(self);
 	char devinfo[256];
-	usbd_status r;
 	bus_addr_t ehcibase;
 	int ncomp;
 	struct usb_pci *up;
@@ -170,9 +169,9 @@ gcscehci_attach(device_t parent, device_
 	}
 	sc->sc.sc_ncomp = ncomp;
 
-	r = ehci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error("%s: init failed, error=%d\n", devname, r);
+	int err = ehci_init(&sc->sc);
+	if (err != USBD_NORMAL_COMPLETION) {
+		aprint_error("%s: init failed, error=%d\n", devname, err);
 		return;
 	}
 

Index: src/sys/arch/mips/alchemy/dev/ohci_aubus.c
diff -u src/sys/arch/mips/alchemy/dev/ohci_aubus.c:1.15.30.3 src/sys/arch/mips/alchemy/dev/ohci_aubus.c:1.15.30.4
--- src/sys/arch/mips/alchemy/dev/ohci_aubus.c:1.15.30.3	Fri Dec  5 09:37:49 2014
+++ src/sys/arch/mips/alchemy/dev/ohci_aubus.c	Fri Dec  5 13:23:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_aubus.c,v 1.15.30.3 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: ohci_aubus.c,v 1.15.30.4 2014/12/05 13:23:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_aubus.c,v 1.15.30.3 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_aubus.c,v 1.15.30.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,13 +74,10 @@ ohci_aubus_attach(device_t parent, devic
 {
 	ohci_softc_t *sc = device_private(self);
 	void *ih;
-	usbd_status r;
 	uint32_t x, tmp;
 	bus_addr_t usbh_base, usbh_enable;
 	struct aubus_attach_args *aa = aux;
 
-	r = 0;
-
 	usbh_base = aa->aa_addrs[0];
 	usbh_enable = aa->aa_addrs[1];
 	sc->sc_size = aa->aa_addrs[2];
@@ -127,6 +124,12 @@ ohci_aubus_attach(device_t parent, devic
 			break;
 		delay(1000);
 	}
+
+	if (x == 0) {
+		aprint_error_dev(self, "device not ready\n");
+		return;
+	}
+
 	printf(": Alchemy OHCI\n");
 
 	/* Disable OHCI interrupts */
@@ -141,10 +144,9 @@ ohci_aubus_attach(device_t parent, devic
 
 	sc->sc_endian = OHCI_HOST_ENDIAN;
 
-	if (x)
-		r = ohci_init(sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ohci_init(sc);
+	if (err != USBD_NORMAL_COMPLETION) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		au_intr_disestablish(ih);
 		return;
 	}

Index: src/sys/arch/mips/atheros/dev/ehci_arbus.c
diff -u src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.2.16.2 src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.2.16.3
--- src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.2.16.2	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/atheros/dev/ehci_arbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_arbus.c,v 1.2.16.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: ehci_arbus.c,v 1.2.16.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_arbus.c,v 1.2.16.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_arbus.c,v 1.2.16.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include "locators.h"
 
@@ -77,7 +77,6 @@ ehci_arbus_attach(device_t parent, devic
 	struct arbus_attach_args * const aa = aux;
 	void *ih = NULL;
 	int error;
-	int status;
 
 	sc->iot = aa->aa_bst_le;
 	sc->sc_size = aa->aa_size;
@@ -123,10 +122,10 @@ ehci_arbus_attach(device_t parent, devic
 	 */
 	sc->sc_ncomp = 0;
 
-	status = ehci_init(sc);
-	if (status != USBD_NORMAL_COMPLETION) {
+	error = ehci_init(sc);
+	if (error) {
 		aprint_error("%s: init failed, error=%d\n", device_xname(self),
-		    status);
+		    error);
 		if (ih != NULL)
 			arbus_intr_disestablish(ih);
 		return;

Index: src/sys/arch/mips/atheros/dev/ohci_arbus.c
diff -u src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.1.30.2 src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.1.30.3
--- src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.1.30.2	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/atheros/dev/ohci_arbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_arbus.c,v 1.1.30.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: ohci_arbus.c,v 1.1.30.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_arbus.c,v 1.1.30.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_arbus.c,v 1.1.30.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,7 +85,6 @@ ohci_arbus_attach(device_t parent, devic
 	ohci_softc_t * const sc = device_private(self);
 	struct arbus_attach_args * const aa = aux;
 	void *ih = NULL;
-	usbd_status status;
 
 	sc->sc_dev = self;
 	sc->iot = aa->aa_bst;
@@ -110,9 +109,9 @@ ohci_arbus_attach(device_t parent, devic
 	/* we don't handle endianess in bus space */
 	sc->sc_endian = OHCI_LITTLE_ENDIAN;
 
-	status = ohci_init(sc);
-	if (status != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", status);
+	int err = ohci_init(sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		if (ih != NULL)
 			arbus_intr_disestablish(ih);
 		return;

Index: src/sys/arch/mips/ralink/ralink_ehci.c
diff -u src/sys/arch/mips/ralink/ralink_ehci.c:1.5.4.1 src/sys/arch/mips/ralink/ralink_ehci.c:1.5.4.2
--- src/sys/arch/mips/ralink/ralink_ehci.c:1.5.4.1	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/ralink/ralink_ehci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_ehci.c,v 1.5.4.1 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: ralink_ehci.c,v 1.5.4.2 2014/12/05 13:23:38 skrll Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 /* ralink_ehci.c -- Ralink EHCI USB Driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_ehci.c,v 1.5.4.1 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_ehci.c,v 1.5.4.2 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -86,7 +86,6 @@ ralink_ehci_attach(device_t parent, devi
 	struct ralink_ehci_softc * const sc = device_private(self);
 	const struct mainbus_attach_args *ma = aux;
 	struct ralink_usb_hc *ruh;
-	usbd_status status;
 	int error;
 
 	aprint_naive(": EHCI USB controller\n");
@@ -159,9 +158,9 @@ ralink_ehci_attach(device_t parent, devi
 	strlcpy(sc->sc_ehci.sc_vendor, "Ralink", sizeof(sc->sc_ehci.sc_vendor));
 
 	/* Initialize EHCI */
-	status = ehci_init(&sc->sc_ehci);
-	if (status != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", status);
+	int err = ehci_init(&sc->sc_ehci);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		goto fail_1;
 	}
 

Index: src/sys/arch/mips/ralink/ralink_ohci.c
diff -u src/sys/arch/mips/ralink/ralink_ohci.c:1.3.4.2 src/sys/arch/mips/ralink/ralink_ohci.c:1.3.4.3
--- src/sys/arch/mips/ralink/ralink_ohci.c:1.3.4.2	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/ralink/ralink_ohci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_ohci.c,v 1.3.4.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: ralink_ohci.c,v 1.3.4.3 2014/12/05 13:23:38 skrll Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #include "ehci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_ohci.c,v 1.3.4.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_ohci.c,v 1.3.4.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -84,7 +84,6 @@ ralink_ohci_attach(device_t parent, devi
 {
 	struct ralink_ohci_softc * const sc = device_private(self);
 	const struct mainbus_attach_args * const ma = aux;
-	usbd_status status;
 	int error;
 #ifdef RALINK_OHCI_DEBUG
 	const char * const devname = device_xname(self);
@@ -138,9 +137,9 @@ ralink_ohci_attach(device_t parent, devi
 	strlcpy(sc->sc_ohci.sc_vendor, "Ralink", sizeof(sc->sc_ohci.sc_vendor));
 
 	/* Initialize OHCI */
-	status = ohci_init(&sc->sc_ohci);
-	if (status != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", status);
+	error = ohci_init(&sc->sc_ohci);
+	if (error) {
+		aprint_error_dev(self, "init failed, error=%d\n", error);
 		goto fail_0;
 	}
 

Index: src/sys/arch/mips/rmi/rmixl_ehci.c
diff -u src/sys/arch/mips/rmi/rmixl_ehci.c:1.5.16.2 src/sys/arch/mips/rmi/rmixl_ehci.c:1.5.16.3
--- src/sys/arch/mips/rmi/rmixl_ehci.c:1.5.16.2	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/rmi/rmixl_ehci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_ehci.c,v 1.5.16.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: rmixl_ehci.c,v 1.5.16.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_ehci.c,v 1.5.16.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_ehci.c,v 1.5.16.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include "locators.h"
 
@@ -81,7 +81,6 @@ rmixl_ehci_attach(device_t parent, devic
 	struct rmixl_usbi_attach_args * const usbi = aux;
 	void *ih = NULL;
 	uint32_t r;
-	usbd_status status;
 
 	/* check state of IO_AD9 signal latched in GPIO Reset Config reg */
 	r = RMIXL_IOREG_READ(RMIXL_IO_DEV_GPIO + RMIXL_GPIO_RESET_CFG);
@@ -130,9 +129,9 @@ rmixl_ehci_attach(device_t parent, devic
 				device_xname(self));
 	}
 
-	status = ehci_init(sc);
-	if (status != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", status);
+	int err = ehci_init(sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		if (ih != NULL)
 			rmixl_intr_disestablish(ih);
 		return;

Index: src/sys/arch/mips/rmi/rmixl_ohci.c
diff -u src/sys/arch/mips/rmi/rmixl_ohci.c:1.4.30.2 src/sys/arch/mips/rmi/rmixl_ohci.c:1.4.30.3
--- src/sys/arch/mips/rmi/rmixl_ohci.c:1.4.30.2	Wed Dec  3 12:52:06 2014
+++ src/sys/arch/mips/rmi/rmixl_ohci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_ohci.c,v 1.4.30.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: rmixl_ohci.c,v 1.4.30.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_ohci.c,v 1.4.30.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_ohci.c,v 1.4.30.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,7 +82,6 @@ rmixl_ohci_attach(device_t parent, devic
 	struct rmixl_usbi_attach_args * const usbi = aux;
 	void *ih = NULL;
 	uint32_t r;
-	usbd_status status;
 
 	/* check state of IO_AD9 signal latched in GPIO Reset Config reg */
 	r = RMIXL_IOREG_READ(RMIXL_IO_DEV_GPIO + RMIXL_GPIO_RESET_CFG);
@@ -119,9 +118,9 @@ rmixl_ohci_attach(device_t parent, devic
 	/* we handle endianess in bus space */
 	sc->sc_endian = OHCI_HOST_ENDIAN;
 
-	status = ohci_init(sc);
-	if (status != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", status);
+	int err = ohci_init(sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		if (ih != NULL)
 			rmixl_intr_disestablish(ih);
 		return;

Index: src/sys/arch/playstation2/dev/ohci_sbus.c
diff -u src/sys/arch/playstation2/dev/ohci_sbus.c:1.11.8.3 src/sys/arch/playstation2/dev/ohci_sbus.c:1.11.8.4
--- src/sys/arch/playstation2/dev/ohci_sbus.c:1.11.8.3	Fri Dec  5 09:37:49 2014
+++ src/sys/arch/playstation2/dev/ohci_sbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_sbus.c,v 1.11.8.3 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: ohci_sbus.c,v 1.11.8.4 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_sbus.c,v 1.11.8.3 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_sbus.c,v 1.11.8.4 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -117,7 +117,6 @@ void
 ohci_sbus_attach(struct device *parent, struct device *self, void *aux)
 {
 	struct ohci_sbus_softc *sc = device_private(self);
-	usbd_status result;
 
 	printf("\n");
 
@@ -140,10 +139,10 @@ ohci_sbus_attach(struct device *parent, 
 	/* IOP/EE DMA relay segment list */
 	LIST_INIT(&sc->sc_dmaseg_head);
 
-	result = ohci_init(&sc->sc);
+	int err = ohci_init(&sc->sc);
 
-	if (result != USBD_NORMAL_COMPLETION) {
-		printf(": init failed. error=%d\n", result);
+	if (err) {
+		printf(": init failed. error=%d\n", err);
 		return;
 	}
 

Index: src/sys/dev/cardbus/ehci_cardbus.c
diff -u src/sys/dev/cardbus/ehci_cardbus.c:1.32.2.2 src/sys/dev/cardbus/ehci_cardbus.c:1.32.2.3
--- src/sys/dev/cardbus/ehci_cardbus.c:1.32.2.2	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/cardbus/ehci_cardbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_cardbus.c,v 1.32.2.2 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: ehci_cardbus.c,v 1.32.2.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.32.2.2 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.32.2.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -128,7 +128,6 @@ ehci_cardbus_attach(device_t parent, dev
 	cardbus_function_tag_t cf = ct->ct_cf;
 	pcireg_t csr;
 	char devinfo[256];
-	usbd_status r;
 	u_int ncomp;
 	const char *devname = device_xname(self);
 	struct usb_cardbus *up;
@@ -190,9 +189,9 @@ ehci_cardbus_attach(device_t parent, dev
 	}
 	sc->sc.sc_ncomp = ncomp;
 
-	r = ehci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf("%s: init failed, error=%d\n", devname, r);
+	int err = ehci_init(&sc->sc);
+	if (err) {
+		printf("%s: init failed, error=%d\n", devname, err);
 
 		/* Avoid spurious interrupts. */
 		Cardbus_intr_disestablish(ct, sc->sc_ih);

Index: src/sys/dev/cardbus/ohci_cardbus.c
diff -u src/sys/dev/cardbus/ohci_cardbus.c:1.40.2.2 src/sys/dev/cardbus/ohci_cardbus.c:1.40.2.3
--- src/sys/dev/cardbus/ohci_cardbus.c:1.40.2.2	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/cardbus/ohci_cardbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_cardbus.c,v 1.40.2.2 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: ohci_cardbus.c,v 1.40.2.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.40.2.2 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.40.2.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include "ehci_cardbus.h"
 
@@ -108,7 +108,6 @@ ohci_cardbus_attach(device_t parent, dev
 	cardbus_function_tag_t cf = ct->ct_cf;
 	pcireg_t csr;
 	char devinfo[256];
-	usbd_status r;
 	const char *devname = device_xname(self);
 
 	sc->sc.sc_dev = self;
@@ -152,9 +151,9 @@ ohci_cardbus_attach(device_t parent, dev
 	pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
 	    sc->sc.sc_id_vendor);
 
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf("%s: init failed, error=%d\n", devname, r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		printf("%s: init failed, error=%d\n", devname, err);
 
 		/* Avoid spurious interrupts. */
 		Cardbus_intr_disestablish(ct, sc->sc_ih);

Index: src/sys/dev/cardbus/uhci_cardbus.c
diff -u src/sys/dev/cardbus/uhci_cardbus.c:1.21.2.2 src/sys/dev/cardbus/uhci_cardbus.c:1.21.2.3
--- src/sys/dev/cardbus/uhci_cardbus.c:1.21.2.2	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/cardbus/uhci_cardbus.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci_cardbus.c,v 1.21.2.2 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: uhci_cardbus.c,v 1.21.2.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998-2005 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.21.2.2 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.21.2.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include "ehci_cardbus.h"
 
@@ -100,7 +100,6 @@ uhci_cardbus_attach(device_t parent, dev
 	pcireg_t csr;
 	const char *devname = device_xname(self);
 	char devinfo[256];
-	usbd_status r;
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_bus.ub_hcpriv = sc;
@@ -159,9 +158,9 @@ uhci_cardbus_attach(device_t parent, dev
 	pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
 	    sc->sc.sc_id_vendor);
 
-	r = uhci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		printf("%s: init failed, error=%d\n", devname, r);
+	int err = uhci_init(&sc->sc);
+	if (err) {
+		printf("%s: init failed, error=%d\n", devname, err);
 
 		/* Avoid spurious interrupts. */
 		Cardbus_intr_disestablish(ct, sc->sc_ih);

Index: src/sys/dev/marvell/ehci_mv.c
diff -u src/sys/dev/marvell/ehci_mv.c:1.5.6.2 src/sys/dev/marvell/ehci_mv.c:1.5.6.3
--- src/sys/dev/marvell/ehci_mv.c:1.5.6.2	Wed Dec  3 12:52:06 2014
+++ src/sys/dev/marvell/ehci_mv.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_mv.c,v 1.5.6.2 2014/12/03 12:52:06 skrll Exp $	*/
+/*	$NetBSD: ehci_mv.c,v 1.5.6.3 2014/12/05 13:23:38 skrll Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_mv.c,v 1.5.6.2 2014/12/03 12:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_mv.c,v 1.5.6.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -198,7 +198,6 @@ mvusb_attach(device_t parent, device_t s
 {
 	struct mvusb_softc *sc = device_private(self);
 	struct marvell_attach_args *mva = aux;
-	usbd_status r;
 
 	aprint_normal(": Marvell USB 2.0 Interface\n");
 	aprint_naive("\n");
@@ -243,9 +242,9 @@ mvusb_attach(device_t parent, device_t s
 	sc->sc.sc_vendor_init = mvusb_vendor_init;
 	sc->sc.sc_vendor_port_status = mvusb_vendor_port_status;
 
-	r = ehci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ehci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		return;
 	}
 

Index: src/sys/dev/pci/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.59.2.2 src/sys/dev/pci/ehci_pci.c:1.59.2.3
--- src/sys/dev/pci/ehci_pci.c:1.59.2.2	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/pci/ehci_pci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.59.2.2 2014/12/03 12:52:07 skrll Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.59.2.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.59.2.2 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.59.2.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,6 @@ ehci_pci_attach(device_t parent, device_
 	char const *intrstr;
 	pci_intr_handle_t ih;
 	pcireg_t csr;
-	usbd_status r;
 	int ncomp;
 	struct usb_pci *up;
 	int quirk;
@@ -239,9 +238,9 @@ ehci_pci_attach(device_t parent, device_
 
 	ehci_get_ownership(&sc->sc, pc, tag);
 
-	r = ehci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ehci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		goto fail;
 	}
 

Index: src/sys/dev/pci/ohci_pci.c
diff -u src/sys/dev/pci/ohci_pci.c:1.53.2.1 src/sys/dev/pci/ohci_pci.c:1.53.2.2
--- src/sys/dev/pci/ohci_pci.c:1.53.2.1	Wed Dec  3 12:52:07 2014
+++ src/sys/dev/pci/ohci_pci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_pci.c,v 1.53.2.1 2014/12/03 12:52:07 skrll Exp $	*/
+/*	$NetBSD: ohci_pci.c,v 1.53.2.2 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.53.2.1 2014/12/03 12:52:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.53.2.2 2014/12/05 13:23:38 skrll Exp $");
 
 #include "ehci.h"
 
@@ -89,7 +89,6 @@ ohci_pci_attach(device_t parent, device_
 	char const *intrstr;
 	pci_intr_handle_t ih;
 	pcireg_t csr;
-	usbd_status r;
 	char intrbuf[PCI_INTRSTR_LEN];
 
 	sc->sc.sc_dev = self;
@@ -156,9 +155,9 @@ ohci_pci_attach(device_t parent, device_
 	sc->sc.sc_id_vendor = PCI_VENDOR(pa->pa_id);
 	pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
 	    sc->sc.sc_id_vendor);
-	r = ohci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = ohci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		goto fail;
 	}
 

Index: src/sys/dev/pci/uhci_pci.c
diff -u src/sys/dev/pci/uhci_pci.c:1.58.2.2 src/sys/dev/pci/uhci_pci.c:1.58.2.3
--- src/sys/dev/pci/uhci_pci.c:1.58.2.2	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/pci/uhci_pci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci_pci.c,v 1.58.2.2 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: uhci_pci.c,v 1.58.2.3 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.58.2.2 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.58.2.3 2014/12/05 13:23:38 skrll Exp $");
 
 #include "ehci.h"
 
@@ -93,7 +93,6 @@ uhci_pci_attach(device_t parent, device_
 	char const *intrstr;
 	pci_intr_handle_t ih;
 	pcireg_t csr;
-	usbd_status r;
 	int s;
 	char intrbuf[PCI_INTRSTR_LEN];
 
@@ -173,9 +172,9 @@ uhci_pci_attach(device_t parent, device_
 	sc->sc.sc_id_vendor = PCI_VENDOR(pa->pa_id);
 	pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
 	    sc->sc.sc_id_vendor);
-	r = uhci_init(&sc->sc);
-	if (r != USBD_NORMAL_COMPLETION) {
-		aprint_error_dev(self, "init failed, error=%d\n", r);
+	int err = uhci_init(&sc->sc);
+	if (err) {
+		aprint_error_dev(self, "init failed, error=%d\n", err);
 		return;
 	}
 	sc->sc_initialized = SC_INIT_UHCI;

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.14 src/sys/dev/usb/ehci.c:1.234.2.15
--- src/sys/dev/usb/ehci.c:1.234.2.14	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/usb/ehci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.14 2014/12/05 09:37:49 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.15 2014/12/05 13:23:38 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.14 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.15 2014/12/05 13:23:38 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -356,7 +356,7 @@ static const uint8_t revbits[EHCI_MAX_PO
 0x07,0x47,0x27,0x67,0x17,0x57,0x37,0x77,0x0f,0x4f,0x2f,0x6f,0x1f,0x5f,0x3f,0x7f,
 };
 
-usbd_status
+int
 ehci_init(ehci_softc_t *sc)
 {
 	uint32_t vers, sparams, cparams, hcr;
@@ -442,7 +442,7 @@ ehci_init(ehci_softc_t *sc)
 	}
 	if (hcr) {
 		aprint_error("%s: reset timeout\n", device_xname(sc->sc_dev));
-		return USBD_IOERROR;
+		return EIO;
 	}
 	if (sc->sc_vendor_init)
 		sc->sc_vendor_init(sc);
@@ -466,7 +466,7 @@ ehci_init(ehci_softc_t *sc)
 	case 0: sc->sc_flsize = 1024; break;
 	case 1: sc->sc_flsize = 512; break;
 	case 2: sc->sc_flsize = 256; break;
-	case 3: return USBD_IOERROR;
+	case 3: return EIO;
 	}
 	err = usb_allocmem(&sc->sc_bus, sc->sc_flsize * sizeof(ehci_link_t),
 	    EHCI_FLALIGN_ALIGN, &sc->sc_fldma);
@@ -502,7 +502,7 @@ ehci_init(ehci_softc_t *sc)
 	for (i = 0; i < EHCI_INTRQHS; i++) {
 		sqh = ehci_alloc_sqh(sc);
 		if (sqh == NULL) {
-			err = USBD_NOMEM;
+			err = ENOMEM;
 			goto bad1;
 		}
 		sc->sc_islots[i].sqh = sqh;
@@ -545,7 +545,7 @@ ehci_init(ehci_softc_t *sc)
 	/* Allocate dummy QH that starts the async list. */
 	sqh = ehci_alloc_sqh(sc);
 	if (sqh == NULL) {
-		err = USBD_NOMEM;
+		err = ENOMEM;
 		goto bad1;
 	}
 	/* Fill the QH */
@@ -591,14 +591,14 @@ ehci_init(ehci_softc_t *sc)
 	}
 	if (hcr) {
 		aprint_error("%s: run timeout\n", device_xname(sc->sc_dev));
-		return USBD_IOERROR;
+		return EIO;
 	}
 
 	/* Enable interrupts */
 	USBHIST_LOG(ehcidebug, "enabling interupts", 0, 0, 0, 0);
 	EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
 
-	return USBD_NORMAL_COMPLETION;
+	return 0;
 
 #if 0
  bad2:

Index: src/sys/dev/usb/ehcivar.h
diff -u src/sys/dev/usb/ehcivar.h:1.42.14.4 src/sys/dev/usb/ehcivar.h:1.42.14.5
--- src/sys/dev/usb/ehcivar.h:1.42.14.4	Thu Dec  4 08:04:31 2014
+++ src/sys/dev/usb/ehcivar.h	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehcivar.h,v 1.42.14.4 2014/12/04 08:04:31 skrll Exp $ */
+/*	$NetBSD: ehcivar.h,v 1.42.14.5 2014/12/05 13:23:38 skrll Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -202,7 +202,7 @@ typedef struct ehci_softc {
 #define EOWRITE2(sc, a, x) bus_space_write_2((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x))
 #define EOWRITE4(sc, a, x) bus_space_write_4((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x))
 
-usbd_status	ehci_init(ehci_softc_t *);
+int		ehci_init(ehci_softc_t *);
 int		ehci_intr(void *);
 int		ehci_detach(ehci_softc_t *, int);
 int		ehci_activate(device_t, enum devact);

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.10 src/sys/dev/usb/motg.c:1.12.2.11
--- src/sys/dev/usb/motg.c:1.12.2.10	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/usb/motg.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.10 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.11 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.10 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.11 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -234,7 +234,7 @@ const struct usbd_pipe_methods motg_devi
 	.upm_done =	motg_device_data_done,
 };
 
-usbd_status
+int
 motg_init(struct motg_softc *sc)
 {
 	uint32_t nrx, ntx, val;
@@ -242,7 +242,7 @@ motg_init(struct motg_softc *sc)
 	int offset, i;
 
 	if (sc->sc_mode == MOTG_MODE_DEVICE)
-		return USBD_NORMAL_COMPLETION; /* not supported */
+		return ENOTSUP; /* not supported */
 
 	/* disable all interrupts */
 	UWRITE1(sc, MUSB2_REG_INTUSBE, 0);
@@ -307,7 +307,7 @@ motg_init(struct motg_softc *sc)
 	}
 	if (sc->sc_ep_max == 0) {
 		aprint_error_dev(sc->sc_dev, " no endpoints\n");
-		return USBD_INVAL;
+		return -1;
 	}
 	KASSERT(sc->sc_ep_max <= MOTG_MAX_HW_EP);
 	/* read out configuration data */
@@ -438,7 +438,7 @@ motg_init(struct motg_softc *sc)
 	snprintf(sc->sc_vendor, sizeof(sc->sc_vendor),
 	    "Mentor Graphics");
 	sc->sc_child = config_found(sc->sc_dev, &sc->sc_bus, usbctlprint);
-	return USBD_NORMAL_COMPLETION;
+	return 0;
 }
 
 static int

Index: src/sys/dev/usb/motgvar.h
diff -u src/sys/dev/usb/motgvar.h:1.4.2.3 src/sys/dev/usb/motgvar.h:1.4.2.4
--- src/sys/dev/usb/motgvar.h:1.4.2.3	Thu Dec  4 08:04:31 2014
+++ src/sys/dev/usb/motgvar.h	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motgvar.h,v 1.4.2.3 2014/12/04 08:04:31 skrll Exp $	*/
+/*	$NetBSD: motgvar.h,v 1.4.2.4 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -117,7 +117,7 @@ struct motg_xfer {
 #define UXFER(xfer) ((struct motg_xfer *)(xfer))
 
 
-usbd_status	motg_init(struct motg_softc *);
+int		motg_init(struct motg_softc *);
 int		motg_intr(struct motg_softc *, uint16_t, uint16_t, uint8_t);
 int		motg_intr_vbus(struct motg_softc *, int);
 int		motg_detach(struct motg_softc *, int);

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.13 src/sys/dev/usb/ohci.c:1.254.2.14
--- src/sys/dev/usb/ohci.c:1.254.2.13	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/usb/ohci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.13 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.14 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.13 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.14 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -611,7 +611,7 @@ ohci_free_sitd(ohci_softc_t *sc, ohci_so
 	sc->sc_freeitds = sitd;
 }
 
-usbd_status
+int
 ohci_init(ohci_softc_t *sc)
 {
 	ohci_soft_ed_t *sed, *psed;
@@ -648,7 +648,7 @@ ohci_init(ohci_softc_t *sc)
 	if (OHCI_REV_HI(rev) != 1 || OHCI_REV_LO(rev) != 0) {
 		aprint_error_dev(sc->sc_dev, "unsupported OHCI revision\n");
 		sc->sc_bus.ub_revision = USBREV_UNKNOWN;
-		return USBD_INVAL;
+		return -1;
 	}
 	sc->sc_bus.ub_revision = USBREV_1_0;
 	sc->sc_bus.ub_usedma = true;
@@ -669,7 +669,7 @@ ohci_init(ohci_softc_t *sc)
 	/* Allocate dummy ED that starts the control list. */
 	sc->sc_ctrl_head = ohci_alloc_sed(sc);
 	if (sc->sc_ctrl_head == NULL) {
-		err = USBD_NOMEM;
+		err = ENOMEM;
 		goto bad1;
 	}
 	sc->sc_ctrl_head->ed.ed_flags |= HTOO32(OHCI_ED_SKIP);
@@ -677,7 +677,7 @@ ohci_init(ohci_softc_t *sc)
 	/* Allocate dummy ED that starts the bulk list. */
 	sc->sc_bulk_head = ohci_alloc_sed(sc);
 	if (sc->sc_bulk_head == NULL) {
-		err = USBD_NOMEM;
+		err = ENOMEM;
 		goto bad2;
 	}
 	sc->sc_bulk_head->ed.ed_flags |= HTOO32(OHCI_ED_SKIP);
@@ -688,7 +688,7 @@ ohci_init(ohci_softc_t *sc)
 	/* Allocate dummy ED that starts the isochronous list. */
 	sc->sc_isoc_head = ohci_alloc_sed(sc);
 	if (sc->sc_isoc_head == NULL) {
-		err = USBD_NOMEM;
+		err = ENOMEM;
 		goto bad3;
 	}
 	sc->sc_isoc_head->ed.ed_flags |= HTOO32(OHCI_ED_SKIP);
@@ -702,7 +702,7 @@ ohci_init(ohci_softc_t *sc)
 		if (sed == NULL) {
 			while (--i >= 0)
 				ohci_free_sed(sc, sc->sc_eds[i]);
-			err = USBD_NOMEM;
+			err = ENOMEM;
 			goto bad4;
 		}
 		/* All ED fields are set to 0. */
@@ -802,7 +802,7 @@ ohci_init(ohci_softc_t *sc)
 	}
 	if (hcr) {
 		aprint_error_dev(sc->sc_dev, "reset timeout\n");
-		err = USBD_IOERROR;
+		err = EIO;
 		goto bad5;
 	}
 #ifdef OHCI_DEBUG
@@ -881,7 +881,7 @@ ohci_init(ohci_softc_t *sc)
 	DPRINTFN(1,("ohci_init: enabling %#x\n", sc->sc_eintrs | OHCI_MIE));
 	OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE);
 
-	return USBD_NORMAL_COMPLETION;
+	return 0;
 
  bad5:
 	for (i = 0; i < OHCI_NO_EDS; i++)

Index: src/sys/dev/usb/ohcivar.h
diff -u src/sys/dev/usb/ohcivar.h:1.55.6.3 src/sys/dev/usb/ohcivar.h:1.55.6.4
--- src/sys/dev/usb/ohcivar.h:1.55.6.3	Thu Dec  4 08:04:31 2014
+++ src/sys/dev/usb/ohcivar.h	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohcivar.h,v 1.55.6.3 2014/12/04 08:04:31 skrll Exp $	*/
+/*	$NetBSD: ohcivar.h,v 1.55.6.4 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@ struct ohci_xfer {
 	struct usb_task	abort_task;
 };
 
-usbd_status	ohci_init(ohci_softc_t *);
+int		ohci_init(ohci_softc_t *);
 int		ohci_intr(void *);
 int		ohci_detach(ohci_softc_t *, int);
 bool		ohci_shutdown(device_t, int);

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.13 src/sys/dev/usb/uhci.c:1.264.4.14
--- src/sys/dev/usb/uhci.c:1.264.4.13	Fri Dec  5 09:37:49 2014
+++ src/sys/dev/usb/uhci.c	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.13 2014/12/05 09:37:49 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.14 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.13 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.14 2014/12/05 13:23:38 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -365,7 +365,7 @@ uhci_globalreset(uhci_softc_t *sc)
 	UHCICMD(sc, 0);			/* do nothing */
 }
 
-usbd_status
+int
 uhci_init(uhci_softc_t *sc)
 {
 	usbd_status err;
@@ -405,7 +405,7 @@ uhci_init(uhci_softc_t *sc)
 	 */
 	std = uhci_alloc_std(sc);
 	if (std == NULL)
-		return USBD_NOMEM;
+		return ENOMEM;
 	std->link.std = NULL;
 	std->td.td_link = htole32(UHCI_PTR_T);
 	std->td.td_status = htole32(0); /* inactive */
@@ -417,7 +417,7 @@ uhci_init(uhci_softc_t *sc)
 	/* Allocate the dummy QH marking the end and used for looping the QHs.*/
 	lsqh = uhci_alloc_sqh(sc);
 	if (lsqh == NULL)
-		return USBD_NOMEM;
+		return ENOMEM;
 	lsqh->hlink = NULL;
 	lsqh->qh.qh_hlink = htole32(UHCI_PTR_T);	/* end of QH chain */
 	lsqh->elink = std;
@@ -429,7 +429,7 @@ uhci_init(uhci_softc_t *sc)
 	/* Allocate the dummy QH where bulk traffic will be queued. */
 	bsqh = uhci_alloc_sqh(sc);
 	if (bsqh == NULL)
-		return USBD_NOMEM;
+		return ENOMEM;
 	bsqh->hlink = lsqh;
 	bsqh->qh.qh_hlink = htole32(lsqh->physaddr | UHCI_PTR_QH);
 	bsqh->elink = NULL;
@@ -441,7 +441,7 @@ uhci_init(uhci_softc_t *sc)
 	/* Allocate dummy QH where high speed control traffic will be queued. */
 	chsqh = uhci_alloc_sqh(sc);
 	if (chsqh == NULL)
-		return USBD_NOMEM;
+		return ENOMEM;
 	chsqh->hlink = bsqh;
 	chsqh->qh.qh_hlink = htole32(bsqh->physaddr | UHCI_PTR_QH);
 	chsqh->elink = NULL;
@@ -453,7 +453,7 @@ uhci_init(uhci_softc_t *sc)
 	/* Allocate dummy QH where control traffic will be queued. */
 	clsqh = uhci_alloc_sqh(sc);
 	if (clsqh == NULL)
-		return USBD_NOMEM;
+		return ENOMEM;
 	clsqh->hlink = chsqh;
 	clsqh->qh.qh_hlink = htole32(chsqh->physaddr | UHCI_PTR_QH);
 	clsqh->elink = NULL;

Index: src/sys/dev/usb/uhcivar.h
diff -u src/sys/dev/usb/uhcivar.h:1.52.14.3 src/sys/dev/usb/uhcivar.h:1.52.14.4
--- src/sys/dev/usb/uhcivar.h:1.52.14.3	Thu Dec  4 08:04:31 2014
+++ src/sys/dev/usb/uhcivar.h	Fri Dec  5 13:23:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhcivar.h,v 1.52.14.3 2014/12/04 08:04:31 skrll Exp $	*/
+/*	$NetBSD: uhcivar.h,v 1.52.14.4 2014/12/05 13:23:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@ typedef struct uhci_softc {
 	device_t sc_child;		/* /dev/usb# device */
 } uhci_softc_t;
 
-usbd_status	uhci_init(uhci_softc_t *);
+int		uhci_init(uhci_softc_t *);
 int		uhci_intr(void *);
 int		uhci_detach(uhci_softc_t *, int);
 void		uhci_childdet(device_t, device_t);

Reply via email to