Re: Unsupported device message, Compliance C.2, part 4
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 8 Oct 2007, Aras Vaichas wrote: > Alan Stern wrote: > > On Fri, 5 Oct 2007, Aras Vaichas wrote: > >> Hi, > >> > >> We need to comply with the "USB-IF Embedded Host Compliance Plan", section C.2, > >> part 4 which states: > >> > >> "4. Messaging (No Silent Failure): > >> a. Unsupported device message. Attach a device that is known not to be > >> supported. An appropriate message should be displayed. > >> b. If hubs are not supported, a "Hubs not supported" or similar message must > >> appear. A generic "device not supported" message is not acceptable on a hub > >> connect." > > > > Is this meant to apply to all USB hosts? Only "embedded" hosts > > (whatever they are)? Only OTG devices? > > > The compliance plan document defines an Embedded Host as: "A USB device with > limited hardware resources. An embedded host's capability is application > specific with no ability (or restricted ability) to dynamically add new device > support." > > see http://www.usb.org/developers/docs/EH_Compliance_v1_0.pdf I see. So these error messages wouldn't be needed on a regular desktop or laptop system (although they wouldn't hurt). > Further clarification of "No Silent Failure" can be found here: > > http://compliance.usb.org/index.asp?UpdateFile=Policies&Format=Standard#13 > > "The USB-IF enforces a "no silent failure" rule. This means that an > implementation of USB must not appear broken to the consumer. In configurations > where the consumer's expectations are not met, either the peripheral or host > must provide appropriate and useful feedback to the consumer regarding the > problem." In an embedded host, the system log probably isn't accessible to the user. Error messages would have to appear somewhere else -- although just where would depend on the particular system. > > The requirements are not entirely clear. What does it mean for a > > device to be supported? Is it supported if there is a driver compiled > > into the kernel? What if there is a driver in a loadable module? > > What if there is a userspace driver? > > It is supported if the USB device can be plugged into the host and will > function as expected. > > I looked at it this way, if I've created a system where I only have device > driver support for USB Flash Drives, and I plug in a USB Serial Dongle, the > system should create a log message which says something like, "Unsupported USB > device inserted". Presumably an embedded host has a limited set of drivers builtin, with no facility for adding extra drivers. In this setting, you can see if any of the builtin drivers will bind to an interface, and if none of them do, you are justified in saying the device is unsupported. However there may be a delay involved in loading the appropriate driver. It might be present on a flash memory or external disk drive, rather than already loaded into RAM. So it would be necessary to delay for some time, perhaps a second or so, before generating the error message. > > What if there is a driver for > > some of a device's interfaces but not all of them? > > Then it should not fail those interfaces silently. > > > > Also, what does it mean for a device to be "known" not to be supported? > > Are there any USB devices "known" not be supported by Linux? > > Taking the context of an embedded system, everything it knows is held within > its file system. If the filing system doesn't hold an information about the > device, then it is unknown. > > > > Part b shouldn't matter; hub support is built into the Linux USB core. > > > >> Does anyone have any thoughts on how I would go about this? Has anyone else had > >> to deal with this? > >> > >> I was thinking that it might well be a udev question, but as it's USB > >> compliance related I thought I would start on this list. > > > > The requirements are so fuzzy, I don't see how anyone could ever tell > > whether they were fulfilled or not. Unless it's for something like > > OTG, where there really is a whitelist of supported devices. > > Well we have to come to some conclusion on this compliance question if we want > Linux devices to be officially USB certified. > > I've seen postings like "USB device not claimed by an active driver" > e.g. http://linux.derkeiler.com/Mailing-Lists/RedHat/2004-06/0287.html That was in the 2.4 kernel. 2.6 is different. > I figure this is what is needed, but I can't find the code that produces this > message! It doesn't exist any more. It could be added back in, but there are two problems: Adding a delay after every new device is detected won't be popular. It could be made conditional on CONFIG_EMBEDDED or some similar option. Adding an error message to the system log won't satisfy the requirements anyway. (The message won't "appear" or "be displayed".) What do you suggest? Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel