On Thu, 15 Jan 2004, Oliver Neukum wrote: > Am Donnerstag, 15. Januar 2004 21:00 schrieb David Brownell: > > As a rule, using fewer locks is better. > > Exactly, and we currently use more locks than I like. 2.4 was clearer. > But two locks with clear ownership is better than one lock with shared > ownership.
Drivers probably won't change very rapidly. For some time to come I think most will end up using a private lock. The one exception is the hub driver, but that's really part of the core. > > I'm not sure I agree that drivers should be able to block those calls. > > But if there's a real need, it'd clearly be rare; and I suspect that > > using dev->serialize would suffice. > > As we have sleepable callbacks in these codepaths we cannot prevent > blocking there. It is important that we stay consistent. We currently do > synchronisation between the core and drivers by callbacks and should > therefore limit ourselves to this one method. There isn't much difference between a driver blocking the core from calling disconnect() by means of ->serialize and a driver sleeping within disconnect(). I'm amenable to either approach, and in fact the core will work properly either way -- provided the blocking doesn't last _too_ long. This decision can simply be left up to the individual drivers. Alan Stern ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel