2.6.22: pcspkr driver no longer loads automatically
With no other changes but a kernel upgrade, the pcspkr driver doesn't load automatically anymore. No changes to that driver jump out, so where else could the problem be? Something to do with the device class changes maybe?
Quoted 4 lines · Chuck Ebbert
With no other changes but a kernel upgrade, the pcspkr driver doesn't load automatically anymore. No changes to that driver jump out, so where else could the problem be? Something to do with the device class changes maybe?
This has long been a problem for me on Fedora, long before 2.6.22. I would never ever have the glorious system beeps, unless I built the module into my kernel.
I would look into distro areas and see why it's not getting loaded.
Jeff
Quoted 6 lines · Jeff Garzik
Quoted 4 lines · Chuck Ebbert
With no other changes but a kernel upgrade, the pcspkr driver doesn't load automatically anymore. No changes to that driver jump out, so where else could the problem be? Something to do with the device class changes maybe?
Quoted 6 lines
This has long been a problem for me on Fedora, long before 2.6.22. I would never ever have the glorious system beeps, unless I built the module into my kernel.
I would look into distro areas and see why it's not getting loaded.
Seems to be some kind of udev / hal magic loading it. With 2.6.20/21 it worked for most people, now it seems totally broken. Maybe we should just load it unconditionally.
Quoted 11 lines · Chuck Ebbert
Quoted 10 lines · Jeff Garzik
Quoted 4 lines · Chuck Ebbert
With no other changes but a kernel upgrade, the pcspkr driver doesn't load automatically anymore. No changes to that driver jump out, so where else could the problem be? Something to do with the device class changes maybe?
This has long been a problem for me on Fedora, long before 2.6.22. I would never ever have the glorious system beeps, unless I built the module into my kernel.
Quoted 6 lines
Quoted 2 lines
I would look into distro areas and see why it's not getting loaded.
Seems to be some kind of udev / hal magic loading it. With 2.6.20/21 it worked for most people, now it seems totally broken. Maybe we should just load it unconditionally.
It doesn't have any aliases, so seems it was never autoloaded. It's like mousedev, and should probably just be built-in.
Kay
Quoted 1 line · Kay Sievers
It doesn't have any aliases, so seems it was never autoloaded.
It was - prior kernels loaded it via the uevent generated from /devices/platform/pcspkr. Newer kernels seem to never actually trigger a uevent from that (tested with a combination of udevmonitor and 'udevtrigger --subsystem-match=platform'.)
Bill
Quoted 7 lines · Bill Nottingham
Quoted 1 line · Kay Sievers
It doesn't have any aliases, so seems it was never autoloaded.
It was - prior kernels loaded it via the uevent generated from /devices/platform/pcspkr. Newer kernels seem to never actually trigger a uevent from that (tested with a combination of udevmonitor and 'udevtrigger --subsystem-match=platform'.)
Ah, ok, makes sense. Yeah, that weird "platform devices loads itself by the name" thing got disabled in the platform subsystem. It caused modprobe loops for other devices.
The whole idea of issuing MODALIAS with plain module names instead of aliases can't really work, but the platform maintainer didn't like to use the usual aliases and the matches in the modules, for a reason I didn't understand while we talked about the problem last time.
Kay
Quoted 8 lines · Kay Sievers
Ah, ok, makes sense. Yeah, that weird "platform devices loads itself by the name" thing got disabled in the platform subsystem. It caused modprobe loops for other devices.
The whole idea of issuing MODALIAS with plain module names instead of aliases can't really work, but the platform maintainer didn't like to use the usual aliases and the matches in the modules, for a reason I didn't understand while we talked about the problem last time.
So, the solution is for the platform device to issue a random modalias that pcskpr exports?
Bill
Quoted 5 lines · Bill Nottingham
Quoted 4 lines · Kay Sievers
Ah, ok, makes sense. Yeah, that weird "platform devices loads itself by the name" thing got disabled in the platform subsystem. It caused modprobe loops for other devices.
Quoted 7 lines
Quoted 4 lines
The whole idea of issuing MODALIAS with plain module names instead of aliases can't really work, but the platform maintainer didn't like to use the usual aliases and the matches in the modules, for a reason I didn't understand while we talked about the problem last time.
So, the solution is for the platform device to issue a random modalias that pcskpr exports?
I would still like to see "MODALIAS=platform:<string>" exported by the bus, and matching aliases the modules, just like every other subsystem does.
Like SCSI, with the "artificial" aliases for the modules it wants to autoload:
$ /sbin/modinfo sd_mod ... alias: scsi:t-0x0e* alias: scsi:t-0x07* alias: scsi:t-0x00* ...
$ cat /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/modalias scsi:t-0x00
That way you would get full control over the loading or blacklisting with module-init-tools config files, which doesn't work with direct module name requests, and no magic in the bus code or the drivers would be needed.
Kay
Hi,
Quoted 8 lines · Bill Nottingham
Quoted 1 line · Kay Sievers
It doesn't have any aliases, so seems it was never autoloaded.
It was - prior kernels loaded it via the uevent generated from /devices/platform/pcspkr. Newer kernels seem to never actually trigger a uevent from that (tested with a combination of udevmonitor and 'udevtrigger --subsystem-match=platform'.)
The patch below should restore generation of uevents for pcspkr devices. Since devices are not created in pcspkr module but rather in arch setup code it is right (and safe) thing to do.
Signature · 68 lines
Dmitry pcspkr: restore uevent generation Make sure that we generate uevents when creating pcspkr devices so that userspace will load pcspkr driver. Signed-off-by: Dmitry Torokhov <[email protected]> --- arch/alpha/kernel/setup.c | 2 ++ arch/mips/kernel/pcspeaker.c | 2 ++ arch/powerpc/kernel/setup-common.c | 2 ++ arch/x86/kernel/pcspeaker.c | 2 ++ 4 files changed, 8 insertions(+) Index: work/arch/alpha/kernel/setup.c =================================================================== --- work.orig/arch/alpha/kernel/setup.c +++ work/arch/alpha/kernel/setup.c @@ -1501,6 +1501,8 @@ static __init int add_pcspkr(void) if (!pd) return -ENOMEM; + pd->dev.uevent_suppress = 0; + ret = platform_device_add(pd); if (ret) platform_device_put(pd); Index: work/arch/mips/kernel/pcspeaker.c =================================================================== --- work.orig/arch/mips/kernel/pcspeaker.c +++ work/arch/mips/kernel/pcspeaker.c @@ -19,6 +19,8 @@ static __init int add_pcspkr(void) if (!pd) return -ENOMEM; + pd->dev.uevent_suppress = 0; + ret = platform_device_add(pd); if (ret) platform_device_put(pd); Index: work/arch/powerpc/kernel/setup-common.c =================================================================== --- work.orig/arch/powerpc/kernel/setup-common.c +++ work/arch/powerpc/kernel/setup-common.c @@ -454,6 +454,8 @@ static __init int add_pcspkr(void) if (!pd) return -ENOMEM; + pd->dev.uevent_suppress = 0; + ret = platform_device_add(pd); if (ret) platform_device_put(pd); Index: work/arch/x86/kernel/pcspeaker.c =================================================================== --- work.orig/arch/x86/kernel/pcspeaker.c +++ work/arch/x86/kernel/pcspeaker.c @@ -11,6 +11,8 @@ static __init int add_pcspkr(void) if (!pd) return -ENOMEM; + pd->dev.uevent_suppress = 0; + ret = platform_device_add(pd); if (ret) platform_device_put(pd);
Quoted 10 lines · Dmitry Torokhov
Quoted 8 lines · Bill Nottingham
Quoted 1 line · Kay Sievers
It doesn't have any aliases, so seems it was never autoloaded.
It was - prior kernels loaded it via the uevent generated from /devices/platform/pcspkr. Newer kernels seem to never actually trigger a uevent from that (tested with a combination of udevmonitor and 'udevtrigger --subsystem-match=platform'.)
Quoted 3 lines
The patch below should restore generation of uevents for pcspkr devices. Since devices are not created in pcspkr module but rather in arch setup code it is right (and safe) thing to do.
This is not needed. The global disablement of platform device creation events has been reverted in 2.6.24, it broke more than pcsprkr, and modules that should be auto-loaded just get an alias as usual:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=43cc71eed1250755986da4c0f9898f9a635cb3bf
Thanks,
Kay