Date: Mon, 21 Mar 2016 00:52:24 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297127 - in head/sys: arm/allwinner arm/amlogic/aml8726 arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/lpc arm/ti dev/mmc dev/mmc/host dev/sdhci powerpc/mpc85xx Message-ID: <201603210052.u2L0qOIu047832@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Mon Mar 21 00:52:24 2016 New Revision: 297127 URL: https://svnweb.freebsd.org/changeset/base/297127 Log: Fix fallout from r292180 (Dec 2015)... ensure that every driver which has a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc. This is because the kernel linker only searches for symbols in dependent modules, so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc was not compiled into the kernel (even if you hand-loaded mmc first). (Thanks to jilles@ for providing the vital clue about the kernel linker.) Modified: head/sys/arm/allwinner/a10_mmc.c head/sys/arm/amlogic/aml8726/aml8726_mmc.c head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c head/sys/arm/at91/at91_mci.c head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/arm/freescale/imx/imx_sdhci.c head/sys/arm/lpc/lpc_mmc.c head/sys/arm/ti/ti_sdhci.c head/sys/dev/mmc/host/dwmmc.c head/sys/dev/mmc/mmc.c head/sys/dev/sdhci/sdhci_fdt.c head/sys/dev/sdhci/sdhci_pci.c head/sys/powerpc/mpc85xx/fsl_sdhc.c Modified: head/sys/arm/allwinner/a10_mmc.c ============================================================================== --- head/sys/arm/allwinner/a10_mmc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/allwinner/a10_mmc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -943,3 +943,4 @@ static driver_t a10_mmc_driver = { DRIVER_MODULE(a10_mmc, simplebus, a10_mmc_driver, a10_mmc_devclass, 0, 0); DRIVER_MODULE(mmc, a10_mmc, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(a10_mmc, mmc, 1, 1, 1); Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mmc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -1099,3 +1099,4 @@ DRIVER_MODULE(aml8726_mmc, simplebus, am aml8726_mmc_devclass, 0, 0); MODULE_DEPEND(aml8726_mmc, aml8726_gpio, 1, 1, 1); DRIVER_MODULE(mmc, aml8726_mmc, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(aml8726_mmc, mmc, 1, 1, 1); Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Mon Mar 21 00:52:24 2016 (r297127) @@ -1378,3 +1378,4 @@ DRIVER_MODULE(aml8726_sdxc, simplebus, a aml8726_sdxc_devclass, 0, 0); MODULE_DEPEND(aml8726_sdxc, aml8726_gpio, 1, 1, 1); DRIVER_MODULE(mmc, aml8726_sdxc, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(aml8726_sdxc, mmc, 1, 1, 1); Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/at91/at91_mci.c Mon Mar 21 00:52:24 2016 (r297127) @@ -1412,3 +1412,4 @@ DRIVER_MODULE(at91_mci, atmelarm, at91_m NULL); #endif DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(at91_mci, mmc, 1, 1, 1); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Mar 21 00:52:24 2016 (r297127) @@ -672,3 +672,4 @@ static driver_t bcm_sdhci_driver = { DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, 0, 0); MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1); DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_bcm, mmc, 1, 1, 1); Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/freescale/imx/imx_sdhci.c Mon Mar 21 00:52:24 2016 (r297127) @@ -836,3 +836,4 @@ static driver_t imx_sdhci_driver = { DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, 0, 0); MODULE_DEPEND(sdhci_imx, sdhci, 1, 1, 1); DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_imx, mmc, 1, 1, 1); Modified: head/sys/arm/lpc/lpc_mmc.c ============================================================================== --- head/sys/arm/lpc/lpc_mmc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/lpc/lpc_mmc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -776,3 +776,4 @@ static driver_t lpc_mmc_driver = { DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, 0, 0); DRIVER_MODULE(mmc, lpcmmc, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(lpcmmc, mmc, 1, 1, 1); Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/arm/ti/ti_sdhci.c Mon Mar 21 00:52:24 2016 (r297127) @@ -722,3 +722,4 @@ static driver_t ti_sdhci_driver = { DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, 0, 0); MODULE_DEPEND(sdhci_ti, sdhci, 1, 1, 1); DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_ti, mmc, 1, 1, 1); Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/dev/mmc/host/dwmmc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -1178,3 +1178,4 @@ static devclass_t dwmmc_devclass; DRIVER_MODULE(dwmmc, simplebus, dwmmc_driver, dwmmc_devclass, 0, 0); DRIVER_MODULE(dwmmc, ofwbus, dwmmc_driver, dwmmc_devclass, 0, 0); DRIVER_MODULE(mmc, dwmmc, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(dwmmc, mmc, 1, 1, 1); Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/dev/mmc/mmc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -1811,3 +1811,5 @@ driver_t mmc_driver = { sizeof(struct mmc_softc), }; devclass_t mmc_devclass; + +MODULE_VERSION(mmc, 1); Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/dev/sdhci/sdhci_fdt.c Mon Mar 21 00:52:24 2016 (r297127) @@ -308,3 +308,4 @@ DRIVER_MODULE(sdhci_fdt, simplebus, sdhc NULL, NULL); MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_fdt, mmc, 1, 1, 1); Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/dev/sdhci/sdhci_pci.c Mon Mar 21 00:52:24 2016 (r297127) @@ -475,3 +475,4 @@ DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_ NULL); MODULE_DEPEND(sdhci_pci, sdhci, 1, 1, 1); DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_pci, mmc, 1, 1, 1); Modified: head/sys/powerpc/mpc85xx/fsl_sdhc.c ============================================================================== --- head/sys/powerpc/mpc85xx/fsl_sdhc.c Mon Mar 21 00:34:22 2016 (r297126) +++ head/sys/powerpc/mpc85xx/fsl_sdhc.c Mon Mar 21 00:52:24 2016 (r297127) @@ -126,7 +126,7 @@ static devclass_t fsl_sdhc_devclass; DRIVER_MODULE(sdhci_fsl, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, 0, 0); DRIVER_MODULE(mmc, sdhci_fsl, mmc_driver, mmc_devclass, NULL, NULL); - +MODULE_DEPEND(sdhci_fsl, mmc, 1, 1, 1); /***************************************************************************** * Private methods
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603210052.u2L0qOIu047832>