| 
      
      
      From: Marcus M. <ma...@je...> - 2011-01-23 22:31:48
      
     | 
| On Sun, Jan 23, 2011 at 10:08:42PM +0100, Linus Walleij wrote: > 2011/1/23 Marcus Meissner <ma...@je...>: > > > An important thing is btw to consider this is called for more devices than > > just MTP ones. > > > > - querying the interface descriptor string should be safe even on > > cheap chinese made USB junk. (other things might crash the devices) > > Sadly no, people actually have reported problems with that when I tested > it in Fedora so I added a patch that: > > - Only check class 0 (per interface), communications, PTP, and > vendor spec devices. > - On per-interface devices, only check it if they have atleast one > vendor spec interface. > - If it still fails to probe the OS decriptor, clear halt on EP0 > (this was probably the real problem... the rest is perhaps > a bit overcautious.) > > Microsoft likely has something similar, I remember the clear halt > requirement from some document vaguely. > > > - time... Querying the descriptors takes time during bootup if already plugged > > in and people love faster booting these days. > > > > But I think udev is operating stuff in parallel, so this should not be an issue. > > Dunno if it does that, anyway, since I implemented it in C now it > will atleast not spawn a shell for each device :-P > > So this was sort of the best I could come up with... > > The only remaining alternative is to go into the kernel and add > the probe code there (under much the same conditions I believe). Probably... Well lets see how it works out. :) Ciao, Marcus |