linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* recursively unregistering platform devices
@ 2005-02-06 14:29 Robert Schwebel
  2005-02-16 23:56 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Schwebel @ 2005-02-06 14:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Patrick Mochel, Marc Kleine-Budde

Hi, 

I have a locking problem with platform devices in a little bit unusual
scenario; we have an FPGA which has a device information memory block
for the several "parts" in the FPGA. So we have written a base driver
which registers the device information block with the driver model, then
looks what is in the FPGA, registers the according "devices" with the
driver model and issues hotplug events to load the related drivers. 

The registration works fine, although we call platform_add_devices()
from the base driver for all the "sub devices"; but when we try to
unload the drivers there is a deadlock. On driver exit we call
platform_device_unregister() for the base driver which seems to be run
under a lock which is also being aquired when unregistering the devices
"inside" the FPGA. 

Before I investigate deeper - did anyone see this behaviour before? 

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: recursively unregistering platform devices
  2005-02-06 14:29 recursively unregistering platform devices Robert Schwebel
@ 2005-02-16 23:56 ` Greg KH
  2005-02-17  6:51   ` Robert Schwebel
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2005-02-16 23:56 UTC (permalink / raw)
  To: Robert Schwebel; +Cc: linux-kernel, Patrick Mochel, Marc Kleine-Budde

On Sun, Feb 06, 2005 at 03:29:12PM +0100, Robert Schwebel wrote:
> Hi, 
> 
> I have a locking problem with platform devices in a little bit unusual
> scenario; we have an FPGA which has a device information memory block
> for the several "parts" in the FPGA. So we have written a base driver
> which registers the device information block with the driver model, then
> looks what is in the FPGA, registers the according "devices" with the
> driver model and issues hotplug events to load the related drivers. 
> 
> The registration works fine, although we call platform_add_devices()
> from the base driver for all the "sub devices"; but when we try to
> unload the drivers there is a deadlock. On driver exit we call
> platform_device_unregister() for the base driver which seems to be run
> under a lock which is also being aquired when unregistering the devices
> "inside" the FPGA. 
> 
> Before I investigate deeper - did anyone see this behaviour before? 

Known issue, you can't recursivly register or unregister with the driver
core right now.  I'm working on fixing this issue.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: recursively unregistering platform devices
  2005-02-16 23:56 ` Greg KH
@ 2005-02-17  6:51   ` Robert Schwebel
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Schwebel @ 2005-02-17  6:51 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, Patrick Mochel, Marc Kleine-Budde

On Wed, Feb 16, 2005 at 03:56:50PM -0800, Greg KH wrote:
> Known issue, you can't recursivly register or unregister with the
> driver core right now. I'm working on fixing this issue.

Ok, great! Tell me if you have something we can test. 

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-17  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-06 14:29 recursively unregistering platform devices Robert Schwebel
2005-02-16 23:56 ` Greg KH
2005-02-17  6:51   ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).