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

Aras Vaichas <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Alan Stern wrote:
> On Tue, 9 Oct 2007, Aras Vaichas wrote:
> 
>> I just discovered that not all devices create a "product" file when inserted, 
>> so I've changed the script to look for a symbolic link to the device driver. 
>> AFAIK, an unknown device will not have this link (please correct me if I am wrong).
>>
>> ---- SNIP ----
>>
>> #!/bin/sh
>>
>> BASE="/sys/devices/platform/at91_ohci/usb1/1-1/1-1:1.0"
>>
>> indicated=0
>> while [ 1 ]; do
>>      sleep 1
>>      if [ $indicated == 0 ]; then
>>          if [ -d "$BASE" ]; then
>>              indicated=1
>>              if [ -h "$BASE/driver" ]; then
>>                  logger "A known USB device has been inserted."
>>              else
>>                  logger "An unknown USB device has been inserted."
>>              fi
>>          fi
>>      else
>>          if [ ! -d "$BASE" ]; then
>>              indicated=0
>>          fi
>>      fi
>> done
> 
> The principle is valid.  Ideally the script wouldn't poll at 1-second
> intervals; instead it would be called by the hotplug system whenever a
> new device was added and would check that device after a 1-second 
> delay.
> 
> The script should also check to see whether there are no interface
> subdirectories of the device directory.  If there aren't any, an error
> message should be generated; it means the system wasn't able to
> configure the device.
> 
> There's some ambiguity about how to handle the situation where there 
> are multiple interfaces, some of which have drivers and some don't.  I 
> guess you can say that as long as any of the interfaces do have a 
> driver then the device is "known" or "supported".

Alan,

I think the best option is to take this over to hotplug/udev as I think it 
should be a userspace concern, especially considering the minority nature of 
the original problem.

Thank you for the help.

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.