On Thu, 8 Sep 2005, Robert Marquardt wrote:

> I proposed a strategy using a list of known bad devices so it is 
> solvable. The HID blacklist is a sample for such a list already.

Blacklists are a bad idea in general and are better avoided.  For example, 
what happens when you plug in a new device that's not yet on the 
blacklist?  You will still have the problem of choosing a wrong 
configuration.

There should be a better way to solve your problem than resorting to a 
blacklist.

> >>- simple  choose first configuration if it meets restrictions
> > 
> > And don't choose anything if the first config doesn't meet the 
> > restrictions?
> 
> Of course. Configuring a 500 mA device on a 100 mA port can easily 
> switch off at three other innocent USB devices (or even more).
> A wellbehaved buspowered hub should detect the overcurrent situation and 
> switch off the port. This usually switches off all four ports.

That doesn't sound like a very good strategy in general.  Configurations 
don't have to be listed in any particular order; why should the first one 
be treated specially?

> > In other words, choose the earliest suitable config?
> 
> Yep. It bases on the assumption that the device developer was a fairly 
> smart one. For configurations that is acceptable even if it has been 
> tested only with Windows which uses the "simple" strategy.

How do you know what strategy Windows uses?

> >>- best    choose configuration with most functionality from the
> >>           ones meeting restrictions
> > 
> > How is Linux supposed to know whether one config provides more 
> > functionality than another?
> 
> This algorithm is to be determined. The simplest one can handle a low 
> power configuration followed by a high power configuration.

Well, that's essentially what my patch does.  The algorithm for selecting 
the most functionality is very simple (and it doesn't assume the power 
consumption is related at all to the functionality), but it should give 
reasonable results.

Alan Stern



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to