Re: Autosuspend problem - some explanation needed.
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Mon, 18 Jun 2007, Dave Mielke wrote: > [quoted lines by Alan Stern on 2007/06/18 at 12:03 -0400] > > >I shouldn't think it would be too much harder to read several sysfs > >files than a single usbfs file. > > Except that it starts to get messy if each system call is protected with error > checking and each piece of data read in as text is tested for validity. Perhaps > some or all such carefulness isn't necessary, but it does tend to protect > against unforeseen problems. It's much simpler to read it all in at once. > > >Do you really need anything other than > >the vendor ID, the product ID, and perhaps the bcdDevice value? > > That's mostly true for device selection. Once we know we have the right device, > though, we do use the string index fields to fetch the strings for logging. I > know the strings teemselves are in sysfs, but to keep that code portable we > read the string desccriptors from the selected device. > > It was just an idea which would make switching back to a truly passive device > descriptor read (like it has been before autosuspend) easy, not only for us but > also for other applications. Greg, what do you think? Is it reasonable to add a binary sysfs attribute file containing the device descriptor? (And perhaps also one containing the current configuration descriptor, and the interface descriptors in their individual subdirectories. Maybe even the endpoint descriptors too.) Even though the binary descriptors are available in usbfs, when a device's usbfs file is opened the device is automatically resumed. This means that a program looking for a particular device will wake up a bunch of unrelated devices. With sysfs there is no such problem. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-usb-users@xxxxxxxxxxxxxxxxxxxxx To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
[Linux USB] [Linux USB Devel] [Video for Linux] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Video Projectors] [PDAs] [Free Online Dating] [Hacking TiVo] [Linux Kernel] [Linux SCSI] [XFree86] [Devices] [Big List of Linux Books] [16.7MP]