Re: Unsupported device message, Compliance C.2, part 4

Aras Vaichas <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
<SNIP>

>> "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.

Our system doesn't have a display at all, it is just a black box with a network 
connection. We would envisage providing some notification via our 
applications's API. Our application, running with privileges, is able to access 
the log file.

I would tell the certification lab to look at the log files and see that a 
message is being generated when the unknown device is inserted. I think that 
would be sufficient to pass the Compliance test as it demonstrates that there 
is a mechanism in place.


> 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.

I think the delay would be acceptable as this would be a minority case and 
plugging in a USB device is done relatively slowly anyway.


>> 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.

Yes, CONFIG_EMBEDDED makes sense, and also CONFIG_USB_HOST_NO_SILENT_FAILURE.


> 	Adding an error message to the system log won't satisfy the
> 	requirements anyway.  (The message won't "appear" or "be
> 	displayed".)

I think it would, as it would demonstrate that a mechanism is in place that 
indicates an unclaimed device.

Should this be handled in sysfs instead of the system log?

Is there somewhere in sysfs that my application could watch to see if a device 
has been inserted but no driver has claimed it?


> What do you suggest?

Depends where and how we wish to report this information.

If it should be done by the kernel, then I would suggest adding 
CONFIG_USB_HOST_NO_SILENT_FAILURE and create the delays necessary to report an 
unclaimed device.

I've been poking around in drivers/base/dd.c and drivers/usb/core/driver.c but 
I'm not entirely sure where I would put such messages. If you could give me a 
hint, I might be able to do this work.

Otherwise, if you think this should  be udev's problem then I will take the 
problem to that list.

Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.