aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-03-23 20:18:02 +0000
committerMichael Brown <mcb30@ipxe.org>2015-03-23 20:18:02 +0000
commit026b3446b953fcec30afb66c2c197d382378dddd (patch)
tree2678a2fa6ad9756ec65a1dc1e53a8524cc21054e /src/drivers
parentb418af26d961dd465ce0667575ffc6d82a1a8987 (diff)
downloadipxe-026b3446b953fcec30afb66c2c197d382378dddd.zip
ipxe-026b3446b953fcec30afb66c2c197d382378dddd.tar.gz
ipxe-026b3446b953fcec30afb66c2c197d382378dddd.tar.bz2
[usb] Improve debug messages for failed control transactions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/usb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index 9ad6fad..1b61037 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -708,10 +708,6 @@ static void usb_control_complete ( struct usb_endpoint *ep,
/* Record completion status in buffer */
pshdr = iob_push ( iobuf, sizeof ( *pshdr ) );
pshdr->rc = rc;
- if ( rc != 0 ) {
- DBGC ( usb, "USB %s control transaction failed: %s\n",
- usb->name, strerror ( rc ) );
- }
/* Add to list of completed I/O buffers */
list_add_tail ( &iobuf->list, &usb->complete );
@@ -793,6 +789,9 @@ int usb_control ( struct usb_device *usb, unsigned int request,
/* Fail immediately if completion was in error */
if ( rc != 0 ) {
+ DBGC ( usb, "USB %s control %04x:%04x:%04x "
+ "failed: %s\n", usb->name, request,
+ value, index, strerror ( rc ) );
free_iob ( cmplt );
return rc;
}
@@ -809,8 +808,8 @@ int usb_control ( struct usb_device *usb, unsigned int request,
mdelay ( 1 );
}
- DBGC ( usb, "USB %s timed out waiting for control transaction\n",
- usb->name );
+ DBGC ( usb, "USB %s timed out waiting for control %04x:%04x:%04x\n",
+ usb->name, request, value, index );
return -ETIMEDOUT;
err_message: