On Tue, Mar 30, Greg KH wrote: > On Tue, Mar 30, 2004 at 08:18:12PM +0200, Olaf Hering wrote: > > On Tue, Mar 30, Greg KH wrote: > > > > > On Tue, Mar 30, 2004 at 05:58:31PM +0200, Olaf Hering wrote: > > > > > > > > WHY is all the vendor, product, serial and what not info still dynamic? > > > > How can the info change during the "lifetime" of an attached USB device? > > > > > > Because the device can change those strings at any time if it wants to > > > (and I've seen devices that do just that.) So we can't cache the data, > > > and must ask the device every time for the string. > > > > What devices? > > I don't remember, but I think a large number of USB printers had big > problems. They changed their serial number and product strings > depending on the way the printer was configured. Nasty buggers.
argh.. > > And why would that matter during the hot phase of the hardware > > detection, when usb, scsi, input or block agent runs? > > One of the hotplug scripts care about the serial number or product > string of the device? Is this something other than udev asking for it? There is more than udev. Sure udev is one of them, but does keep udev all data about the device? It doesnt. And even if it did, it would read all files in sysfs, each one would send queries over the wire, each of them during the "hot phase" of plugin. Now imagine a storage device, enough partitions, each of the block events tries to figure out what device is behind the node to create a useful device name. thats the real problem. And thats just udev. Other tools may want to present an icon on the desktop, so they have to figure out what the device is. I dont claim that these tools are really clever, but thats what we have. In the ideal case, "something" would collect all the data at once and presents them if needed. I hoped sysfs would be exactly that. But no, still the same old shit.. > > So far this sort of thing has only caused trouble, it doesnt help > > anyone. Please rewrite the parts of the USB stack to make the info > > static. > > I have not seen any reports, other than broken usb-storage devices. We > tried to make these strings static a long time ago in 2.2/early 2.4 > timeframe and too many problem devices cropped up, so we went back to > the (simpler) method of not caching anything. > > What kind of problems have you seen reported? I just got one of these storage devices, card reader. And its not only the media polling. Things go downhill during plugin time. sda, sdb, sdc, sdd, that makes 4 devices + 4 scsi generic events + the possible partitions. Each of them wants to know details.. T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=3538 ProdID=0015 Rev= 0.12 S: Manufacturer=GENERIC S: Product=USB Mass Storage Device S: SerialNumber=RD123456789 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=10ms -- USB is for mice, FireWire is for men! sUse lINUX ag, nÃRNBERG ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
