On Mon, 7 Mar 2005 14:23:27 -0500 (EST), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, 7 Mar 2005, Dmitry Torokhov wrote: > > > http://marc.theaimsgroup.com/?l=linux-kernel&m=109944258827464&w=2 > > A very interesting and relevant thread; thank you for pointing it out. > The conclusion was that as of last November, Greg was trying to put > together a solution. Has there been any progress? > > A more concrete question is: Should mutual exclusion between probe/remove > and suspend/resume be handled by the bus rwsem, by a semaphore in struct > device, or by individual bus drivers? Offhand I don't see any reason why > the rwsem wouldn't be enough. > I think the most flexible way would be having a per-device semaphore (managed by driver core). This way operations WRT one device are serialized but you not getting into deadlocks if you need to add or drop some devices. -- Dmitry