Skip to contentSkip to conversation

Some more USB-OHCI bugfixes

PATCH Superseded Remy Bohmer 7 participants 21 messages Oct 8, 2008 – Oct 10, 2008

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Some more USB-OHCI bugfixes

The USB OHCI init procedure sets the maximum message length the wrong way. A max of 64 bits should not be done by writing '64' in maxpacketsize, but '3'. While fixing this problem it turned out that there is more wrong here in this code it turned out that the wrong bits were checked to determine if the pipe was of type PIPE_INTERRUPT. This series fixes those errors also.

I made it 2 seperate patches. The 1st of this series is fully tested and correct on at least the AT91SAM9261 cores. I hope it fixes the known problems on AT91SAM9263 (and other) cores also, maybe Stelian can verify this. If it does not help on sam9263, it should not make it worse either...

The 2nd patch, however, is created by search-for-the-same-errors-and-replace. I am not able to test that patch, I do not have the boards, so that needs to be done by others or by review. It is clear that code there is buggy in the first place.

These patches require my previous series called
'Improve stability USB memory sticks for the common OHCI USB layer.' to be applied before this series. So they should apply on the u-boot-usb git tree. --> git://git.denx.de/u-boot-usb.git

I want to mention also, that everytime I look deeper into this code, I find new bugs. It appears that several parts of this code is written with interrupt handling in mind, while we have no interrupt handling at all. Assumptions are done that a interrupt handler does things asynchronous, causing long loops that have no real use at all...
So, no guarantees that _all_ problems are solved by now...

Kind Regards,

Remy

#2 lore raw

PATCH 1/2 fix USB initialisation procedure

Quoted 32 lines · Remy Bohmer

The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes. At some places directly 8,16,32,64 was used instead of the encoded value. Made a enum for the options to make this more clear and to help preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where the 'pipe' is and-ed with PIPE_* flags, where it should have been 'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use, and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails. However, the poll is useless, because the flag will never be set on a error, because there is no code that runs in a parallel that can set this flag. Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what Linux is doing. There is no difference anymore in the early initialisation sequence.

---
 common/usb.c           |   50 +++++++++++++++++++++++--------------------------
 drivers/usb/usb_ohci.c |   14 +++++--------
 include/usb.h          |   16 ++++++++++++---
 3 files changed, 43 insertions(+), 37 deletions(-)

Index: u-boot-git-22092008/common/usb.c
===================================================================

common/usb.c int usb_control_msg(struct usb_device *d · line 200

Quoted 10 lines
common/usb.c +0 -5
@@ -196,15 +196,14 @@ int usb_control_msg(struct usb_device *d
 	if (timeout == 0)
 		return (int)size;
 
-	while (timeout--) {
-		if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
-			break;
-		wait_ms(1);
-	}
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Quoted 43 lines
common/usb.c +13 -9
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}
 }
 
 /*-------------------------------------------------------------------
@@ -442,14 +441,14 @@ int usb_get_configuration_no(struct usb_
 
 
 	config = (struct usb_config_descriptor *)&buffer[0];
-	result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 8);
 	struct usb_device *parent = dev->parent;
@@ -809,20 +805,22 @@ int usb_new_device(struct usb_device *de
 
 	desc = (struct usb_device_descriptor *)tmpbuf;
 	dev->descriptor.bMaxPacketSize0 = 64;	    /* Start off at 64 bytes  */
-	dev->maxpacketsize = 64;	/* Default to 64 byte max packet size */
+	/* Default to 64 byte max packet size */
+	dev->maxpacketsize = PACKET_SIZE_64;
 	dev->epmaxpacketin [0] = 64;
 	dev->epmaxpacketout[0] = 64;
-	for (j = 0; j < 3; ++j) {
-		err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, 64);
-		if (err < 0) {
-			USB_PRINTF("usb_new_device: 64 byte descr\n");
-			break;
-		}
+
+	err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, 64);
+	if (err < 0) {
+		USB_PRINTF("usb_new_device: usb_get_descriptor() failed\n");
+		return 1;
 	}
+

Index: u-boot-git-22092008/include/usb.h
===================================================================

include/usb.h struct usb_config_descriptor { · line 137

Quoted 9 lines
include/usb.h +6 -0
@@ -129,6 +129,13 @@ struct usb_config_descriptor {
 	struct usb_interface_descriptor if_desc[USB_MAXINTERFACES];
 } __attribute__ ((packed));
 
+enum {
+	/* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
+	PACKET_SIZE_8   = 0,
+	PACKET_SIZE_16  = 1,
+	PACKET_SIZE_32  = 2,
+	PACKET_SIZE_64  = 3,

why not diectly the value?

include/usb.h struct usb_device { · line 140

Quoted 9 lines
include/usb.h +1 -1
+};
 
 struct usb_device {
 	int devnum;			/* Device number on USB bus */
@@ -137,9 +144,12 @@ struct usb_device {
 	char prod[32];			/* product */
 	char serial[32];		/* serial number */
 
-	int maxpacketsize;		/* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */

Best Regards,
J.

#3 lore raw

PATCH 1/2 fix USB initialisation procedure

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 11 lines · In message <[email protected]> you wrote:

Review

Quoted 3 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Review

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Actually the "else" should be removed.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the strict scientific sense we all feed on death -- even
vegetarians.
	-- Spock, "Wolf in the Fold", stardate 3615.4
#4 lore raw

PATCH 1/2 fix USB initialisation procedure

Quoted 7 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 4 lines · In message <[email protected]> you wrote:

Review

Quoted 3 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Quoted 9 lines
Quoted 7 lines

Review

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

Quoted 1 line

Actually the "else" should be removed.

How so?

Best regards
Markus

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")
#5 lore raw

PATCH 1/2 fix USB initialisation procedure

Quoted 19 lines · Markus Klotzb?cher
Quoted 8 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 5 lines · In message <[email protected]> you wrote:

Review

Quoted 2 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Quoted 9 lines
Quoted 7 lines

Review

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quoted 3 lines

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.

Quoted 3 lines
Quoted 1 line

Actually the "else" should be removed.

How so?

Because of the "return dev->act_len;" above. :)

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#6 lore raw

PATCH 1/2 fix USB initialisation procedure

Quoted 24 lines · Stefan Roese
Quoted 19 lines · Markus Klotzb?cher
Quoted 8 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 5 lines · In message <[email protected]> you wrote:

Review

Quoted 2 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Quoted 9 lines
Quoted 7 lines

Review

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quoted 3 lines

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

Quoted 8 lines

ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.

Quoted 3 lines
Quoted 1 line

Actually the "else" should be removed.

How so?

Because of the "return dev->act_len;" above. :)

Ahh, I see!
:-)

Best regards
Markus

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")
#7 lore raw

PATCH 1/2 fix USB initialisation procedure

In reply to Stefan Roese
Quoted 24 lines · Stefan Roese
Quoted 16 lines · Markus Klotzb?cher
Quoted 7 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 4 lines · In message <[email protected]> you wrote:

Review

Quoted 2 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {} to if too or remove the else

Quoted 8 lines
Quoted 7 lines

Review

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quoted 3 lines

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Actually the "else" should be removed.

How so?

Because of the "return dev->act_len;" above. :)

Best regards,
Stefan

Also agreed.

While we are painting the bike shed, I would suggest a better structure would be to flip the conditional so that the normal flow goes out the end of the module and the abnormal flow returns early. (The comment is also a coding standards violation for multiline comments and has two typos in it.)

	if (dev->status != 0) {
		/*
		 * Let's wait a while for the timeout to elapse.
		 * It has no real use, but it keeps the interface happy.
		 */
		wait_ms(timeout);
		return -1;
	}

	return dev->act_len;
}

Hmmm, looking at the original changeset, my above point has some validity. While we (gcc) can do a flow analysis and recognize that something will be returned in all cases due to the if/else, it doesn't jump out at a casual observation of the code. On the surface, the code looks like it can fall off the end of the function (e.g. return "void"), which would be very wrong. Making it obvious that the Right Thing[tm] is returned: priceless.

