Browse Source

[usb] Improve debug messages for failed control transactions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
026b3446b9
1 changed files with 5 additions and 6 deletions
  1. 5
    6
      src/drivers/bus/usb.c

+ 5
- 6
src/drivers/bus/usb.c View File

708
 	/* Record completion status in buffer */
708
 	/* Record completion status in buffer */
709
 	pshdr = iob_push ( iobuf, sizeof ( *pshdr ) );
709
 	pshdr = iob_push ( iobuf, sizeof ( *pshdr ) );
710
 	pshdr->rc = rc;
710
 	pshdr->rc = rc;
711
-	if ( rc != 0 ) {
712
-		DBGC ( usb, "USB %s control transaction failed: %s\n",
713
-		       usb->name, strerror ( rc ) );
714
-	}
715
 
711
 
716
 	/* Add to list of completed I/O buffers */
712
 	/* Add to list of completed I/O buffers */
717
 	list_add_tail ( &iobuf->list, &usb->complete );
713
 	list_add_tail ( &iobuf->list, &usb->complete );
793
 
789
 
794
 			/* Fail immediately if completion was in error */
790
 			/* Fail immediately if completion was in error */
795
 			if ( rc != 0 ) {
791
 			if ( rc != 0 ) {
792
+				DBGC ( usb, "USB %s control %04x:%04x:%04x "
793
+				       "failed: %s\n", usb->name, request,
794
+				       value, index, strerror ( rc ) );
796
 				free_iob ( cmplt );
795
 				free_iob ( cmplt );
797
 				return rc;
796
 				return rc;
798
 			}
797
 			}
809
 		mdelay ( 1 );
808
 		mdelay ( 1 );
810
 	}
809
 	}
811
 
810
 
812
-	DBGC ( usb, "USB %s timed out waiting for control transaction\n",
813
-	       usb->name );
811
+	DBGC ( usb, "USB %s timed out waiting for control %04x:%04x:%04x\n",
812
+	       usb->name, request, value, index );
814
 	return -ETIMEDOUT;
813
 	return -ETIMEDOUT;
815
 
814
 
816
  err_message:
815
  err_message:

Loading…
Cancel
Save