[OpenBIOS] r701 - cpu/x86/pc/olpc dev/usb2/hcd/ehci
svn at openbios.org
svn at openbios.org
Mon Oct 29 17:17:51 CET 2007
Author: wmb
Date: 2007-10-29 17:17:51 +0100 (Mon, 29 Oct 2007)
New Revision: 701
Modified:
cpu/x86/pc/olpc/suspend.fth
dev/usb2/hcd/ehci/probe.fth
Log:
OLPC trac 4501 - If USB enumeration of a device fails,
("Failed to set device address: N"), retry the reset-port /
set-address sequence with a 5-second delay in between.
This has proven to be effective with a problem USB disk
that used to consistently fail to work with OFW. This fix does
not affect startup time in the usual case of quick-response devices.
Modified: cpu/x86/pc/olpc/suspend.fth
===================================================================
--- cpu/x86/pc/olpc/suspend.fth 2007-10-28 21:48:00 UTC (rev 700)
+++ cpu/x86/pc/olpc/suspend.fth 2007-10-29 16:17:51 UTC (rev 701)
@@ -44,7 +44,7 @@
" video-save" stdout @ $call-method \ Freeze display
s3
" video-restore" stdout @ $call-method \ Unfreeze display
- " /usb at f,5" open-dev ?dup if " resume" 2 pick $call-method close-dev then
+ " /usb at f,5" open-dev ?dup if " do-resume" 2 pick $call-method close-dev then
;
alias s suspend
Modified: dev/usb2/hcd/ehci/probe.fth
===================================================================
--- dev/usb2/hcd/ehci/probe.fth 2007-10-28 21:48:00 UTC (rev 700)
+++ dev/usb2/hcd/ehci/probe.fth 2007-10-29 16:17:51 UTC (rev 701)
@@ -12,7 +12,13 @@
0 set-target ( port dev ) \ Address it as device 0
- dup set-address if 2drop exit then ( port dev ) \ Assign it usb addr dev
+ dup set-address if ( port dev ) \ Assign it usb addr dev
+ ." Retrying with a delay" cr
+ over reset-port d# 5000 ms
+ dup set-address if ( port dev ) \ Assign it usb addr dev
+ 2drop exit
+ then
+ then ( port dev )
dup set-target ( port dev ) \ Address it as device dev
make-device-node ( )
@@ -76,7 +82,7 @@
true
;
-: resume ( -- )
+: do-resume ( -- )
init-ehci-regs
start-usb
claim-ownership
More information about the OpenBIOS
mailing list