Quoted 11 lines
common/usb.c +0 -5
@@ -196,15 +196,14 @@ int usb_control_msg(struct usb_device *d
 	if (timeout == 0)
 		return (int)size;
 
-	while (timeout--) {
-		if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
-			break;
-		wait_ms(1);
-	}

common/usb.c int usb_control_msg(struct usb_device *d · line 207

Quoted 10 lines
common/usb.c +5 -1
 	if (dev->status == 0)
 		return dev->act_len;
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}
 }

I like green paint,
gvb

#8 lore raw

PATCH 1/2 fix USB initialisation procedure

In reply to Stefan Roese

Dear Stefan Roese,

Quoted 12 lines · In message <[email protected]> you wrote:
Quoted 12 lines
Quoted 11 lines
Quoted 9 lines

Review

Quoted 9 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quoted 6 lines
Quoted 3 lines

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.

NAK, and NAK again from me. Note that it's not only a single small violation, there is a whole list of it evenin this short code snippet:
- incorrect brace style
- unnecessary indentation
- incorrect multi-line comment style

It is much easier to fix such code when it's being added, than to fix it later (which may or may not happen). See all the examples that got commited that way - and that haven't been fixed since.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Experience is what causes a person to make new  mistakes  instead  of
old ones.
#9 lore raw

PATCH 1/2 fix USB initialisation procedure

Quoted 26 lines · Wolfgang Denk
Quoted 12 lines · In message <[email protected]> you wrote:
Quoted 12 lines
Quoted 11 lines
Quoted 9 lines

Review

Quoted 9 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

Good catch.

Quoted 6 lines
Quoted 3 lines

Quite honest, I think this is *way* to pedantic. I'd really prefer to let people who are contributing significantly do their work instead of bugging them with such rare coding style violations.

ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.

NAK, and NAK again from me. Note that it's not only a single small violation, there is a whole list of it evenin this short code snippet:
- incorrect brace style
- unnecessary indentation
- incorrect multi-line comment style

Quoted 3 lines

It is much easier to fix such code when it's being added, than to fix it later (which may or may not happen). See all the examples that got commited that way - and that haven't been fixed since.

True, you're technically right, of course, and I don't question enforcing coding style in general. I just think that being too critical has the potential of putting people off, and IMHO this list can be very critical. Sometimes it's better to get a patch with a couple of coding style violations than keeping the bug it would have fixed.

Best regards
Markus

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")
#10 lore raw

PATCH 1/2 fix USB initialisation procedure

In reply to Wolfgang Denk

Hello All,

Quoted 5 lines

NAK, and NAK again from me. Note that it's not only a single small violation, there is a whole list of it evenin this short code snippet:
- incorrect brace style
- unnecessary indentation
- incorrect multi-line comment style

Okay, I used Linux/checkpatch.pl to check the coding style. It did not complain at all, so are we in U-boot more pedantic than the pedantic linix/checkpatch.pl script?

But, to keep everybody happy, I will change that and post a new patch soon...

Remy

Quoted 20 lines

It is much easier to fix such code when it's being added, than to fix it later (which may or may not happen). See all the examples that got commited that way - and that haven't been fixed since.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Experience is what causes a person to make new mistakes instead of old ones.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#11 lore raw

PATCH 1/2 fix USB initialisation procedure

In reply to Markus Klotzbücher

Dear Markus =?iso-8859-1?Q?Klotzb=FCcher?=,

Quoted 11 lines · In message <20081009144357.GA27523@lisa> you wrote:
Quoted 11 lines
Quoted 11 lines

Review

Quoted 3 lines
(quoted diff) +0 -0
 	if (dev->status == 0)
 		return dev->act_len;

please add {}?to if too or remove the else

Quoted 7 lines
(quoted diff) +5 -1
-	else
+	else {
+		/* Let's wait a while for the timeout to elaps.
+		 * it has no real use, but it keeps the interface happy. */
+		wait_ms(timeout);
 		return -1;
+	}

...

Quoted 3 lines
Quoted 1 line

Actually the "else" should be removed.

How so?

Like that:

	if (dev->status == 0)
		return dev->act_len;
	
	/*
	 * Let's wait a while for the timeout to elaps.
	 * it has no real use, but it keeps the interface happy.
	 */
	wait_ms(timeout); 
	return -1;

What exactly was your problem?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Very ugly or very beautiful women should be flattered on their
understanding, and mediocre ones on their beauty.
                                       -- Philip Earl of Chesterfield
#13 lore raw

cover Some more USB-OHCI bugfixes

In reply to Remy Bohmer

Hi Remy,

Quoted 5 lines · Remy Bohmer

The USB OHCI init procedure sets the maximum message length the wrong way. A max of 64 bits should not be done by writing '64' in maxpacketsize, but '3'. While fixing this problem it turned out that there is more wrong here in this code it turned out that the wrong bits were checked to determine if the pipe was of type PIPE_INTERRUPT. This series fixes those errors also.

Ok, great!

Quoted 4 lines

I made it 2 seperate patches. The 1st of this series is fully tested and correct on at least the AT91SAM9261 cores. I hope it fixes the known problems on AT91SAM9263 (and other) cores also, maybe Stelian can verify this. If it does not help on sam9263, it should not make it worse either...

Ok, looking forward to feedback...

Quoted 4 lines

The 2nd patch, however, is created by search-for-the-same-errors-and-replace. I am not able to test that patch, I do not have the boards, so that needs to be done by others or by review. It is clear that code there is buggy in the first place.

Ok.

Quoted 4 lines

These patches require my previous series called
'Improve stability USB memory sticks for the common OHCI USB layer.' to be applied before this series. So they should apply on the u-boot-usb git tree. --> git://git.denx.de/u-boot-usb.git

I'll test them here on sequoia and apply if they pass :-)

Quoted 6 lines

I want to mention also, that everytime I look deeper into this code, I find new bugs. It appears that several parts of this code is written with interrupt handling in mind, while we have no interrupt handling at all. Assumptions are done that a interrupt handler does things asynchronous, causing long loops that have no real use at all...
So, no guarantees that _all_ problems are solved by now...

Yes, this is ancient Linux code, but in contrast to the linux usb stack wasn't rewritten several times. It was considered several times to (re) import current Linux usb code, but it's obviously no small job...

Thank you for the great work!

Best regards
Markus

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")
#14 lore raw

cover Some more USB-OHCI bugfixes

In reply to Remy Bohmer

Le mercredi 08 octobre 2008 ? 10:54 +0200, Remy Bohmer a ?crit :

Quoted 4 lines

I made it 2 seperate patches. The 1st of this series is fully tested and correct on at least the AT91SAM9261 cores. I hope it fixes the known problems on AT91SAM9263 (and other) cores also, maybe Stelian can verify this. If it does not help on sam9263, it should not make it worse either...

I'll hopefully do the tests tomorrow.

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>
#15 lore raw

cover Some more USB-OHCI bugfixes

In reply to Remy Bohmer

Le mercredi 08 octobre 2008 ? 10:54 +0200, Remy Bohmer a ?crit :

Quoted 4 lines

I made it 2 seperate patches. The 1st of this series is fully tested and correct on at least the AT91SAM9261 cores. I hope it fixes the known problems on AT91SAM9263 (and other) cores also, maybe Stelian can verify this. If it does not help on sam9263, it should not make it worse either...

It still doesn't help (on AT91SAM9263):

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_new_device: usb_get_descriptor() failed
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x1 index 0x2 length 0x0 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
U-Boot>

Signature · 1 line
Stelian Pop <[email protected]>
#16 lore raw

cover Some more USB-OHCI bugfixes

Hello Stelian,

Quoted 1 line

It still doesn't help (on AT91SAM9263):

grmbl...
I believe this has to be debugged on this specific controller, since I do not have one here I cannot debug it myself... :-(
At least we made a large step forward on many other cores, but apparently we are not there yet for all cores...

Looking at the logging, it seems that communication to the root hub itself is working properly, but everything to the bus fails. Are you sure that _all_ peripheral clocks are running? Are you sure that the 48MHz clock is running (derived from PLLB), and configured properly?
This clock is required, but is usually _not_ configured by U-boot (for the AT91SAM series) but by the bootstrap code. You could check if the current settings for PLLB matches the settings done by Linux.

Good luck... (I hope to hear from you if you get it working, or if I can do anything to assist you on this)

Kind Regards,

Remy

Quoted 50 lines

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_new_device: usb_get_descriptor() failed
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x1 index 0x2 length 0x0 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
U-Boot>

--
Stelian Pop <[email protected]>

#17 lore raw

cover Some more USB-OHCI bugfixes

Le jeudi 09 octobre 2008 ? 11:51 +0200, Remy Bohmer a ?crit :

Quoted 8 lines

Looking at the logging, it seems that communication to the root hub itself is working properly, but everything to the bus fails. Are you sure that _all_ peripheral clocks are running? Are you sure that the 48MHz clock is running (derived from PLLB), and configured properly?
This clock is required, but is usually _not_ configured by U-boot (for the AT91SAM series) but by the bootstrap code. You could check if the current settings for PLLB matches the settings done by Linux.

Bingo ! The bootstrap code does appear to setup some wrong values for the PLLB multiplier/divisor. Once I set up the PLLB to use the same values as Linux, USB starts to work ! Yay !

Still, only one of my three USB sticks works, the other two exhibit some error, so maybe there is something additional to be done:

The working USB stick says:

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 set address 2
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x27 get_conf_no 0 Result 39, wLength 39
if 0, ep 0
if 0, ep 1
if 0, ep 2
##EP epmaxpacketout[1] = 64
##EP epmaxpacketin[2] = 64
##EP epmaxpacketin[3] = 64
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=1, Product=2, SerialNumber=3
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 2 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x303 index 0x409 length 0xFF Manufacturer P Technology
Product USB Mass Storage Device
SerialNumber 0000000000058D
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 2 USB Device(s) found

       scanning bus for storage devices... usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0

usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x82 length 0x0
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x1 length 0x0 1 Storage Device(s) found
U-Boot> usb storage
Device 0: Vendor: UT163 Rev: 0.00 Prod: USB Flash Disk
Type: Removable Hard Disk
Capacity: 963.9 MB = 0.9 GB (1974271 x 512)
U-Boot>

And the failing one says:

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 set address 2
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x27 get_conf_no 0 Result 39, wLength 39
if 0, ep 0
if 0, ep 1
if 0, ep 2
##EP epmaxpacketin[1] = 64
##EP epmaxpacketout[2] = 64
##EP epmaxpacketin[3] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=16, Product=32, SerialNumber=48
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 2 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x310 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x320 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x330 index 0x409 length 0xFF Manufacturer TTI-WDE
Product USB 2.0 Mobile Disk
SerialNumber FF04112100886
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 2 USB Device(s) found

       scanning bus for storage devices... usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR:  USB-error: STALL: TD was moved to the Done Queue because the endpoint returned a STALL PID (4)
ERROR: USB-error: STALL: TD was moved to the Done Queue because the endpoint returned a STALL PID (4)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did

not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)

Signature · 1 line
Stelian Pop <[email protected]>
#18 lore raw

cover Some more USB-OHCI bugfixes

Hello Stelian,

Quoted 7 lines
Quoted 3 lines

This clock is required, but is usually _not_ configured by U-boot (for the AT91SAM series) but by the bootstrap code. You could check if the current settings for PLLB matches the settings done by Linux.

Bingo ! The bootstrap code does appear to setup some wrong values for the PLLB multiplier/divisor. Once I set up the PLLB to use the same values as Linux, USB starts to work ! Yay !

This is very good news, but it proves again that USB never worked before on these cores...
Maybe more pieces are missing to get it completely working...

Quoted 2 lines

Still, only one of my three USB sticks works, the other two exhibit some error, so maybe there is something additional to be done:

I see that a 'stall' state is returned by the device. U-boot handles the stall state always as an error, and there is no recovery from that.
Maybe, Markus has an idea to solve this?

