Skip to contentSkip to conversation

usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

PATCH New Ran Wang 2 participants 4 messages Nov 13, 2017

lore
Share & tools
lore

Ran Wang

author
#0 lore raw

PATCH 1/1 usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Force delay 10ms between each control messages to fix Transcend and Kingston DT 101 G2 USB2.0 stick fail to be enumerated by LS208xA.

---
 common/usb.c | 3 +++
 1 file changed, 3 insertions(+)
common/usb.c +3 -0
index 0904259757..eeacc80b9e 100644
@@ -223,6 +223,9 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
 		return -EINVAL;
 	}
 
+	/* Add delay to support more devices' enumeration */
+	mdelay(10);
+
 	/* set setup command */
 	setup_packet->requesttype = requesttype;
 	setup_packet->request = request;
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Quoted 2 lines · Ran Wang

Force delay 10ms between each control messages to fix Transcend and Kingston DT 101 G2 USB2.0 stick fail to be enumerated by LS208xA.

That means everyone else also suffers this burden, even though it's a problem specific to LS208x ? What is the real problem here ?

Quoted 20 lines
---
 common/usb.c | 3 +++
 1 file changed, 3 insertions(+)
common/usb.c +3 -0
index 0904259757..eeacc80b9e 100644
@@ -223,6 +223,9 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
 		return -EINVAL;
 	}
 
+	/* Add delay to support more devices' enumeration */
+	mdelay(10);
+
 	/* set setup command */
 	setup_packet->requesttype = requesttype;
 	setup_packet->request = request;
Signature · 2 lines
Best regards,
Marek Vasut
author
#2 lore raw

PATCH 1/1 usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Hi Marek,

Quoted 9 lines

-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Monday, November 13, 2017 5:34 PM
To: Ran Wang <[email protected]>; Bin Meng <[email protected]>; Heiko Schocher <[email protected]>
Cc: u-boot at lists.denx.de
Subject: Re: [PATCH] usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Quoted 6 lines
Quoted 2 lines · Ran Wang

Force delay 10ms between each control messages to fix Transcend and Kingston DT 101 G2 USB2.0 stick fail to be enumerated by LS208xA.

That means everyone else also suffers this burden, even though it's a problem specific to LS208x ?

Actually I want to add a macro/flag to restrict the scope of effect but don't know how. Could you give me some example to let it take effect on specific boards?

Quoted 2 lines

What is the real problem here ?

So far the root cause is not clear yet due to lack of debugging method. Suspect there are some (HW) compatibility issue here.

Best Regards
Ran

Quoted 26 lines

common/usb.c int usb_control_msg(struct usb_device *dev,

Quoted 10 lines
---
 common/usb.c | 3 +++
 1 file changed, 3 insertions(+)
common/usb.c index 0904259757..eeacc80b9e renamed from common/usb.c +0 -0

100644

common/usb.c +0 -0
@@ -223,6 +223,9 @@ int usb_control_msg(struct usb_device *dev,

unsigned int pipe,

common/usb.c int usb_control_msg(struct usb_device *dev, unsigned int pipe, · line 231

Quoted 10 lines
common/usb.c +3 -0
 		return -EINVAL;
 	}
 
+	/* Add delay to support more devices' enumeration */
+	mdelay(10);
+
 	/* set setup command */
 	setup_packet->requesttype = requesttype;
 	setup_packet->request = request;

--
Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Quoted 18 lines · Ran Wang

Hi Marek,

Quoted 9 lines

-----Original Message-----
From: Marek Vasut [mailto:marex at denx.de]
Sent: Monday, November 13, 2017 5:34 PM
To: Ran Wang <[email protected]>; Bin Meng <[email protected]>; Heiko Schocher <[email protected]>
Cc: u-boot at lists.denx.de
Subject: Re: [PATCH] usb: Add delay to fix USB 2.0 stick enumeration failure on LS208xA

Quoted 6 lines
Quoted 2 lines · Ran Wang

Force delay 10ms between each control messages to fix Transcend and Kingston DT 101 G2 USB2.0 stick fail to be enumerated by LS208xA.

That means everyone else also suffers this burden, even though it's a problem specific to LS208x ?

Quoted 8 lines

Actually I want to add a macro/flag to restrict the scope of effect but don't know how. Could you give me some example to let it take effect on specific boards?

Quoted 2 lines

What is the real problem here ?

So far the root cause is not clear yet due to lack of debugging method. Suspect there are some (HW) compatibility issue here.

I think you should first figure out what the problem is.

Quoted 29 lines

Best Regards
Ran

Quoted 26 lines

common/usb.c int usb_control_msg(struct usb_device *dev,

Quoted 10 lines
---
 common/usb.c | 3 +++
 1 file changed, 3 insertions(+)
common/usb.c index 0904259757..eeacc80b9e renamed from common/usb.c +0 -0

100644

common/usb.c +0 -0
@@ -223,6 +223,9 @@ int usb_control_msg(struct usb_device *dev,

unsigned int pipe,

common/usb.c int usb_control_msg(struct usb_device *dev, unsigned int pipe, · line 231

Quoted 10 lines
common/usb.c +3 -0
 		return -EINVAL;
 	}
 
+	/* Add delay to support more devices' enumeration */
+	mdelay(10);
+
 	/* set setup command */
 	setup_packet->requesttype = requesttype;
 	setup_packet->request = request;

--
Best regards,
Marek Vasut

Signature · 2 lines
Best regards,
Marek Vasut