Chris Schwemmer wrote:
Hi,

I'm running a build of LFS-SVN (latest version). So far everything works
fine, but during bootup I get an error message from udevd and the "Send
this bugreport..." message.
When the udev bootscript is running, I get this message on my terminal:

udevd-event[992]: wait_for_sysfs: waiting for
'/sys/devices/platform/i8042/serio0/serio2/bus' failed

Right after it, the kernel reports:

IBM TrackPoint firmware: 0x0e, buttons: 3/3
input: TPPS/2 IBM TrackPoint as /class/input/input3

(serio0/serio2 is the TrackPoint).
The bugreport file is attached.

Does the attached kernel patch help?

--
Alexander E. Patrakov
>From [EMAIL PROTECTED]  Thu Apr  6 09:46:15 2006
Date: Tue, 4 Apr 2006 20:42:26 +0200
From: Kay Sievers <[EMAIL PROTECTED]>
To: Greg KH <[EMAIL PROTECTED]>
Subject: Driver core: bus device event delay
Message-ID: <[EMAIL PROTECTED]>
Content-Disposition: inline

From: Kay Sievers <[EMAIL PROTECTED]>

split bus_add_device() and send device uevents after sysfs population

Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
 drivers/base/base.h |    1 +
 drivers/base/bus.c  |   22 ++++++++++++++++++----
 drivers/base/core.c |    3 ++-
 3 files changed, 21 insertions(+), 5 deletions(-)

--- gregkh-2.6.orig/drivers/base/base.h
+++ gregkh-2.6/drivers/base/base.h
@@ -11,6 +11,7 @@ extern int cpu_dev_init(void);
 extern int attribute_container_init(void);
 
 extern int bus_add_device(struct device * dev);
+extern void bus_attach_device(struct device * dev);
 extern void bus_remove_device(struct device * dev);
 
 extern int bus_add_driver(struct device_driver *);
--- gregkh-2.6.orig/drivers/base/bus.c
+++ gregkh-2.6/drivers/base/bus.c
@@ -362,8 +362,7 @@ static void device_remove_attrs(struct b
  *     @dev:   device being added
  *
  *     - Add the device to its bus's list of devices.
- *     - Try to attach to driver.
- *     - Create link to device's physical location.
+ *     - Create link to device's bus.
  */
 int bus_add_device(struct device * dev)
 {
@@ -372,8 +371,6 @@ 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);
@@ -384,6 +381,22 @@ int bus_add_device(struct device * dev)
 }
 
 /**
+ *     bus_attach_device - add device to bus
+ *     @dev:   device tried to attach to a driver
+ *
+ *     - Try to attach to driver.
+ */
+void bus_attach_device(struct device * dev)
+{
+       struct bus_type * bus = dev->bus;
+
+       if (bus) {
+               device_attach(dev);
+               klist_add_tail(&dev->knode_bus, &bus->klist_devices);
+       }
+}
+
+/**
  *     bus_remove_device - remove device from bus
  *     @dev:   device to be removed
  *
@@ -733,6 +746,7 @@ EXPORT_SYMBOL_GPL(bus_find_device);
 EXPORT_SYMBOL_GPL(bus_for_each_drv);
 
 EXPORT_SYMBOL_GPL(bus_add_device);
+EXPORT_SYMBOL_GPL(bus_attach_device);
 EXPORT_SYMBOL_GPL(bus_remove_device);
 EXPORT_SYMBOL_GPL(bus_register);
 EXPORT_SYMBOL_GPL(bus_unregister);
--- gregkh-2.6.orig/drivers/base/core.c
+++ gregkh-2.6/drivers/base/core.c
@@ -274,11 +274,12 @@ int device_add(struct device *dev)
        dev->uevent_attr.store = store_uevent;
        device_create_file(dev, &dev->uevent_attr);
 
-       kobject_uevent(&dev->kobj, KOBJ_ADD);
        if ((error = device_pm_add(dev)))
                goto PMError;
        if ((error = bus_add_device(dev)))
                goto BusError;
+       kobject_uevent(&dev->kobj, KOBJ_ADD);
+       bus_attach_device(dev);
        if (parent)
                klist_add_tail(&dev->knode_parent, &parent->klist_children);
 
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to