Re: [PATCH] USB: OTG: Fix weirdnesses on enumerating partial otg devices

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Felipe Balbi
Date: Tuesday, February 12, 2008 - 1:22 pm

On Tue, Feb 12, 2008 at 05:02:47AM -0800, David Brownell wrote:

Don't be sarcastic I won't even fall into what Jean Delvare told you.


True, but allowing hnp nowing we're b_host doesn't sound correct. If
we're b_host it can get two scenarios we would get to fall into this
state:

	1. We asked to become host; or
	2. A_device allowed us become host because it can't handle us.

In both cases, HNP is quite useless happening again, don't you think?
We should at least try to enumerate a_peripheral, if it can't due to
our power capabilities i.e. 100mA, we'll fall into overcurrent
protection and we'll suspend the bus and disconnect, which would give
a_device another change to enumerate us.

This sound much better to me.


True, but...


it shouldn't happen again at this point. If we're b_host, we should try to
enumerate a_peripheral. If it draws more than 100mA the session should
end, otherwise we'd fall into hnp loops until we start getting hub port
errors and linux decide to suspend roothub and end the session.


True, neither is in other's whitelist, but the point is:

 1. Currently standard-a device supports hnp only on A states
 2. Currently standard-b device supports hnp on both roles
 3. A-device enumerates b-device, checks it's not tpl'ed and allow hnp
 4. B-device become b_host, checks a_peripheral is not on its tpl, even
 though it has support for that device class and it draws less than
 100mA.

According to otg tpl clarification, they should work in this scenario,
shouldn't they ? Or should they stay in an hnp loop until someone
decides to end the session ?

-- 
	- Balbi
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] USB: OTG: Fix weirdnesses on enumerating parti ..., Felipe Balbi, (Tue Feb 12, 1:22 pm)