aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>2001-09-02 09:26:14 +0000
committerNick Hibma <n_hibma@FreeBSD.org>2001-09-02 09:26:14 +0000
commitaa75eeda2f7591d2a3c5a66eb0fbbb279ff60cc4 (patch)
tree2b374499d95568b635e6846c65fe8d0cb12eacd6 /sys/dev/usb
parent494e7e3923197728424e5e8107d3025b3149e4f7 (diff)
Notes
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ugen.c3
-rw-r--r--sys/dev/usb/uhid.c3
-rw-r--r--sys/dev/usb/uhub.c6
-rw-r--r--sys/dev/usb/ukbd.c3
-rw-r--r--sys/dev/usb/umodem.c6
-rw-r--r--sys/dev/usb/ums.c3
6 files changed, 15 insertions, 9 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 7a10e45503df..637c7a0ac739 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -861,7 +861,8 @@ ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("ugenintr: status=%d\n", status));
- usbd_clear_endpoint_stall_async(sce->pipeh);
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall_async(sce->pipeh);
return;
}
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index f233e17ae821..cffc5e543330 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -351,7 +351,8 @@ uhid_intr(xfer, addr, status)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("uhid_intr: status=%d\n", status));
- sc->sc_state |= UHID_NEEDCLEAR;
+ if (status == USBD_STALLED)
+ sc->sc_state |= UHID_NEEDCLEAR;
return;
}
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index ab22fe9f9de9..f87879f20fa6 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -577,10 +577,10 @@ uhub_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
struct uhub_softc *sc = addr;
DPRINTFN(5,("uhub_intr: sc=%p\n", sc));
- if (status != USBD_NORMAL_COMPLETION)
+ if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(sc->sc_ipipe);
-
- usb_needs_explore(sc->sc_hub->bus);
+ else if (status == USBD_NORMAL_COMPLETION)
+ usb_needs_explore(sc->sc_hub->bus);
}
#if defined(__FreeBSD__)
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index ad2c8f107e0c..6d3aa4e632d0 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -700,7 +700,8 @@ ukbd_interrupt(keyboard_t *kbd, void *arg)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("ukbd_intr: status=%d\n", status));
- usbd_clear_endpoint_stall_async(state->ks_intrpipe);
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall_async(state->ks_intrpipe);
return 0;
}
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index 6d4aa160d163..05c9a47e0cf8 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -479,7 +479,8 @@ umodemwritecb(xfer, priv, status)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("umodemwritecb: status=%d\n", status));
- usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe);
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe);
/* XXX we should restart after some delay. */
return;
}
@@ -753,7 +754,8 @@ umodemreadcb(xfer, p, status)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("umodemreadcb: status=%d\n", status));
- usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe);
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe);
/* XXX we should restart after some delay. */
return;
}
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index c3ac612f3d3c..ffabb7b6ed3d 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -421,7 +421,8 @@ ums_intr(xfer, addr, status)
if (status != USBD_NORMAL_COMPLETION) {
DPRINTF(("ums_intr: status=%d\n", status));
- usbd_clear_endpoint_stall_async(sc->sc_intrpipe);
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall_async(sc->sc_intrpipe);
return;
}