On Wednesday 08 March 2006 5:12 am, Li Yang-r58472 wrote:
> 
> While I dug deeper in the HNP process with EHCI host, I found

[ that your mailer is not wrapping lines at 80 characters ...?  ]


> there is a conflict.  The OTG spec defines that, in HNP, default-a
> device always supplies the vbus power even in peripheral mode.  And
> thus default-b device will work in host mode with port power off.
> Here is the problem, if I don't set the PP(Port Power) bit in PORTSC
> register of EHCI(Linux ehci stack automatically sets it, but we

It's the generic hub driver that's asking EHCI to set that bit.

But an OTG root hub doesn't behave quite like a normal hub.  Your
OTG controller needs to take over management of VBUS, and hence
by implication report not-quite-the-truth to usbcore.  (At least
for now.  It'd be possible to make the hub driver understand more
about OTG, but that's not been at the top of anyone's agenda.)


> can by-pass it), the port will not working according to the EHCI
> spec.  Otherwise, if I set the PP bit, the b_host will drive vbus
> which violates the OTG spec.

Presumably you have a solution for the B_IDLE and B_PERIPHERAL cases
too?  If so, I'm puzzled why that is being deactivated here.  Or do
you not have the basic cable-based role switching working?  HNP is
advanced stuff; get the basics working first.


> Does anyone have an idea on how to get around this?         

The best solution is to have HCD methods like hub_control() be
routines that understand the special requirements for VBUS, and
which preprocess requests accordingly.

So for example hub_control() could forward all requests except
those related to port power features directly to the standard
EHCI routine ... but those requests would be handled specially.
In your case, they'd interact with the OTG state machine.

- Dave


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to