Opened 19 years ago
Closed 19 years ago
#1772 closed defect (fixed)
New wait_for_sysfs rules for linux-2.6.16
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 6.2 |
Component: | Book | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
Instead of the current 10-wait_for_sysfs.rules file, the etc/udev/05-udev-early.rules file should be copied from the udev tarball, because the old net rule is no longer relevant. Also, either the kernel patch pasted below should be applied (strongly preferred), or this rule added:
ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="device/driver"
WARNING: this rule spins needlessly with virtual devices. Kernel patch that makes the net rule above unneeded:
--- orig/net/core/dev.c +++ new/net/core/dev.c @@ -2932,11 +2932,11 @@ switch(dev->reg_state) { case NETREG_REGISTERING: + dev->reg_state = NETREG_REGISTERED; err = netdev_register_sysfs(dev); if (err) printk(KERN_ERR "%s: failed sysfs registration (%d)\n", dev->name, err); - dev->reg_state = NETREG_REGISTERED; break; case NETREG_UNREGISTERING:
Change History (9)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
In this case, I would prefer a patch. While it is a very simple patch, it is easy to see what is going on and thus provides a little more value, IMO.
comment:3 by , 19 years ago
No biggie. I'll probably won't use the patch in my own scripts since I know what it's altering and so I don't have to track it, but you're probably right about the patch being better in this case.
comment:4 by , 19 years ago
One could envision a scenario where a sed would apply improperly with no warning because of some other future change to the file.
Any indication if this will appear soon in a released kernel patch? [We had a mere two kernels yesterday, for a total of .7]
For the record I am up on 090 with udevtrigger, udevsettle, new rules, the sleeping workaround removed, and no trouble.
comment:5 by , 19 years ago
Summary: | New wait_for_sysfs rules for linux-2.6.16 → New wait_for_sysfs rules for linux-2.6.17 |
---|
comment:6 by , 19 years ago
Summary: | New wait_for_sysfs rules for linux-2.6.17 → New wait_for_sysfs rules for linux-2.6.16 |
---|
Just checking trac emails.
comment:7 by , 19 years ago
Note that the patch Alexander mentioned will be appearing in 2.6.16.10 (http://www.ussg.iu.edu/hypermail/linux/kernel/0604.2/1348.html).
comment:8 by , 19 years ago
And the patch is indeed in the kernel now. Running a test build with this and some other changes.
Because I'm not a fan of patches, here's an sed which accomplishes the above fix: