* [U-Boot-Users] usb problem @ 2007-04-18 22:15 kow9loon 2007-04-19 8:49 ` Markus Klotzbücher 0 siblings, 1 reply; 11+ messages in thread From: kow9loon @ 2007-04-18 22:15 UTC (permalink / raw) To: u-boot Hi, We have problems reading/writing from/to a USB NAND flash having a capacity of 512 MB. What we dicovered was: up to a capacity of 128 MB, the operations looked 'koche', thereafter, the system hanged. Our hardware setup are as follows: (1) a MPC8544E CPU; (2) a ISP 1564 PCI-USB 2.0 Host Controller; (3) a ST72681 Flash Driver Controller; and (4) a 512 MB Nand flash. We also understand that support of the OHCI driver in U-boot is only limited to support of "Mass Storage Device" class device, and rapid reading and writing could post a potential problem. We deliberately slow down the read/write traffic in an attempt to give some breathing rooms to the the driver (and possibly to the controller). Unfortunately, our endeavors, thus far, have only limited success. We would appreciate any comments that could help us to dig our way out of this hole. Thank you. Regards, Kow9loon -- View this message in context: http://www.nabble.com/usb-problem-tf3603390.html#a10066981 Sent from the Uboot - Users mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-18 22:15 [U-Boot-Users] usb problem kow9loon @ 2007-04-19 8:49 ` Markus Klotzbücher 2007-04-19 17:28 ` kow9loon 0 siblings, 1 reply; 11+ messages in thread From: Markus Klotzbücher @ 2007-04-19 8:49 UTC (permalink / raw) To: u-boot kow9loon <easter8@hotmail.com> writes: > We have problems reading/writing from/to a USB NAND flash having a capacity > of 512 MB. What we dicovered was: up to a capacity of 128 MB, the operations > looked 'koche', thereafter, the system hanged. Our hardware setup are > as Where does it hang? > follows: (1) a MPC8544E CPU; (2) a ISP 1564 PCI-USB 2.0 Host Controller; (3) > a ST72681 Flash Driver Controller; and (4) a 512 MB Nand flash. > > We also understand that support of the OHCI driver in U-boot is only limited > to support of "Mass Storage Device" class device, and rapid reading and > writing could post a potential problem. We deliberately slow down the > read/write traffic in an attempt to give some breathing rooms to the > the Some so called "crappy" USB sticks are known to have some timing problems and require additional delays, but so far no real fix has been found. Search the archives for Rodolfos "crappy Usbkeys" patch. Does this fix solve you problem? Regards Markus -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-19 8:49 ` Markus Klotzbücher @ 2007-04-19 17:28 ` kow9loon 2007-04-20 13:49 ` Rodolfo Giometti 0 siblings, 1 reply; 11+ messages in thread From: kow9loon @ 2007-04-19 17:28 UTC (permalink / raw) To: u-boot Hi Markus, At this point, we have not yet identified the location of the driver where it gets hung. Just everything got frozen once the 128 MB mark was reached. By the way, where could I get hold of the patch from Rodolfos? I did a serach and followed the link provided by Rodolfos, but the link when NOWHERE. Did Rodolfos submitted his patches to be incorporated to the U-boot trunk? If he did, where could I get hold of his patches such that I could better understand it and try it out? Thank you in advance for your help. Regards, Kow9loon Markus Klotzb?cher-2 wrote: > > > kow9loon <easter8@hotmail.com> writes: > >> We have problems reading/writing from/to a USB NAND flash having a >> capacity >> of 512 MB. What we dicovered was: up to a capacity of 128 MB, the >> operations >> looked 'koche', thereafter, the system hanged. Our hardware setup are >> as > > Where does it hang? > >> follows: (1) a MPC8544E CPU; (2) a ISP 1564 PCI-USB 2.0 Host Controller; >> (3) >> a ST72681 Flash Driver Controller; and (4) a 512 MB Nand flash. >> >> We also understand that support of the OHCI driver in U-boot is only >> limited >> to support of "Mass Storage Device" class device, and rapid reading and >> writing could post a potential problem. We deliberately slow down the >> read/write traffic in an attempt to give some breathing rooms to the >> the > > Some so called "crappy" USB sticks are known to have some timing > problems and require additional delays, but so far no real fix has been > found. Search the archives for Rodolfos "crappy Usbkeys" patch. Does > this fix solve you problem? > > Regards > > Markus > > -- > DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk > Office: Kirchenstr. 5, D-82194 Groebenzell, Germany > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > U-Boot-Users mailing list > U-Boot-Users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/u-boot-users > > -- View this message in context: http://www.nabble.com/usb-problem-tf3603390.html#a10082723 Sent from the Uboot - Users mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-19 17:28 ` kow9loon @ 2007-04-20 13:49 ` Rodolfo Giometti 2007-04-20 13:56 ` Wolfgang Denk ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Rodolfo Giometti @ 2007-04-20 13:49 UTC (permalink / raw) To: u-boot On Thu, Apr 19, 2007 at 10:28:55AM -0700, kow9loon wrote: > > At this point, we have not yet identified the location of the driver where > it gets hung. Just everything got frozen once the 128 MB mark was reached. My problem was different one. I _never_ got my board frozen due USB activity. > By the way, where could I get hold of the patch from Rodolfos? I did a > serach and followed the link provided by Rodolfos, but the link when > NOWHERE. Did Rodolfos submitted his patches to be incorporated to the U-boot > trunk? If he did, where could I get hold of his patches such that I could > better understand it and try it out? Thank you in advance for your help. Here my patches: commit a8c7af8c768d1ac657286b97952eb1e66b2dd2e0 Author: Rodolfo Giometti <giometti@linux.it> Date: Fri Mar 30 16:33:00 2007 +0200 USB: (Another) delay for crappy USB keys. Some USB keys are slow in giving back an answer when the Root HUB enables power lines. Signed-off-by: Rodolfo Giometti <giometti@linux.it> diff --git a/drivers/usb_ohci.c b/drivers/usb_ohci.c index c5e4c38..f381c40 100644 --- a/drivers/usb_ohci.c +++ b/drivers/usb_ohci.c @@ -1178,7 +1178,9 @@ pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe)); WR_RH_PORTSTAT (RH_PS_PRS); OK (0); case (RH_PORT_POWER): - WR_RH_PORTSTAT (RH_PS_PPS ); OK (0); + WR_RH_PORTSTAT (RH_PS_PPS ); + wait_ms(100); + OK (0); case (RH_PORT_ENABLE): /* BUG IN HUP CODE *********/ if (RD_RH_PORTSTAT & RH_PS_CCS) WR_RH_PORTSTAT (RH_PS_PES ); --- commit 22bd6ed0e4b31a0d1060436893d7d03c6eb203fc Author: Rodolfo Giometti <giometti@linux.it> Date: Tue Mar 6 11:32:04 2007 +0100 USB: Delay for crappy USB keys. Signed-off-by: Rodolfo Giometti <giometti@linux.it> diff --git a/common/usb.c b/common/usb.c index 0857494..087a65f 100644 --- a/common/usb.c +++ b/common/usb.c @@ -61,7 +61,7 @@ #ifdef USB_DEBUG #define USB_PRINTF(fmt,args...) printf (fmt ,##args) #else -#define USB_PRINTF(fmt,args...) +#define USB_PRINTF(fmt,args...) wait_ms(1) /* for crappy USB keys... */ #endif #define USB_BUFSIZ 512 --- Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-20 13:49 ` Rodolfo Giometti @ 2007-04-20 13:56 ` Wolfgang Denk 2007-04-20 14:06 ` Rodolfo Giometti 2007-04-23 6:45 ` Markus Klotzbücher 2007-04-23 11:22 ` Markus Klotzbücher 2 siblings, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2007-04-20 13:56 UTC (permalink / raw) To: u-boot In message <20070420134935.GB4619@enneenne.com> you wrote: > > Here my patches: Thanks a lot. Markus, I guess you will take care of that? > diff --git a/common/usb.c b/common/usb.c > index 0857494..087a65f 100644 > --- a/common/usb.c > +++ b/common/usb.c > @@ -61,7 +61,7 @@ > #ifdef USB_DEBUG > #define USB_PRINTF(fmt,args...) printf (fmt ,##args) > #else > -#define USB_PRINTF(fmt,args...) > +#define USB_PRINTF(fmt,args...) wait_ms(1) /* for crappy USB keys... */ > #endif Arghhh. But this one is definitely not ripe for mainstream yet. Please clean this up. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I haven't lost my mind -- it's backed up on tape somewhere. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-20 13:56 ` Wolfgang Denk @ 2007-04-20 14:06 ` Rodolfo Giometti 2007-04-23 6:48 ` Markus Klotzbücher 0 siblings, 1 reply; 11+ messages in thread From: Rodolfo Giometti @ 2007-04-20 14:06 UTC (permalink / raw) To: u-boot On Fri, Apr 20, 2007 at 03:56:01PM +0200, Wolfgang Denk wrote: > > diff --git a/common/usb.c b/common/usb.c > > index 0857494..087a65f 100644 > > --- a/common/usb.c > > +++ b/common/usb.c > > @@ -61,7 +61,7 @@ > > #ifdef USB_DEBUG > > #define USB_PRINTF(fmt,args...) printf (fmt ,##args) > > #else > > -#define USB_PRINTF(fmt,args...) > > +#define USB_PRINTF(fmt,args...) wait_ms(1) /* for crappy USB keys... */ > > #endif > > Arghhh. But this one is definitely not ripe for mainstream yet. Eheheheh, you already told me about this dirty trick! :P > Please clean this up. I see, but currently I'm very busy for that! Please keep this ?work around? in some TODO list until I (or someone else) can find some time to definitely resolve it. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-20 14:06 ` Rodolfo Giometti @ 2007-04-23 6:48 ` Markus Klotzbücher 2007-04-23 8:19 ` Rodolfo Giometti 0 siblings, 1 reply; 11+ messages in thread From: Markus Klotzbücher @ 2007-04-23 6:48 UTC (permalink / raw) To: u-boot Hi Rodolfo, Rodolfo Giometti <giometti@enneenne.com> writes: > On Fri, Apr 20, 2007 at 03:56:01PM +0200, Wolfgang Denk wrote: >> Please clean this up. > > I see, but currently I'm very busy for that! Please keep this ?work > around? in some TODO list until I (or someone else) can find some time > to definitely resolve it. Yes, I understood these patches as work in progress. I can apply your first patch if you want, but does it make sense without the second? Regards Markus Klotzbuecher -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-23 6:48 ` Markus Klotzbücher @ 2007-04-23 8:19 ` Rodolfo Giometti 0 siblings, 0 replies; 11+ messages in thread From: Rodolfo Giometti @ 2007-04-23 8:19 UTC (permalink / raw) To: u-boot On Mon, Apr 23, 2007 at 08:48:38AM +0200, Markus Klotzb?cher wrote: > > Yes, I understood these patches as work in progress. I can apply your > first patch if you want, but does it make sense without the second? Yes, since they resolve two different problems. It could happen that a key is recognized by the USB host as USB device but not as mass storage and it could happen that a key is not recognized as USB device at all. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-20 13:49 ` Rodolfo Giometti 2007-04-20 13:56 ` Wolfgang Denk @ 2007-04-23 6:45 ` Markus Klotzbücher 2007-04-23 8:16 ` Rodolfo Giometti 2007-04-23 11:22 ` Markus Klotzbücher 2 siblings, 1 reply; 11+ messages in thread From: Markus Klotzbücher @ 2007-04-23 6:45 UTC (permalink / raw) To: u-boot Hi Rodolfo, Rodolfo Giometti <giometti@enneenne.com> writes: > On Thu, Apr 19, 2007 at 10:28:55AM -0700, kow9loon wrote: >> >> At this point, we have not yet identified the location of the driver where >> it gets hung. Just everything got frozen once the 128 MB mark was reached. > > My problem was different one. I _never_ got my board frozen due USB > activity. Yes, I know. But I figured it could be worth trying nevertheless. Regards Markus Klotzbuecher -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-23 6:45 ` Markus Klotzbücher @ 2007-04-23 8:16 ` Rodolfo Giometti 0 siblings, 0 replies; 11+ messages in thread From: Rodolfo Giometti @ 2007-04-23 8:16 UTC (permalink / raw) To: u-boot On Mon, Apr 23, 2007 at 08:45:30AM +0200, Markus Klotzb?cher wrote: > > Yes, I know. But I figured it could be worth trying nevertheless. I see and I agree with you. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] usb problem 2007-04-20 13:49 ` Rodolfo Giometti 2007-04-20 13:56 ` Wolfgang Denk 2007-04-23 6:45 ` Markus Klotzbücher @ 2007-04-23 11:22 ` Markus Klotzbücher 2 siblings, 0 replies; 11+ messages in thread From: Markus Klotzbücher @ 2007-04-23 11:22 UTC (permalink / raw) To: u-boot Rodolfo Giometti <giometti@enneenne.com> writes: > Here my patches: > > commit a8c7af8c768d1ac657286b97952eb1e66b2dd2e0 > Author: Rodolfo Giometti <giometti@linux.it> > Date: Fri Mar 30 16:33:00 2007 +0200 > > USB: (Another) delay for crappy USB keys. > > Some USB keys are slow in giving back an answer when the Root HUB enables > power lines. > > Signed-off-by: Rodolfo Giometti <giometti@linux.it> Applied to custodian USB tree, thanks! Regards Markus Klotzbuecher -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-04-23 11:22 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-04-18 22:15 [U-Boot-Users] usb problem kow9loon 2007-04-19 8:49 ` Markus Klotzbücher 2007-04-19 17:28 ` kow9loon 2007-04-20 13:49 ` Rodolfo Giometti 2007-04-20 13:56 ` Wolfgang Denk 2007-04-20 14:06 ` Rodolfo Giometti 2007-04-23 6:48 ` Markus Klotzbücher 2007-04-23 8:19 ` Rodolfo Giometti 2007-04-23 6:45 ` Markus Klotzbücher 2007-04-23 8:16 ` Rodolfo Giometti 2007-04-23 11:22 ` Markus Klotzbücher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox