[U-Boot] [patch 0/2] 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

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.
Signed-off-by: Remy Bohmer linux@bohmer.net --- 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 =================================================================== --- u-boot-git-22092008.orig/common/usb.c 2008-10-08 10:51:49.000000000 +0200 +++ u-boot-git-22092008/common/usb.c 2008-10-08 10:51:50.000000000 +0200 @@ -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; - 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); - if (result < 8) { + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 9); + if (result < 9) { if (result < 0) printf("unable to get descriptor, error %lX\n", dev->status); else printf("config descriptor too short " \ - "(expected %i, got %i)\n", 8, result); + "(expected %i, got %i)\n", 9, result); return -1; } tmp = le16_to_cpu(config->wTotalLength); @@ -777,7 +776,7 @@ int usb_new_device(struct usb_device *de * Several USB stick devices report ERR: CTL_TIMEOUT, caused by an * invalid header while reading 8 bytes as device descriptor. */ dev->descriptor.bMaxPacketSize0 = 8; /* Start off at 8 bytes */ - dev->maxpacketsize = 0; /* Default to 8 byte max packet size */ + dev->maxpacketsize = PACKET_SIZE_8; dev->epmaxpacketin [0] = 8; dev->epmaxpacketout[0] = 8;
@@ -788,15 +787,12 @@ int usb_new_device(struct usb_device *de return 1; } #else - /* this is a Windows scheme of initialization sequence, with double - * reset of the device (Linux uses the same sequence, but without double - * reset. This double reset is not considered harmful and matches the - * Windows behaviour) + /* This is a Windows scheme of initialization sequence, with double + * reset of the device (Linux uses the same sequence) * Some equipment is said to work only with such init sequence; this * patch is based on the work by Alan Stern: * http://sourceforge.net/mailarchive/forum.php?thread_id=5729457&forum_id=... */ - int j; struct usb_device_descriptor *desc; int port = -1; 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; } + dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0;
/* find the port number we're at */ if (parent) { + int j;
for (j = 0; j < parent->maxchild; j++) { if (parent->children[j] == dev) { @@ -847,10 +845,10 @@ int usb_new_device(struct usb_device *de dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0; dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0; switch (dev->descriptor.bMaxPacketSize0) { - case 8: dev->maxpacketsize = 0; break; - case 16: dev->maxpacketsize = 1; break; - case 32: dev->maxpacketsize = 2; break; - case 64: dev->maxpacketsize = 3; break; + case 8: dev->maxpacketsize = PACKET_SIZE_8; break; + case 16: dev->maxpacketsize = PACKET_SIZE_16; break; + case 32: dev->maxpacketsize = PACKET_SIZE_32; break; + case 64: dev->maxpacketsize = PACKET_SIZE_64; break; } dev->devnum = addr;
Index: u-boot-git-22092008/include/usb.h =================================================================== --- u-boot-git-22092008.orig/include/usb.h 2008-10-08 10:51:45.000000000 +0200 +++ u-boot-git-22092008/include/usb.h 2008-10-08 10:51:50.000000000 +0200 @@ -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, +};
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 */ - unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ - unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */ + /* Maximum packet size; one of: PACKET_SIZE_* */ + int maxpacketsize; + /* one bit for each endpoint ([0] = IN, [1] = OUT) */ + unsigned int toggle[2]; + /* endpoint halts; one bit per endpoint # & direction; */ + unsigned int halted[2]; /* [0] = IN, [1] = OUT */ int epmaxpacketin[16]; /* INput endpoint specific maximums */ int epmaxpacketout[16]; /* OUTput endpoint specific maximums */ Index: u-boot-git-22092008/drivers/usb/usb_ohci.c =================================================================== --- u-boot-git-22092008.orig/drivers/usb/usb_ohci.c 2008-10-08 10:51:48.000000000 +0200 +++ u-boot-git-22092008/drivers/usb/usb_ohci.c 2008-10-08 10:51:50.000000000 +0200 @@ -856,8 +856,7 @@ static void td_fill(ohci_t *ohci, unsign td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && - usb_pipeout(urb_priv->pipe)) { + if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x ", i, ((unsigned char *)td->data)[i]); printf("\n"); @@ -983,7 +982,7 @@ static void dl_transfer_length(td_t *td) tdBE = m32_swap(td->hwBE); tdCBP = m32_swap(td->hwCBP);
- if (!(usb_pipetype(lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1096,8 +1095,7 @@ static int takeback_td(ohci_t *ohci, td_ dbg("dl_done_list: processing TD %x, len %x\n", lurb_priv->td_cnt, lurb_priv->length);
- if (ed->state != ED_NEW && - (usb_pipetype(lurb_priv->pipe) != PIPE_INTERRUPT)) { + if (ed->state != ED_NEW && (!usb_pipeint(lurb_priv->pipe))) { edHeadP = m32_swap(ed->hwHeadP) & 0xfffffff0; edTailP = m32_swap(ed->hwTailP);
@@ -1287,7 +1285,7 @@ pkt_print(NULL, dev, pipe, buffer, trans #else wait_ms(1); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1538,7 +1536,7 @@ int submit_common_msg(struct usb_device
/* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype(pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100; @@ -1591,7 +1589,7 @@ int submit_common_msg(struct usb_device #endif
/* free TDs in urb_priv */ - if (usb_pipetype(pipe) != PIPE_INTERRUPT) + if (!usb_pipeint(pipe)) urb_free_priv(urb); return 0; }

On 10:54 Wed 08 Oct , Remy Bohmer wrote:
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.
Signed-off-by: Remy Bohmer linux@bohmer.net
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
--- u-boot-git-22092008.orig/common/usb.c 2008-10-08 10:51:49.000000000 +0200 +++ u-boot-git-22092008/common/usb.c 2008-10-08 10:51:50.000000000 +0200 @@ -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
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
}
/*------------------------------------------------------------------- @@ -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
--- u-boot-git-22092008.orig/include/usb.h 2008-10-08 10:51:45.000000000 +0200 +++ u-boot-git-22092008/include/usb.h 2008-10-08 10:51:50.000000000 +0200 @@ -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?
+};
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.

Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081009121044.GA25278@game.jcrosoft.org you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
Good catch.
Actually the "else" should be removed.
Best regards,
Wolfgang Denk

On Thu, Oct 09, 2008 at 03:19:22PM +0200, Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081009121044.GA25278@game.jcrosoft.org you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
Actually the "else" should be removed.
How so?
Best regards Markus

On Thursday 09 October 2008, Markus Klotzbücher wrote:
On Thu, Oct 09, 2008 at 03:19:22PM +0200, Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081009121044.GA25278@game.jcrosoft.org you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.
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@denx.de =====================================================================

On Thu, Oct 09, 2008 at 04:59:54PM +0200, Stefan Roese wrote:
On Thursday 09 October 2008, Markus Klotzbücher wrote:
On Thu, Oct 09, 2008 at 03:19:22PM +0200, Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081009121044.GA25278@game.jcrosoft.org you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.
Actually the "else" should be removed.
How so?
Because of the "return dev->act_len;" above. :)
Ahh, I see! :-)
Best regards Markus

Stefan Roese wrote:
On Thursday 09 October 2008, Markus Klotzbücher wrote:
On Thu, Oct 09, 2008 at 03:19:22PM +0200, Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081009121044.GA25278@game.jcrosoft.org you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
ACK from me here. "Minor" coding style violations like these braces issue or too long lines should not delay patches.
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.
--- u-boot-git-22092008.orig/common/usb.c 2008-10-08 10:51:49.000000000 +0200 +++ u-boot-git-22092008/common/usb.c 2008-10-08 10:51:50.000000000 +0200 @@ -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;
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
}
I like green paint, gvb

Dear Stefan Roese,
In message 200810091659.55186.sr@denx.de you wrote:
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
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

On Thu, Oct 09, 2008 at 08:45:21PM +0200, Wolfgang Denk wrote:
In message 200810091659.55186.sr@denx.de you wrote:
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
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.
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.
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

Hello All,
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
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@denx.de Experience is what causes a person to make new mistakes instead of old ones. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Dear Markus =?iso-8859-1?Q?Klotzb=FCcher?=,
In message 20081009144357.GA27523@lisa you wrote:
if (dev->status == 0) return dev->act_len;
please add {} to if too or remove the else
- else
- else {
/* Let's wait a while for the timeout to elaps.
* it has no real use, but it keeps the interface happy. */
return -1;wait_ms(timeout);
- }
...
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

At a lot of places in the code the PIPE_INTERRUPT flags and friends are used wrong. The wrong bits are compared to this flag resulting in wrong conditions. Also there are macros that should be used for PIPE_* flags. This patch tries to fix them all, however, I was not able to test the changes, because I do not have any of these boards.
Review required!
Signed-off-by: Remy Bohmer linux@bohmer.net --- board/MAI/AmigaOneG3SE/usb_uhci.c | 2 +- board/mpl/common/usb_uhci.c | 2 +- cpu/arm920t/s3c24x0/usb_ohci.c | 8 ++++---- cpu/leon3/usb_uhci.c | 2 +- cpu/mips/au1x00_usb_ohci.c | 9 +++++---- cpu/mpc5xxx/usb_ohci.c | 8 ++++---- cpu/ppc4xx/usb_ohci.c | 8 ++++---- drivers/usb/isp116x-hcd.c | 4 ++-- drivers/usb/r8a66597-hcd.c | 2 +- 9 files changed, 23 insertions(+), 22 deletions(-)
Index: u-boot-git-22092008/board/mpl/common/usb_uhci.c =================================================================== --- u-boot-git-22092008.orig/board/mpl/common/usb_uhci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/board/mpl/common/usb_uhci.c 2008-10-07 14:28:06.000000000 +0200 @@ -792,7 +792,7 @@ int uhci_submit_rh_msg(struct usb_device unsigned short wIndex; unsigned short wLength;
- if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { printf("Root-Hub submit IRQ: NOT implemented\n"); #if 0 uhci->rh.urb = urb; Index: u-boot-git-22092008/cpu/arm920t/s3c24x0/usb_ohci.c =================================================================== --- u-boot-git-22092008.orig/cpu/arm920t/s3c24x0/usb_ohci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/cpu/arm920t/s3c24x0/usb_ohci.c 2008-10-07 14:28:06.000000000 +0200 @@ -654,7 +654,7 @@ static void td_fill (ohci_t *ohci, unsig td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe)) { + if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]); printf("\n"); @@ -756,7 +756,7 @@ static void dl_transfer_length(td_t * td tdCBP = m32_swap (td->hwCBP);
- if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1025,7 +1025,7 @@ pkt_print(dev, pipe, buffer, transfer_le #else wait_ms(1); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1259,7 +1259,7 @@ int submit_common_msg(struct usb_device
/* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype (pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100; Index: u-boot-git-22092008/cpu/leon3/usb_uhci.c =================================================================== --- u-boot-git-22092008.orig/cpu/leon3/usb_uhci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/cpu/leon3/usb_uhci.c 2008-10-07 14:28:06.000000000 +0200 @@ -901,7 +901,7 @@ int uhci_submit_rh_msg(struct usb_device unsigned short wIndex; unsigned short wLength;
- if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { printf("Root-Hub submit IRQ: NOT implemented\n"); return 0; } Index: u-boot-git-22092008/cpu/mips/au1x00_usb_ohci.c =================================================================== --- u-boot-git-22092008.orig/cpu/mips/au1x00_usb_ohci.c 2008-10-07 14:27:58.000000000 +0200 +++ u-boot-git-22092008/cpu/mips/au1x00_usb_ohci.c 2008-10-07 14:28:26.000000000 +0200 @@ -654,7 +654,8 @@ static void td_fill (ohci_t *ohci, unsig td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if (1 || ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe))) { + if (1 || (usb_pipebulk(urb_priv->pipe) && + usb_pipeout(urb_priv->pipe))) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x\n",i, ((unsigned char *)(td->data+0x80000000))[i]); } @@ -758,7 +759,7 @@ static void dl_transfer_length(td_t * td tdCBP = m32_swap (td->hwCBP);
- if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1015,7 +1016,7 @@ pkt_print(dev, pipe, buffer, transfer_le #else wait_ms(1); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1249,7 +1250,7 @@ int submit_common_msg(struct usb_device
/* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype (pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100; Index: u-boot-git-22092008/cpu/mpc5xxx/usb_ohci.c =================================================================== --- u-boot-git-22092008.orig/cpu/mpc5xxx/usb_ohci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/cpu/mpc5xxx/usb_ohci.c 2008-10-07 14:28:06.000000000 +0200 @@ -660,7 +660,7 @@ static void td_fill (ohci_t *ohci, unsig td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe)) { + if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]); printf("\n"); @@ -761,7 +761,7 @@ static void dl_transfer_length(td_t * td tdCBP = ohci_cpu_to_le32 (td->hwCBP);
- if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1023,7 +1023,7 @@ static int ohci_submit_rh_msg(struct usb urb_priv.actual_length = 0; pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe)); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1248,7 +1248,7 @@ int submit_common_msg(struct usb_device
/* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype (pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100; Index: u-boot-git-22092008/drivers/usb/isp116x-hcd.c =================================================================== --- u-boot-git-22092008.orig/drivers/usb/isp116x-hcd.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/drivers/usb/isp116x-hcd.c 2008-10-07 14:28:06.000000000 +0200 @@ -687,7 +687,7 @@ retry_same: /* Start the data transfer */
/* Allow more time for a BULK device to react - some are slow */ - if (usb_pipetype(pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = 5000; else timeout = 100; @@ -822,7 +822,7 @@ static int isp116x_submit_rh_msg(struct u16 wIndex; u16 wLength;
- if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { INFO("Root-Hub submit IRQ: NOT implemented"); return 0; } Index: u-boot-git-22092008/drivers/usb/r8a66597-hcd.c =================================================================== --- u-boot-git-22092008.orig/drivers/usb/r8a66597-hcd.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/drivers/usb/r8a66597-hcd.c 2008-10-07 14:28:06.000000000 +0200 @@ -654,7 +654,7 @@ static int r8a66597_submit_rh_msg(struct
R8A66597_DPRINT("%s\n", __func__);
- if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { printf("Root-Hub submit IRQ: NOT implemented"); return 0; } Index: u-boot-git-22092008/board/MAI/AmigaOneG3SE/usb_uhci.c =================================================================== --- u-boot-git-22092008.orig/board/MAI/AmigaOneG3SE/usb_uhci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/board/MAI/AmigaOneG3SE/usb_uhci.c 2008-10-07 14:28:06.000000000 +0200 @@ -801,7 +801,7 @@ int uhci_submit_rh_msg(struct usb_device unsigned short wIndex; unsigned short wLength;
- if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { printf("Root-Hub submit IRQ: NOT implemented\n"); #if 0 uhci->rh.urb = urb; Index: u-boot-git-22092008/cpu/ppc4xx/usb_ohci.c =================================================================== --- u-boot-git-22092008.orig/cpu/ppc4xx/usb_ohci.c 2008-10-07 14:16:58.000000000 +0200 +++ u-boot-git-22092008/cpu/ppc4xx/usb_ohci.c 2008-10-07 14:28:06.000000000 +0200 @@ -660,7 +660,7 @@ static void td_fill (ohci_t *ohci, unsig td->index = index; td->data = (__u32)data; #ifdef OHCI_FILL_TRACE - if ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe)) { + if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) { for (i = 0; i < len; i++) printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]); printf("\n"); @@ -761,7 +761,7 @@ static void dl_transfer_length(td_t * td tdCBP = ohci_cpu_to_le32 (td->hwCBP);
- if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL && + if (!(usb_pipecontrol(lurb_priv->pipe) && ((td->index == 0) || (td->index == lurb_priv->length - 1)))) { if (tdBE != 0) { if (td->hwCBP == 0) @@ -1023,7 +1023,7 @@ static int ohci_submit_rh_msg(struct usb urb_priv.actual_length = 0; pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe)); #endif - if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) { + if (usb_pipeint(pipe)) { info("Root-Hub submit IRQ: NOT implemented"); return 0; } @@ -1248,7 +1248,7 @@ int submit_common_msg(struct usb_device
/* allow more time for a BULK device to react - some are slow */ #define BULK_TO 5000 /* timeout in milliseconds */ - if (usb_pipetype (pipe) == PIPE_BULK) + if (usb_pipebulk(pipe)) timeout = BULK_TO; else timeout = 100;

Hi Remy,
On Wed, Oct 08, 2008 at 10:54:13AM +0200, Remy Bohmer wrote:
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!
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...
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.
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 :-)
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

Le mercredi 08 octobre 2008 à 10:54 +0200, Remy Bohmer a écrit :
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.

Le mercredi 08 octobre 2008 à 10:54 +0200, Remy Bohmer a écrit :
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>

Hello Stelian,
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
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 stelian@popies.net

Le jeudi 09 octobre 2008 à 11:51 +0200, Remy Bohmer a écrit :
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)

Hello Stelian,
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...
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
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 stelian@popies.net

Le vendredi 10 octobre 2008 à 09:21 +0200, Remy Bohmer a écrit :
Hello Stelian,
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...
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.

Hello Stelian,
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
Stelian.
Stelian Pop stelian@popies.net
participants (7)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Jerry Van Baren
-
Markus Klotzbücher
-
Remy Bohmer
-
Stefan Roese
-
Stelian Pop
-
Wolfgang Denk