EHCI Addressing Capability discrepancy
Posted: Tue Nov 27, 2012 3:52 am
I'm writing a simple msc driver. I have successfully reset ehci, identified high speed usb devices, reset ports, enumerated descriptors and finally written/read a flash drive.
It works fine on the box I started development on. 64 bit cpu running 32 bit ubuntu. I was using the 64 bit QH and qTD data structures & zeroing out CTRLDSSEGMENT. When I tested on a different box with the same setup I received a master abort when attempting the first setup transaction. On a whim I switched to using 32 bit data structures and voila it works!
The problem is the HCCPARAMS 64-bit addressing capability field indicates the controller has 64-bit addressing capability. According to the EHCI docs "The value of this field determines whether software should use the data structures defined in Section 3 (32-bit) or those defined in Appendix B (64-bit)" It is set to "1" on both boxes, but box 1 performs fine whether I use 32 bit or 64 bit data structures, while box 2 only likes 32 bit data structures.
So now I'm confused as to how exactly I'm supposed to determine what data structures to use. I saw another thread on this board where someone was receiving a master abort because he wasn't using 64 bit data structures, so I know I can't just default to 32 bit and call it a day. I would like this to be relatively portable.
It works fine on the box I started development on. 64 bit cpu running 32 bit ubuntu. I was using the 64 bit QH and qTD data structures & zeroing out CTRLDSSEGMENT. When I tested on a different box with the same setup I received a master abort when attempting the first setup transaction. On a whim I switched to using 32 bit data structures and voila it works!
The problem is the HCCPARAMS 64-bit addressing capability field indicates the controller has 64-bit addressing capability. According to the EHCI docs "The value of this field determines whether software should use the data structures defined in Section 3 (32-bit) or those defined in Appendix B (64-bit)" It is set to "1" on both boxes, but box 1 performs fine whether I use 32 bit or 64 bit data structures, while box 2 only likes 32 bit data structures.
So now I'm confused as to how exactly I'm supposed to determine what data structures to use. I saw another thread on this board where someone was receiving a master abort because he wasn't using 64 bit data structures, so I know I can't just default to 32 bit and call it a day. I would like this to be relatively portable.