* Re: How do I get udev to replay coldplug events for devices that did
2010-11-22 11:57 How do I get udev to replay coldplug events for devices that did not load? David Goodenough
@ 2010-11-22 12:30 ` Kay Sievers
2010-11-22 12:44 ` How do I get udev to replay coldplug events for devices that did not load? David Goodenough
2010-11-22 12:53 ` How do I get udev to replay coldplug events for devices that did Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2010-11-22 12:30 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 22, 2010 at 12:57, David Goodenough
<david.goodenough@btconnect.com> wrote:
> Is there any way to get udev to replay coldplug events for device that it
> could not run when it first tried to?
>
> My situation is that I have my kernel modules not in the rootfs (for a
> good reason, not just for the sake of it) and they have not been mounted
> when udev fires off its coldplug events. Â Does udev notice failed device
> creation events and keep them anywhere that can be reused?
>
> I could simply fix all these modules into the kernel, but some wireless
> drivers (it happens to be these I am having problems with) seem to
> work better when loaded as modules (or is that just an old memory that
> is no longer true).
Udev will not anything like this on its own. And I don't know any
distro which allows/supports /lib/* to be on a non-root filesystem.
You can add some custom code though that triggers all events again
after all filesystems are mounted. That should work in usual setups.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I get udev to replay coldplug events for devices that did not load?
2010-11-22 11:57 How do I get udev to replay coldplug events for devices that did not load? David Goodenough
2010-11-22 12:30 ` How do I get udev to replay coldplug events for devices that did Kay Sievers
@ 2010-11-22 12:44 ` David Goodenough
2010-11-22 12:53 ` How do I get udev to replay coldplug events for devices that did Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: David Goodenough @ 2010-11-22 12:44 UTC (permalink / raw)
To: linux-hotplug
On Monday 22 November 2010, Kay Sievers wrote:
> On Mon, Nov 22, 2010 at 12:57, David Goodenough
>
> <david.goodenough@btconnect.com> wrote:
> > Is there any way to get udev to replay coldplug events for device that it
> > could not run when it first tried to?
> >
> > My situation is that I have my kernel modules not in the rootfs (for a
> > good reason, not just for the sake of it) and they have not been
mounted
> > when udev fires off its coldplug events. Does udev notice failed device
> > creation events and keep them anywhere that can be reused?
> >
> > I could simply fix all these modules into the kernel, but some wireless
> > drivers (it happens to be these I am having problems with) seem to
> > work better when loaded as modules (or is that just an old memory that
> > is no longer true).
>
> Udev will not anything like this on its own. And I don't know any
> distro which allows/supports /lib/* to be on a non-root filesystem.
>
> You can add some custom code though that triggers all events again
> after all filesystems are mounted. That should work in usual setups.
>
> Kay
My problem is that I have a mixture of distros. The kernel (and the modules
on a NAND file system) come from OpenWRT, and the root file system
comes from Debian. The NAND is large enough to hold the kernel, but not
an initramfs, and certainly not the root file system. But the board does
have a USB port, so I put the root file system on a USB stick and link to the
modules on the NAND so that I am always using the modules that the
kernel needs.
When you say "add some custom code", any clues as to where I should
be looking to do this (I am not very familiar with the udev kernel code)
or is this simply a matter of asking for the list twice? It is only the PCI
devices (and the only things on the PCI bus are the wireless cards)
that I need to re-scan.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I get udev to replay coldplug events for devices that did
2010-11-22 11:57 How do I get udev to replay coldplug events for devices that did not load? David Goodenough
2010-11-22 12:30 ` How do I get udev to replay coldplug events for devices that did Kay Sievers
2010-11-22 12:44 ` How do I get udev to replay coldplug events for devices that did not load? David Goodenough
@ 2010-11-22 12:53 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2010-11-22 12:53 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 22, 2010 at 13:44, David Goodenough
<david.goodenough@btconnect.com> wrote:
> On Monday 22 November 2010, Kay Sievers wrote:
>> On Mon, Nov 22, 2010 at 12:57, David Goodenough
>>
>> <david.goodenough@btconnect.com> wrote:
>> > Is there any way to get udev to replay coldplug events for device that it
>> > could not run when it first tried to?
>> >
>> > My situation is that I have my kernel modules not in the rootfs (for a
>> > good reason, not just for the sake of it) and they have not been
> mounted
>> > when udev fires off its coldplug events. Does udev notice failed device
>> > creation events and keep them anywhere that can be reused?
>> >
>> > I could simply fix all these modules into the kernel, but some wireless
>> > drivers (it happens to be these I am having problems with) seem to
>> > work better when loaded as modules (or is that just an old memory that
>> > is no longer true).
>>
>> Udev will not anything like this on its own. And I don't know any
>> distro which allows/supports /lib/* to be on a non-root filesystem.
>>
>> You can add some custom code though that triggers all events again
>> after all filesystems are mounted. That should work in usual setups.
>>
> My problem is that I have a mixture of distros. The kernel (and the modules
> on a NAND file system) come from OpenWRT, and the root file system
> comes from Debian. The NAND is large enough to hold the kernel, but not
> an initramfs, and certainly not the root file system. But the board does
> have a USB port, so I put the root file system on a USB stick and link to the
> modules on the NAND so that I am always using the modules that the
> kernel needs.
>
> When you say "add some custom code", any clues as to where I should
> be looking to do this (I am not very familiar with the udev kernel code)
> or is this simply a matter of asking for the list twice? It is only the PCI
> devices (and the only things on the PCI bus are the wireless cards)
> that I need to re-scan.
Add a call like:
udevadm trigger --subsystem-match=pci --attr-match=modalias
--attr-nomatch=driver
This will only run udev for devices on the PCI bus, which have a
modalias file, but no current driver bound.
For debuggin, you can print the device list by adding '-n -v' to command.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread