On Wed, 27 Apr 2005, David Zeuthen wrote:

> Hi,
> 
> it seems that recent kernels (I'm using the Fedora 2.6.11-1.1268_FC4
> kernel which I believe is based off 2.6.12-rc3 and AFAIK it doesn't have
> any invasive patches in that area) has changed behavior wrt hotplug
> event ordering. In [1], I've attached the debug output from
> linux-hotplug. Here are the interesting bits:
> 
>  728 usb                     path=/devices/pci0000:00/0000:00:1d.1/usb3/3-2
> 
>  729 scsi_host               path=/class/scsi_host/host9                      
>    
>                       
> physdevpath=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/host9
> 
>  730 usb (interface)         
> path=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0

David's right.  Why did kobject_hotplug() move out of kobject_add() and
into its callers sometime after 2.6.11?  In particular the invocation in 
device_add() is in the wrong place; it needs to come before 
bus_add_device() starts probing for drivers.  Otherwise, as David points 
out, when the drivers start registering child devices from their probe 
methods, the hotplug events for those child devices will appear before the 
event for the parent.

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to