Re: [PATCH] USB: Fix OTG HNP for hub.c

Tony Lindgren
2007-05-29T20:34:58Z

* Felipe Balbi <felipebalbi@users.sourceforge.net> [070529 12:25]:
> Hi,
>
> On 5/29/07, David Brownell <david-b@pacbell.net> wrote:
>> On Tuesday 29 May 2007, Felipe Balbi wrote:
>> > From: Tony Lindgren <tony@atomide.com>
>> >
>> > This patch makes makes OTG Host Negotiation Protocol (HNP)
>> > to behave.
>>
>> Not really. It makes it strongly *MIS* behave in fact,
>> since it always kicks off HNP ... even when it should not
>> do so, because the device is in the whitelist. (Called
>> the "Targeted Peripherals List", TPL, in jargonese.)
>>
>> The two blocks of code are in the wrong order ...

Hmm, are you sure about that? My patch is based on
USB_TG_1-3.pdf and playing with usbcv13.exe and two N800s.

I'm under the impression that if the peripheral supports HNP, the
host must offer HNP at least once during the session.

And as I understand, the whitelist is for peripherals the host
supports, with HNP or no HNP.

With my patch, we offer to do HNP right in the beginning of the
session. Then the peripheral can use it or not use depending if
HNP is enabled on peripheral.

>> A more limited patch would help. Specifically, just
>> fixing whatever bug was seen in the original code,
>> rather than abstracting it into a new subroutine and
>> changing the logic while doing so.

Dave, did you ever get HNP working with any device and test
it with usbcv13.exe and OPT?

> Tony do you have any comments?
> Do you mind if I try to re-work you patch?

Felipe I guess you're the only one with OPT right now, and that's
really what we should use for doing the HNP. So go ahead!

Regards,

Tony