summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2006-09-30 10:42:31 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2006-09-30 10:42:31 +0000
commit3d13f2aed57e6a4dc1a6211dd5bb9c0109a7c8b8 (patch)
treeca85b66cb5975a72254e295a07b1f997c3450345 /sys/dev
parentc2b12403de593768483bd8ac4e8bd13102e42359 (diff)
More useful error messages.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uow.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/usb/uow.c b/sys/dev/usb/uow.c
index f82ebb1a41d..c158d2ff94f 100644
--- a/sys/dev/usb/uow.c
+++ b/sys/dev/usb/uow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uow.c,v 1.9 2006/09/30 10:35:42 grange Exp $ */
+/* $OpenBSD: uow.c,v 1.10 2006/09/30 10:42:30 grange Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -358,15 +358,17 @@ uow_cmd(struct uow_softc *sc, int type, int cmd, int param)
USETW(req.wIndex, param);
USETW(req.wLength, 0);
if ((error = usbd_do_request(sc->sc_udev, &req, NULL)) != 0) {
- printf("%s: failed to do request: %s\n",
- USBDEVNAME(sc->sc_dev), usbd_errstr(error));
+ printf("%s: cmd failed, type %d, cmd %d, param %d: %s\n",
+ USBDEVNAME(sc->sc_dev), type, cmd, param,
+ usbd_errstr(error));
return (1);
}
bzero(sc->sc_regs, sizeof(sc->sc_regs));
if (tsleep(sc->sc_regs, PRIBIO, "uowcmd",
(UOW_TIMEOUT * hz) / 1000) != 0) {
- printf("%s: request timeout\n", USBDEVNAME(sc->sc_dev));
+ printf("%s: cmd timeout, type %d, cmd %d, param %d\n",
+ USBDEVNAME(sc->sc_dev), type, cmd, param);
return (1);
}
@@ -404,8 +406,8 @@ uow_read(struct uow_softc *sc, void *buf, int len)
usbd_setup_xfer(sc->sc_xfer, sc->sc_ph_ibulk, sc, buf, len, 0,
UOW_TIMEOUT, NULL);
if ((error = usbd_sync_transfer(sc->sc_xfer)) != 0) {
- printf("%s: failed to read: %s\n",
- USBDEVNAME(sc->sc_dev), usbd_errstr(error));
+ printf("%s: read failed, len %d: %s\n",
+ USBDEVNAME(sc->sc_dev), len, usbd_errstr(error));
return (1);
}
@@ -427,8 +429,8 @@ uow_write(struct uow_softc *sc, const void *buf, int len)
usbd_setup_xfer(sc->sc_xfer, sc->sc_ph_obulk, sc, (void *)buf, len, 0,
UOW_TIMEOUT, NULL);
if ((error = usbd_sync_transfer(sc->sc_xfer)) != 0) {
- printf("%s: failed to write: %s\n",
- USBDEVNAME(sc->sc_dev), usbd_errstr(error));
+ printf("%s: write failed, len %d: %s\n",
+ USBDEVNAME(sc->sc_dev), len, usbd_errstr(error));
return (1);
}