Kind Regards,

Remy

Quoted 422 lines

The working USB stick says:

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 set address 2
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x27 get_conf_no 0 Result 39, wLength 39
if 0, ep 0
if 0, ep 1
if 0, ep 2
##EP epmaxpacketout[1] = 64
##EP epmaxpacketin[2] = 64
##EP epmaxpacketin[3] = 64
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=1, Product=2, SerialNumber=3
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 2 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x303 index 0x409 length 0xFF Manufacturer P Technology
Product USB Mass Storage Device
SerialNumber 0000000000058D
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 2 USB Device(s) found

      scanning bus for storage devices... usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0

usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x82 length 0x0
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x1 length 0x0 1 Storage Device(s) found
U-Boot> usb storage
Device 0: Vendor: UT163 Rev: 0.00 Prod: USB Flash Disk
Type: Removable Hard Disk
Capacity: 963.9 MB = 0.9 GB (1974271 x 512)
U-Boot>

And the failing one says:

usb start
(Re)start USB...
USB: scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF Manufacturer
Product OHCI Root Hub
SerialNumber
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1 length 0x0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0 set address 2
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x27 get_conf_no 0 Result 39, wLength 39
if 0, ep 0
if 0, ep 1
if 0, ep 2
##EP epmaxpacketin[1] = 64
##EP epmaxpacketout[2] = 64
##EP epmaxpacketin[3] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 new device strings: Mfr=16, Product=32, SerialNumber=48
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF USB device number 2 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x310 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x320 index 0x409 length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x330 index 0x409 length 0xFF Manufacturer TTI-WDE
Product USB 2.0 Mobile Disk
SerialNumber FF04112100886
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 2 USB Device(s) found

      scanning bus for storage devices... usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR:  USB-error: STALL: TD was moved to the Done Queue because the endpoint returned a STALL PID (4)
ERROR: USB-error: STALL: TD was moved to the Done Queue because the endpoint returned a STALL PID (4)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did

not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
usb_control_msg: request: 0xFF, requesttype: 0x21, value 0x0 index 0x0 length 0x0
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did not provide a handshake (OUT) (5)

--
Stelian Pop <[email protected]>

#19 lore raw

cover Some more USB-OHCI bugfixes

Le vendredi 10 octobre 2008 ? 09:21 +0200, Remy Bohmer a ?crit :

Quoted 6 lines

Hello Stelian,

Quoted 3 lines
Quoted 3 lines

This clock is required, but is usually _not_ configured by U-boot (for the AT91SAM series) but by the bootstrap code. You could check if the current settings for PLLB matches the settings done by Linux.

Quoted 7 lines
Quoted 3 lines

Bingo ! The bootstrap code does appear to setup some wrong values for the PLLB multiplier/divisor. Once I set up the PLLB to use the same values as Linux, USB starts to work ! Yay !

This is very good news, but it proves again that USB never worked before on these cores...
Maybe more pieces are missing to get it completely working...

No, USB did work before on these cores, as the Atmel guys confirmed. I guess some older versions of AT91Bootstrap had the proper PLLB configuration settings which made USB work...

Stelian.

Signature · 1 line
Stelian Pop <[email protected]>
#20 lore raw

cover Some more USB-OHCI bugfixes

Hello Stelian,

Quoted 7 lines
Quoted 3 lines

This is very good news, but it proves again that USB never worked before on these cores...
Maybe more pieces are missing to get it completely working...

No, USB did work before on these cores, as the Atmel guys confirmed. I guess some older versions of AT91Bootstrap had the proper PLLB configuration settings which made USB work...

Besides the bootstrap, Atmel always used the older series 1.1.2 till 1.1.5 which they patched themselves. and the only deliverables that worked, were precompiled and delivered as binary by Atmel with a GCC 3.x compiler. This was my starting point for debugging these problems, and put me on the compiler dependant problems in the first place. In U-boot mainline it never worked before.

Remy

Quoted 6 lines

Stelian.
--
Stelian Pop <[email protected]>