On Tue, Feb 22, 2005 at 01:38:03PM -0500, Alan Stern wrote:
> At present there's no way to do it in general.  If you restrict your
> program to the period while usb-storage waits before scanning the devices
> then things will work, as you've seen.  But there's no guarantee about how
> long that period is; users can set it all the way down to 0.  And ub has
> no such settling period.

I'd also prefer not to have such a period, unless there are USB pen
drives that require it, since it makes things unresponsive--when the
player inserts a card, we play a sound and display the player's name
on screen, so having that take several seconds (when it doesn't have
to--the Shuffle seems to take a couple seconds to show up as a USB
device regardless) is undesirable.

We don't need to support other types of devices; people are free to
plug in, for their own amusement, an IDE hard drive adapter or a USB
camera at their local arcade, if they happen to work; but it's not a
problem if they don't, as long as it doesn't interfere with the game.

> A less general solution that could suffice for your problem would be to
> have the kernel store the Manufacturer, Product, and Serial strings (and
> also the Configuration and Interface name strings) rather than query the
> device every time those sysfs files are accessed.  This could be done
> without much trouble.  Part of the reason it hasn't is that devices are
> allowed to change those strings at any time -- although I'm not aware of
> any which do.

Since those IDE converters seem to pass along the attached drive's name
in one of those strings, I suppose it'd make sense that it'd need to
change that string if the drive was hotplugged.

Thanks.  I don't think I'll have time to do this--short schedules suck,
and I don't know the code well enough to implement this quickly--so I
may have to disable the serial checking feature for this release.  I'd
hate to do that, though.

-- 
Glenn Maynard


-------------------------------------------------------
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

Reply via email to