On Thursday 24 February 2005 8:16 am, Randy.Dunlap wrote: > Steve Calfee wrote: > > > > IIRC, one reason this was tried (and dropped) is that some devices > > load new firmware which alters all/most/some of the device > > descriptors, so the kernel cache is incorrect... unless they are > > re-read after a firmware download.
And the firmware download has to handle that anyway, so I never quite understood that to be a good example. Specifically, I think that if the strings are tossed out of the cache when the device gets reset after firmware update, these problems will all go away. > > Anybody else recall this? or am I remembering it incorrectly? > > > > -- > > ~Randy > > > > > > > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > Well, I just fired up my Keyspan usb to rs232 adapter based on Cypress' > > EZUSB - connected to "winXP home". It morphs itself after reenumeration > > to a device with different strings than the original device. The EZUSB scheme is pretty effective ... the host side OS sees this as a full disconnect/reconnect sequence, initiated by the peripheral. One other widely used scheme is the DFU class spec, plus variants. The DFU scheme just involves a host-initiated device reset. Now there are two variants here that I'm aware of. In one case the product/vendor code changes, so pretty much any OS will detect that the descriptors changed. That's what the DFU spec says to do, ISTR. The other variant -- seen at least in some Atmel WLAN adapters, but not required by the DFU in some of their mask ROMs -- keeps the product and vendor codes unchanged, and changes only the config descriptors. Currently, when Linux resets a device it will check for both cases. Which is why I think that just flushing the string cache on reset will suffice. > > So my conclusion is that having the OS cache strings should work fine, > > as long as devices that detach are removed from the cache. That works for EZ-USB ... someone once told me that scheme is patented, which would explain why DFU uses a less robust scheme! > > There may be other mutant USB devices that change their string > > descriptors while in use, but I have not seen one. In fact strings are > > pretty useless in a device, many don't even have any strings. > > Yep, that all makes sense, thanks. > > -- > ~Randy Well, purge on disconnect plus purge-on-reset should cover all the bases I know about. There are cases where the strings provide essential information. But those aren't "informative" strings in the device, config, or interface descriptors ... they're ones found in function-specific ones. Example: CDC Ethernet adapters use strings to passs the Ethernet addresses. - Dave ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel