diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2020-04-24 07:49:21 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2020-04-24 07:49:21 +0000 |
commit | 7a451e61abd97bfdf252647661cbbb99f8b56bfd (patch) | |
tree | 391c8e0c9b7775073603ef332916b82e9818dc00 /sys | |
parent | dd5f96c48d40188524c9397d8b996b090da09be9 (diff) | |
download | src-test2-7a451e61abd97bfdf252647661cbbb99f8b56bfd.tar.gz src-test2-7a451e61abd97bfdf252647661cbbb99f8b56bfd.zip |
ig4: ensure that drivers always attach in correct order
Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment
happens after iicbus and acpi_iicbus drivers are registered.
I have seen a problem where iicbus attached under ig4 instead of
acpi_iicbus when ig4.ko was loaded with kldload. I believe that that
happened because ig4 driver was a first driver to register, it attached
and created an iicbus child. Then iicbus driver was registered and,
since it was the only driver that could attach to the iicbus child
device, it did exactly that. After that acpi_iicbus driver was
registered. It would be able to attach to the iicbus device, but it was
already attached, so nothing happened.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=360241
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ichiic/ig4_acpi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index f938b59f04ed..e1c0c9a36231 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { sizeof(struct ig4iic_softc), }; -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0); +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0, + SI_ORDER_ANY); MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); |