[openfirmware] r1447 - dev/usb2/hcd/ehci
svn at openfirmware.info
svn at openfirmware.info
Fri Oct 30 08:44:26 CET 2009
Author: wmb
Date: 2009-10-30 08:44:26 +0100 (Fri, 30 Oct 2009)
New Revision: 1447
Modified:
dev/usb2/hcd/ehci/qhtd.fth
Log:
USB EHCI driver - fixed a latent problem in which the type bits
were not being set in the next queue head pointer. Empirically,
this wasn't causing any problems, but it does violate the spec.
Modified: dev/usb2/hcd/ehci/qhtd.fth
===================================================================
--- dev/usb2/hcd/ehci/qhtd.fth 2009-10-30 07:36:39 UTC (rev 1446)
+++ dev/usb2/hcd/ehci/qhtd.fth 2009-10-30 07:44:26 UTC (rev 1447)
@@ -382,7 +382,7 @@
qh-ptr >qh-next l@ r@ >qh-next l!
qh-ptr >hcqh-next le-l@ r@ >hcqh-next le-l!
r@ qh-ptr >qh-next l!
- r@ >qh-phys l@ qh-ptr >hcqh-next le-l!
+ r@ >qh-phys l@ TYP_QH or qh-ptr >hcqh-next le-l!
r> sync-qhqtds
qh-ptr sync-qh
@@ -538,22 +538,25 @@
or ( done?' )
;
-: qh-done? ( qh -- done? ) >hcqh-overlay qtd-done? ;
+: qh-done? ( qh -- done? )
+ process-hc-status ( qh )
+ dup sync-qh ( qh )
+ >hcqh-overlay qtd-done? ( done? )
+;
: done? ( qh -- usberr )
begin
- process-hc-status ( qh )
- dup sync-qh ( qh )
dup qh-done? ?dup 0= if ( qh )
1 ms
dup >qh-timeout ( qh timeout-adr )
dup l@ 1- ( qh timeout-adr timeout' )
dup rot l! ( qh timeout' )
- 0=
- then
- until
+ 0= ( qh timed-out? )
+ dup if " Timeout" USB_ERR_TIMEOUT set-usb-error noop then ( qh timed-out? )
+ then ( qh exit-loop? )
+ until ( qh )
+ drop ( )
- ( qh ) qh-done? 0= if " Timeout" USB_ERR_TIMEOUT set-usb-error then
usb-error
;
More information about the openfirmware
mailing list