svn commit: r360241 - head/sys/dev/ichiic

Warner Losh imp at bsdimp.com
Fri Apr 24 14:29:15 UTC 2020


On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon <avg at freebsd.org> wrote:

> Author: avg
> Date: Fri Apr 24 07:49:21 2020
> New Revision: 360241
> URL: https://svnweb.freebsd.org/changeset/base/360241
>
> Log:
>   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.
>

Can you post more details of which devices are affected? From the
description and the patch, I don't see how this could fix things.

Warner


>   MFC after:    2 weeks
>
> Modified:
>   head/sys/dev/ichiic/ig4_acpi.c
>
> Modified: head/sys/dev/ichiic/ig4_acpi.c
>
> ==============================================================================
> --- head/sys/dev/ichiic/ig4_acpi.c      Fri Apr 24 05:05:58 2020
> (r360240)
> +++ head/sys/dev/ichiic/ig4_acpi.c      Fri Apr 24 07:49:21 2020
> (r360241)
> @@ -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);
>


More information about the svn-src-all mailing list