On Wednesday 11 May 2005 8:35 am, Alan Stern wrote: > On Wed, 11 May 2005, David Brownell wrote: > > > > Also, I think that deadlock on dpm_sem in the PM core is now gone, so > > > there shouldn't be any problem about unbinding drivers with no suspend > > > method. > > > > I thought so too, but then I looked at the code and I see that > > device_release_driver() calls device_detach_shutdown() which > > normally calls dpm_runtime_suspend() which grabs dpm_sem; which > > is the deadlock, given it's called from a context which already > > holds that lock. (And it all seems rather counterproductive, > > since we want to unbind the driver specifically because there > > is no suspend method!!) > > I'll have to look into this more thoroughly. > > > There might be a way out though: adding a NOP shutdown method > > to the driver that usb_register() creates. (And maybe adding > > such an entry to struct usb_driver ... so the usbcore NOP method > > only gets used for drivers that don't provide their own.) > > I don't see what adding a shutdown method has to do with drivers that > don't support suspend/resume. Anyway, the dpm_sem problem still needs to > be fixed in the PM core.
When you look, I think you'll see that adding a shutdown method will prevent the dpm_runtime_suspend() deadlock. There might be another one though. - Dave ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&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