diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-27 11:04:46 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-27 11:04:46 +0000 |
commit | 8a2302e1b3294244b74efbf5dbf7504be82bbe29 (patch) | |
tree | 282d980699d5131166ebb5b865fd8b1c6ef45fca /sys/dev | |
parent | 79a5716819d4f355e5c732f1adee19099d31db63 (diff) |
Vommiting errors about failed reset or stall clear are not usefull to
the user and do not give enough informations to debug a problem.
Only print such messages in DEBUG mode.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/umass.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 11b2a24eb3f..2cff04eef13 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.68 2015/01/18 14:40:05 mpi Exp $ */ +/* $OpenBSD: umass.c,v 1.69 2015/01/27 11:04:45 mpi Exp $ */ /* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */ /* @@ -1182,10 +1182,10 @@ umass_bbb_state(struct usbd_xfer *xfer, void *priv, usbd_status err) * err == 0 and the following if block is passed. */ if (err) { /* should not occur */ - printf("%s: BBB bulk-%s stall clear failed, %s\n", - sc->sc_dev.dv_xname, + DPRINTF(UDMASS_BBB, ("%s: BBB bulk-%s stall clear" + " failed, %s\n", sc->sc_dev.dv_xname, (sc->transfer_dir == DIR_IN? "in":"out"), - usbd_errstr(err)); + usbd_errstr(err))); umass_bbb_reset(sc, STATUS_WIRE_FAILED); return; } @@ -1327,8 +1327,8 @@ umass_bbb_state(struct usbd_xfer *xfer, void *priv, usbd_status err) /***** Bulk Reset *****/ case TSTATE_BBB_RESET1: if (err) - printf("%s: BBB reset failed, %s\n", - sc->sc_dev.dv_xname, usbd_errstr(err)); + DPRINTF(UDMASS_BBB, ("%s: BBB reset failed, %s\n", + sc->sc_dev.dv_xname, usbd_errstr(err))); sc->transfer_state = TSTATE_BBB_RESET2; umass_clear_endpoint_stall(sc, UMASS_BULKIN, @@ -1337,8 +1337,9 @@ umass_bbb_state(struct usbd_xfer *xfer, void *priv, usbd_status err) return; case TSTATE_BBB_RESET2: if (err) /* should not occur */ - printf("%s: BBB bulk-in clear stall failed, %s\n", - sc->sc_dev.dv_xname, usbd_errstr(err)); + DPRINTF(UDMASS_BBB, ("%s: BBB bulk-in clear stall" + " failed, %s\n", sc->sc_dev.dv_xname, + usbd_errstr(err))); /* no error recovery, otherwise we end up in a loop */ sc->transfer_state = TSTATE_BBB_RESET3; @@ -1348,8 +1349,9 @@ umass_bbb_state(struct usbd_xfer *xfer, void *priv, usbd_status err) return; case TSTATE_BBB_RESET3: if (err) /* should not occur */ - printf("%s: BBB bulk-out clear stall failed, %s\n", - sc->sc_dev.dv_xname, usbd_errstr(err)); + DPRINTF(UDMASS_BBB,("%s: BBB bulk-out clear stall" + " failed, %s\n", sc->sc_dev.dv_xname, + usbd_errstr(err))); /* no error recovery, otherwise we end up in a loop */ sc->transfer_state = TSTATE_IDLE; |