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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: ext David Brownell <david-b@...>
Cc: <felipe.balbi@...>, <linux-kernel@...>, <linux-usb@...>, <me@...>
Date: Thursday, February 14, 2008 - 1:03 am

On Wed, Feb 13, 2008 at 01:36:00PM -0800, David Brownell wrote:

Whenever we finnish using the bus we'd suspend it. This would sinalize
a_peripheral switch back to a_host. Also, even though it's not on our
TPL it doesn't mean we can't work with it.


It only tell us to output a message to the user indicating it's not
supported. Same for b_host. It never says we should end the session at
that point.

OTG Rev 1.3 is unclear about this. That's why I consulted Richard Pietre
and asked him what would be the most sane way of handling hnp and he
told me to implement it always trying to work with the device even
though it's not tpl'ed.


It doesn't say your last point.

Besides, it says:
"The Targeted Peripheral List shall not list supported USB Classes or
similar devices."

By "similar" we can understand several mass storage devices. It doesn't
really matter on usb otg point of view whether we support mass storage
device A or mass storage device B, both should work if they meet otg
requirements (power consumption being the most significant issue).

We can also see the TPL example on otg rev 1.3 is not listing "similar"
devices. They are all different. Quoting from otg rev 1.3 Section 3.3:

	Vendor	       Model      Speed         Transport        VID	PID    Description
1.     Logitech       M-BJ58        LS           Int             0x046D 0xC00E USB Wheel Mouse
2.     Yamaha       YST-MS35D       FS         Isoch             0x0499 0x3002 USB Speakers
3. TEAC Corporation  FD-05PUB       FS          Bulk             0x0644 0x0000 USB Floppy Drive
4.  Hewlett Packard   D125XI        FS          Bulk             0x03F0 0x2311 All-In-One Printer/Scanner/Copier

This sounds like another clue that we should be able to "try" to work
with any mouse, any speekers, any floppy and any printer as long as they
meet power requirements because we have support for them built into the
otg device.


No cuz I'm still notifying my user the device is unsupported even though
it's not even a requirement, if the device meet otg
constraints*(explained below). Which means it might or might not work.
If it happen to work, that's fine, if it doesn't the user has been
notified about that possibility. One other thing "Device is Not
Supported" is just an example message.

* In section 3.4 OTG says:
(...) and the OTG device does not support the type of communitcation
being requested by the user, then the OTG device shall provide messages
to the user that allow him or her to understand the problem (...)"

Which means that we should notify our user if, and only if, we _really_
can't work with the device.

TPL is a list of well tested devices against the otg device under use,
it's not meant to be a list of the only workable devices we have.


I'll ask him to send me a copy and I'll mail you, that's a not a problem
:-)


I agree with you here :-)

That's why I joined OTG working group and I'm trying hard to get in
touch with them about such bugs in the specs.

I can say to you next otg spec will be much clearer about tpl ;-)


Well there is. Kernel drivers (on the case of b_host) and kernel drivers
plus power constraints (on the case of a_host).

If we don't have kernel drivers, we, for sure, can't communicate with
that device. Or maybe if we have kernel drivers for mass storage but
we attach some kind of messed up storage device using iso endpoints,
which we don't have support on musb (hypothetical situation :-p), we
can't, again, communicate with that device.


Gotcha


TPL is a list of well tested devices, like I said up there. We ship the
device with such a list, warning the user that any other device might or
might not work. This is how it should be according otg working group.


Did you see my patches proposing a tpl rework ?
I'm only missing the match class thing so I'm still notifying the user,
even though we allow communication with such devices.


Mailing otg working group. I'll get it for everybody interested ;-)


heh, I'll try to make it work.
Good we're trying to address things here.

Thanks for all your time Dave :-)

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

Messages in current thread:
Re: [PATCH] USB: OTG: Fix weirdnesses on enumerating partial..., Felipe Balbi, (Thu Feb 14, 1:03 am)