Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for coldplugging more devices #293

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

wkz
Copy link
Collaborator

@wkz wkz commented Jun 23, 2022

As it turns out, not all buses in Linux will add modalias attributes to their devices in sysfs. One notable exception are MDIO buses. The plugin's scan routine would thus not pick them up.

Fortunately, the information is always available in the device's uevent attribute.

Therefore, default to looking for modaliases in the device's uevent attribute instead, falling back to modalias only if uevent is not availble (this should never happen).

wkz added 2 commits June 23, 2022 14:19
Since the modprobe plugin (unsurpricingly) may cause new modules to be
loaded, it makes sense to to delay the initial device node scan until
we know that no mode nodes will show up within the next few
microseconds.
As it turns out, not all buses in Linux will add `modalias` attributes
to their devices in sysfs. One notable exception are MDIO buses. The
plugin's scan routine would thus not pick them up.

Fortunately, the information is always available in the device's
`uevent` attribute.

Therefore, default to looking for modaliases in the device's `uevent`
attribute instead, falling back to `modalias` only if `uevent` is not
availble (this should never happen).
@troglobit
Copy link
Owner

Awesome work on this, thank you! ❤️

@troglobit troglobit merged commit 91f077b into troglobit:master Jun 23, 2022
@wkz wkz deleted the modprobe-uevent branch June 23, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants