summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/ohci_pci.c6
-rw-r--r--sys/dev/pci/uhci_pci.c6
-rw-r--r--sys/dev/usb/ehci.c42
-rw-r--r--sys/dev/usb/ehcivar.h4
-rw-r--r--sys/dev/usb/ohci.c36
-rw-r--r--sys/dev/usb/ohcivar.h4
-rw-r--r--sys/dev/usb/uhci.c32
-rw-r--r--sys/dev/usb/uhcivar.h3
8 files changed, 64 insertions, 69 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index c99ffb9276d..3a61e7b8d79 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci_pci.c,v 1.37 2010/10/20 20:34:19 mk Exp $ */
+/* $OpenBSD: ohci_pci.c,v 1.38 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */
/*
@@ -162,7 +162,7 @@ ohci_pci_attach(struct device *parent, struct device *self, void *aux)
}
/* Ignore interrupts for now */
- sc->sc.sc_dying = 1;
+ sc->sc.sc_bus.dying = 1;
config_defer(self, ohci_pci_attach_deferred);
@@ -180,7 +180,7 @@ ohci_pci_attach_deferred(struct device *self)
s = splusb();
- sc->sc.sc_dying = 0;
+ sc->sc.sc_bus.dying = 0;
r = ohci_init(&sc->sc);
if (r != USBD_NORMAL_COMPLETION) {
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index 1ca8ec4b610..77a657c9a99 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci_pci.c,v 1.30 2010/10/20 20:34:19 mk Exp $ */
+/* $OpenBSD: uhci_pci.c,v 1.31 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */
/*
@@ -182,7 +182,7 @@ uhci_pci_attach(struct device *parent, struct device *self, void *aux)
config_defer(self, uhci_pci_attach_deferred);
/* Ignore interrupts for now */
- sc->sc.sc_dying = 1;
+ sc->sc.sc_bus.dying = 1;
splx(s);
@@ -203,7 +203,7 @@ uhci_pci_attach_deferred(struct device *self)
s = splhardusb();
- sc->sc.sc_dying = 0;
+ sc->sc.sc_bus.dying = 0;
r = uhci_init(&sc->sc);
if (r != USBD_NORMAL_COMPLETION) {
printf("%s: init failed, error=%d\n", devname, r);
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 361a0dbcb82..90370a1981d 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.114 2010/12/06 06:09:08 jakemsr Exp $ */
+/* $OpenBSD: ehci.c,v 1.115 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -538,7 +538,7 @@ ehci_intr(void *v)
{
ehci_softc_t *sc = v;
- if (sc == NULL || sc->sc_dying)
+ if (sc == NULL || sc->sc_bus.dying)
return (0);
/* If we get an interrupt while polling, then just ignore it. */
@@ -570,7 +570,7 @@ ehci_intr1(ehci_softc_t *sc)
intrs = EHCI_STS_INTRS(EOREAD4(sc, EHCI_USBSTS));
if (intrs == 0xffffffff) {
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
return (0);
}
if (!intrs)
@@ -588,7 +588,7 @@ ehci_intr1(ehci_softc_t *sc)
if (eintrs & EHCI_STS_HSE) {
printf("%s: unrecoverable error, controller halted\n",
sc->sc_bus.bdev.dv_xname);
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
sc->sc_bus.intr_context--;
return (1);
}
@@ -657,7 +657,7 @@ ehci_softintr(void *v)
DPRINTFN(10,("%s: ehci_softintr (%d)\n", sc->sc_bus.bdev.dv_xname,
sc->sc_bus.intr_context));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
sc->sc_bus.intr_context++;
@@ -990,7 +990,7 @@ ehci_waitintr(ehci_softc_t *sc, usbd_xfer_handle xfer)
xfer->status = USBD_IN_PROGRESS;
for (timo = xfer->timeout; timo >= 0; timo--) {
usb_delay_ms(&sc->sc_bus, 1);
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
break;
intrs = EHCI_STS_INTRS(EOREAD4(sc, EHCI_USBSTS)) &
sc->sc_eintrs;
@@ -1165,7 +1165,7 @@ ehci_activate(struct device *self, int act)
case DVACT_DEACTIVATE:
if (sc->sc_child != NULL)
rv = config_deactivate(sc->sc_child);
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
break;
}
return (rv);
@@ -1493,7 +1493,7 @@ ehci_open(usbd_pipe_handle pipe)
DPRINTFN(1, ("ehci_open: pipe=%p, addr=%d, endpt=%d (%d)\n",
pipe, addr, ed->bEndpointAddress, sc->sc_addr));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
if (dev->myhsport) {
@@ -1740,7 +1740,7 @@ ehci_sync_hc(ehci_softc_t *sc)
int s, error;
int tries = 0;
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
DPRINTFN(2,("ehci_sync_hc: dying\n"));
return;
}
@@ -1941,7 +1941,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
usbd_status err;
u_int32_t v;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -2240,7 +2240,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
EOWRITE4(sc, port, v | EHCI_PS_PR);
/* Wait for reset to complete. */
usb_delay_ms(&sc->sc_bus, USB_PORT_ROOT_RESET_DELAY);
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
err = USBD_IOERROR;
goto ret;
}
@@ -2249,7 +2249,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
EOWRITE4(sc, port, v & ~EHCI_PS_PR);
/* Wait for HC to complete reset. */
usb_delay_ms(&sc->sc_bus, EHCI_PORT_RESET_COMPLETE);
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
err = USBD_IOERROR;
goto ret;
}
@@ -2361,7 +2361,7 @@ ehci_root_intr_start(usbd_xfer_handle xfer)
usbd_pipe_handle pipe = xfer->pipe;
ehci_softc_t *sc = (ehci_softc_t *)pipe->device->bus;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
sc->sc_intrxfer = xfer;
@@ -2785,7 +2785,7 @@ ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
DPRINTF(("ehci_abort_xfer: xfer=%p pipe=%p\n", xfer, epipe));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
/* If we're dying, just do the software part. */
s = splusb();
xfer->status = status; /* make software ignore it */
@@ -2989,7 +2989,7 @@ ehci_abort_isoc_xfer(usbd_xfer_handle xfer, usbd_status status)
DPRINTF(("ehci_abort_isoc_xfer: xfer %p pipe %p\n", xfer, epipe));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
s = splusb();
xfer->status = status;
timeout_del(&xfer->timeout_handle);
@@ -3059,7 +3059,7 @@ ehci_timeout(void *addr)
usbd_dump_pipe(exfer->xfer.pipe);
#endif
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
ehci_abort_xfer(&exfer->xfer, USBD_TIMEOUT);
return;
}
@@ -3098,7 +3098,7 @@ ehci_intrlist_timeout(void *arg)
ehci_softc_t *sc = arg;
int s;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
s = splusb();
@@ -3129,7 +3129,7 @@ ehci_device_ctrl_start(usbd_xfer_handle xfer)
ehci_softc_t *sc = (ehci_softc_t *)xfer->pipe->device->bus;
usbd_status err;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -3381,7 +3381,7 @@ ehci_device_bulk_start(usbd_xfer_handle xfer)
DPRINTFN(2, ("ehci_device_bulk_start: xfer=%p len=%u flags=%d\n",
xfer, xfer->length, xfer->flags));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -3561,7 +3561,7 @@ ehci_device_intr_start(usbd_xfer_handle xfer)
DPRINTFN(2, ("ehci_device_intr_start: xfer=%p len=%u flags=%d\n",
xfer, xfer->length, xfer->flags));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -3774,7 +3774,7 @@ ehci_device_isoc_start(usbd_xfer_handle xfer)
DPRINTFN(2, ("ehci_device_isoc_start: xfer %p len %u flags %d\n",
xfer, xfer->length, xfer->flags));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
/*
diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h
index e93bf1cc18a..c1514bed0a0 100644
--- a/sys/dev/usb/ehcivar.h
+++ b/sys/dev/usb/ehcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehcivar.h,v 1.20 2010/09/29 20:06:38 kettenis Exp $ */
+/* $OpenBSD: ehcivar.h,v 1.21 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */
/*
@@ -164,8 +164,6 @@ typedef struct ehci_softc {
struct timeout sc_tmo_intrlist;
struct device *sc_child; /* /dev/usb# device */
-
- char sc_dying;
} ehci_softc_t;
#define EREAD1(sc, a) bus_space_read_1((sc)->iot, (sc)->ioh, (a))
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 199cd1c0a32..d90d7901d6d 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.102 2010/12/06 06:09:08 jakemsr Exp $ */
+/* $OpenBSD: ohci.c,v 1.103 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -390,7 +390,7 @@ ohci_activate(struct device *self, int act)
case DVACT_DEACTIVATE:
if (sc->sc_child != NULL)
rv = config_deactivate(sc->sc_child);
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
break;
}
return (rv);
@@ -1071,7 +1071,7 @@ ohci_intr(void *p)
{
ohci_softc_t *sc = p;
- if (sc == NULL || sc->sc_dying)
+ if (sc == NULL || sc->sc_bus.dying)
return (0);
/* If we get an interrupt while polling, then just ignore it. */
@@ -1123,7 +1123,7 @@ ohci_intr1(ohci_softc_t *sc)
}
if (intrs == 0xffffffff) {
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
return (0);
}
@@ -1214,7 +1214,7 @@ ohci_rhsc_enable(void *v_sc)
ohci_softc_t *sc = v_sc;
int s;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
s = splhardusb();
@@ -1297,7 +1297,7 @@ ohci_softintr(void *v)
DPRINTFN(10,("ohci_softintr: enter\n"));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
sc->sc_bus.intr_context++;
@@ -1593,7 +1593,7 @@ ohci_waitintr(ohci_softc_t *sc, usbd_xfer_handle xfer)
xfer->status = USBD_IN_PROGRESS;
for (timo = xfer->timeout; timo >= 0; timo--) {
usb_delay_ms(&sc->sc_bus, 1);
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
break;
intrs = OREAD4(sc, OHCI_INTERRUPT_STATUS) & sc->sc_eintrs;
DPRINTFN(15,("ohci_waitintr: 0x%04x\n", intrs));
@@ -1894,7 +1894,7 @@ ohci_timeout(void *addr)
DPRINTF(("ohci_timeout: oxfer=%p\n", oxfer));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
ohci_abort_xfer(&oxfer->xfer, USBD_TIMEOUT);
return;
}
@@ -2018,7 +2018,7 @@ ohci_open(usbd_pipe_handle pipe)
DPRINTFN(1, ("ohci_open: pipe=%p, addr=%d, endpt=%d (%d)\n",
pipe, addr, ed->bEndpointAddress, sc->sc_addr));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
std = NULL;
@@ -2180,7 +2180,7 @@ ohci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
DPRINTF(("ohci_abort_xfer: xfer=%p pipe=%p sed=%p\n", xfer, opipe,
sed));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
/* If we're dying, just do the software part. */
s = splusb();
xfer->status = status; /* make software ignore it */
@@ -2376,7 +2376,7 @@ ohci_root_ctrl_start(usbd_xfer_handle xfer)
usbd_status err;
u_int32_t v;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -2639,7 +2639,7 @@ ohci_root_ctrl_start(usbd_xfer_handle xfer)
for (i = 0; i < 5; i++) {
usb_delay_ms(&sc->sc_bus,
USB_PORT_ROOT_RESET_DELAY);
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
err = USBD_IOERROR;
goto ret;
}
@@ -2711,7 +2711,7 @@ ohci_root_intr_start(usbd_xfer_handle xfer)
usbd_pipe_handle pipe = xfer->pipe;
ohci_softc_t *sc = (ohci_softc_t *)pipe->device->bus;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
sc->sc_intrxfer = xfer;
@@ -2768,7 +2768,7 @@ ohci_device_ctrl_start(usbd_xfer_handle xfer)
ohci_softc_t *sc = (ohci_softc_t *)xfer->pipe->device->bus;
usbd_status err;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -2851,7 +2851,7 @@ ohci_device_bulk_start(usbd_xfer_handle xfer)
int s, isread, endpt;
usbd_status err;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -2989,7 +2989,7 @@ ohci_device_intr_start(usbd_xfer_handle xfer)
ohci_soft_td_t *data, *tail;
int s, len, isread, endpt;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
DPRINTFN(3, ("ohci_device_intr_transfer: xfer=%p len=%u "
@@ -3214,7 +3214,7 @@ ohci_device_isoc_enter(usbd_xfer_handle xfer)
"nframes=%d\n",
iso->inuse, iso->next, xfer, xfer->nframes));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
if (iso->next == -1) {
@@ -3326,7 +3326,7 @@ ohci_device_isoc_start(usbd_xfer_handle xfer)
DPRINTFN(5,("ohci_device_isoc_start: xfer=%p\n", xfer));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index aa7c8877db7..21b498f771d 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohcivar.h,v 1.30 2010/09/07 16:21:46 deraadt Exp $ */
+/* $OpenBSD: ohcivar.h,v 1.31 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: ohcivar.h,v 1.32 2003/02/22 05:24:17 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.13 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -128,8 +128,6 @@ typedef struct ohci_softc {
struct timeout sc_tmo_rhsc;
struct device *sc_child;
-
- char sc_dying;
} ohci_softc_t;
struct ohci_xfer {
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index cfb274ea752..4b9952e27ed 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.88 2010/12/06 06:09:08 jakemsr Exp $ */
+/* $OpenBSD: uhci.c,v 1.89 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -929,7 +929,7 @@ uhci_poll_hub(void *addr)
DPRINTFN(20, ("uhci_poll_hub\n"));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
timeout_del(&sc->sc_poll_handle);
@@ -1137,7 +1137,7 @@ uhci_intr(void *arg)
{
uhci_softc_t *sc = arg;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (0);
if (sc->sc_bus.use_polling)
return (0);
@@ -1154,7 +1154,7 @@ uhci_intr1(uhci_softc_t *sc)
if (status == 0) /* The interrupt was not for us. */
return (0);
if (status == 0xffffffff) {
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
return (0);
}
@@ -1193,14 +1193,14 @@ uhci_intr1(uhci_softc_t *sc)
}
if (status & UHCI_STS_HCH) {
/* no acknowledge needed */
- if (!sc->sc_dying) {
+ if (!sc->sc_bus.dying) {
printf("%s: host controller halted\n",
sc->sc_bus.bdev.dv_xname);
#ifdef UHCI_DEBUG
uhci_dump_all(sc);
#endif
}
- sc->sc_dying = 1;
+ sc->sc_bus.dying = 1;
}
if (!ack)
@@ -1224,7 +1224,7 @@ uhci_softintr(void *v)
DPRINTFN(10,("%s: uhci_softintr (%d)\n", sc->sc_bus.bdev.dv_xname,
sc->sc_bus.intr_context));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
sc->sc_bus.intr_context++;
@@ -1452,7 +1452,7 @@ uhci_timeout(void *addr)
DPRINTF(("uhci_timeout: uxfer=%p\n", uxfer));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
uhci_abort_xfer(&uxfer->xfer, USBD_TIMEOUT);
return;
}
@@ -1788,7 +1788,7 @@ uhci_device_bulk_start(usbd_xfer_handle xfer)
DPRINTFN(3, ("uhci_device_bulk_start: xfer=%p len=%u flags=%d ii=%p\n",
xfer, xfer->length, xfer->flags, ii));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -1885,7 +1885,7 @@ uhci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
DPRINTFN(1,("uhci_abort_xfer: xfer=%p, status=%d\n", xfer, status));
- if (sc->sc_dying) {
+ if (sc->sc_bus.dying) {
/* If we're dying, just do the software part. */
s = splusb();
xfer->status = status; /* make software ignore it */
@@ -1969,7 +1969,7 @@ uhci_device_ctrl_start(usbd_xfer_handle xfer)
uhci_softc_t *sc = (uhci_softc_t *)xfer->pipe->device->bus;
usbd_status err;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -2016,7 +2016,7 @@ uhci_device_intr_start(usbd_xfer_handle xfer)
int isread, endpt;
int i, s;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
DPRINTFN(3,("uhci_device_intr_start: xfer=%p len=%u flags=%d\n",
@@ -2308,7 +2308,7 @@ uhci_device_isoc_enter(usbd_xfer_handle xfer)
"nframes=%d\n",
iso->inuse, iso->next, xfer, xfer->nframes));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return;
if (xfer->status == USBD_IN_PROGRESS) {
@@ -2374,7 +2374,7 @@ uhci_device_isoc_start(usbd_xfer_handle xfer)
DPRINTFN(5,("uhci_device_isoc_start: xfer=%p\n", xfer));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -3095,7 +3095,7 @@ uhci_root_ctrl_start(usbd_xfer_handle xfer)
usb_port_status_t ps;
usbd_status err;
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
#ifdef DIAGNOSTIC
@@ -3474,7 +3474,7 @@ uhci_root_intr_start(usbd_xfer_handle xfer)
DPRINTFN(3, ("uhci_root_intr_start: xfer=%p len=%u flags=%d\n",
xfer, xfer->length, xfer->flags));
- if (sc->sc_dying)
+ if (sc->sc_bus.dying)
return (USBD_IOERROR);
sc->sc_ival = mstohz(xfer->pipe->endpoint->edesc->bInterval);
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index ca55724b514..1316fc3db3b 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcivar.h,v 1.23 2010/09/07 16:21:46 deraadt Exp $ */
+/* $OpenBSD: uhcivar.h,v 1.24 2010/12/14 16:13:16 jakemsr Exp $ */
/* $NetBSD: uhcivar.h,v 1.36 2002/12/31 00:39:11 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcivar.h,v 1.14 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -159,7 +159,6 @@ typedef struct uhci_softc {
char sc_isreset;
char sc_suspend;
- char sc_dying;
LIST_HEAD(, uhci_intr_info) sc_intrhead;