Skip to contentSkip to conversation

usb: increase usb delay

PATCH New Rob Clark 2 participants 2 messages Jun 24, 2017 – Jun 26, 2017

lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 usb: increase usb delay

This makes booting off the USB disks I have go from 50% reliable to 100% reliable. I'm no USB expert so maybe there is a better way. But one way or another we aren't waiting long enough after power-on for the usb device to be ready.

---
 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/usb_storage.c +1 -1
index 03171f7..0e3de90 100644
@@ -1019,7 +1019,7 @@ static int usb_test_unit_ready(ccb *srb, struct us_data *ss)
 		if ((srb->sense_buf[2] == 0x02) &&
 		    (srb->sense_buf[12] == 0x3a))
 			return -1;
-		mdelay(100);
+		mdelay(250);
 	} while (retries--);
 
 	return -1;
Signature · 1 line
2.9.4
#1 lore raw

PATCH 1/1 usb: increase usb delay

Quoted 15 lines · Rob Clark

This makes booting off the USB disks I have go from 50% reliable to 100% reliable. I'm no USB expert so maybe there is a better way. But one way or another we aren't waiting long enough after power-on for the usb device to be ready.

---
 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/usb_storage.c +0 -0
index 03171f7..0e3de90 100644

common/usb_storage.c static int usb_test_unit_ready(ccb *srb, struct us_data *ss) · line 1025

Quoted 8 lines
common/usb_storage.c +1 -1
@@ -1019,7 +1019,7 @@ static int usb_test_unit_ready(ccb *srb, struct us_data *ss)
 		if ((srb->sense_buf[2] == 0x02) &&
 		    (srb->sense_buf[12] == 0x3a))
 			return -1;
-		mdelay(100);
+		mdelay(250);
 	} while (retries--);
 
 	return -1;

This made me think of 1c3e62d690a3 which was the result of other USB delay decreasing changes. Perhaps there's some issues on the host controller code used on dragonboard? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170626/7c64cbc5/attachment.sig>