Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2024 12:27:07 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Zahemszky =?utf-8?Q?G=C3=A1bor?= <gabor@zahemszky.hu>
Cc:        Freebsd Stable <freebsd-stable@freebsd.org>
Subject:   Re: Error report on FreeBSD-14.2-BETA2 - kernel modul problem
Message-ID:  <861pzet5ro.fsf@ltc.des.dev>
In-Reply-To: <4308c3074bce47a5befabfe2bf0d6023@zahemszky.hu> ("Zahemszky =?utf-8?Q?G=C3=A1bor=22's?= message of "Tue, 12 Nov 2024 19:20:26 %2B0100")
References:  <4308c3074bce47a5befabfe2bf0d6023@zahemszky.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
Zahemszky G=C3=A1bor <gabor@zahemszky.hu> writes:
> # kldload gpiospi
>
> kldload: can't load gpiospi: module already loaded or in kernel
>
> It's not true: "kldstat -v | fgrep -A 5 gpio" doesn't show it.
>
> But on the console
>
> =3D=3D=3D
> KLD gpiospi.ko: depends on gpiospi - not available or version mismatch
> =3D=3D=3D
>
> gpiospi depends on gpiospi ????

The file gpiospi.ko contains multiple modules, one of which is gpiospi:

DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, gpio_spi_devclass, 0, 0);
DRIVER_MODULE(spibus, gpiospi, spibus_driver, spibus_devclass, 0, 0);

It also appears to declare dependencies for modules it does not contain:

MODULE_DEPEND(spi, gpiospi, 1, 1, 1);
MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1);

I believe the intention was that gpiospi depends on spibus and gpiobus,
but what it actually says is that spi (which does not exist) and gpiobus
depend on gpiospi.  If you change those two lines to the following, the
module will load:

MODULE_DEPEND(gpiospi, spibus, 1, 1, 1);
MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1);

I have no idea if it will work, though.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861pzet5ro.fsf>