On Wed, 7 Sep 2005, Robert Marquardt wrote: > Alan Stern wrote: > > Robert: > > > > Take a look at this posting: > > > > http://marc.theaimsgroup.com/?l=linux-usb-devel&m=112569555202368&w=2 > > > > (together with the earlier messages in that thread, if you like). It > > contains some discussion and a patch to address the problem you raised, > > about choosing configurations that violate power restrictions. > > > > Alan Stern > > It does not address my problem.
Why do you say that? The patch was written _expressly_ to address your problem. Do you mean that it doesn't work? Have you tried it out? > I have a device which cleanly advertises itself as buspowered and 500 mA > in the first configuration and 100 mA in the second configuration. > I do see that handling inconsistent descriptors is problematic, but this > one is clean and still the device gets configured on a 100 mA port. Did you use the patch and still get the device configured wrongly? Did Linux _know_ that the port can only supply 100 mA? Maybe a bad descriptor indicated that the port was capable of supplying 500 mA. > A possible strategy to solve the problems would be to make the matching > strategy configurable. > > - paranoia only completely clean descriptors are accepted > - strict some devices are accepted despite contradictions in > their descriptor. Possibly with an exception list for such > devices. > - relaxed accept contradictive devices with an algorithm > - carefree accept all devices It's not a question of accepting devices but of choosing configurations. And in any case, it's not at all clear that strategies like these are workable. Bear in mind that with the two devices I tested, both had descriptors that were wrong but only one had descriptors that were self-contradictory. > Independent from that a configurable strategy for configurations :-) > should be introduced also. > > - simple choose first configuration if it meets restrictions And don't choose anything if the first config doesn't meet the restrictions? > - better try next configuration until one meets restrictions In other words, choose the earliest suitable config? > - 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? 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
