patch to bus_add_device to delay call to device_attach till after "bus" and bus id sym links are set up
Resend (hopefully) without line wrap.
Patch to drivers/base/bus.c:bus_add_device to delay the driver_attach call until after the "bus" and bus_id symbolic links for the device exist so that a hotplug/uevent handler will not fail to find these links already established for a newly added device.
--- ../base/linux-2.6.14-rc4/drivers/base/bus.c 2005-10-10
20:19:19.000000000 -0500
+++ drivers/base/bus.c 2005-11-03 13:32:02.000000000 -0600
@@ -359,13 +359,13 @@ int bus_add_device(struct device * dev)
if (bus) {
pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id);
- device_attach(dev);
klist_add_tail(&dev->knode_bus, &bus->klist_devices); error = device_add_attrs(bus, dev);
if (!error) {
sysfs_create_link(&bus->devices.kobj, &dev->kobj,dev->bus_id);
sysfs_create_link(&dev->kobj,&dev->bus->subsys.kset.kobj, "bus");
}
+ device_attach(dev);
}
return error;
}
Quoted 1 line · edward
Resend (hopefully) without line wrap.
Nope, linewrap still there :(
As well as a lack of Signed-off-by: line :(
Quoted 4 lines
Patch to drivers/base/bus.c:bus_add_device to delay the
driver_attachcall until after the "bus" andbus_idsymbolic links for the device exist so that a hotplug/uevent handler will not fail to find these links already established for a newly added device.
What version of udev are you running that causes you to see this problem?
Quoted 1 line
--- ../base/linux-2.6.14-rc4
Lots of stuff has changed in the driver core since 2.6.14-rc4, you might need to update this and your other patch to the latest -git tree.
thanks,
greg k-h