From bc3a4b663ce786b2677d71be43350c995cde88d9 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Mon, 4 Mar 2013 10:01:00 +0100 Subject: [PATCH] meta-digi-arm: Avoid udev loading atheros kernel module. udev will attempt to load the atheros kernel modules because it defines a modalias that matches an sdio bus event. In a race condition with the script in if-pre-up, the module will crash. Recent versions of udev have lost the ability to add an ignore_device option to the rules, and mdev in del-image-minimal has no module autoloading ability. The commit adds a modprobe install rule that does nothing, and allows the if-pre-up script to load the module as it used to. Fixes https://jira.digi.com/browse/DEL-277 Signed-off-by: Alex Gonzalez --- .../recipes-kernel/kernel-module-atheros/ccardimx28js/atheros | 2 +- .../kernel-module-atheros/ccardimx28js/atheros.conf | 1 + .../kernel-module-atheros/kernel-module-atheros_git.bb | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros.conf diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros b/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros index 5635f8150..eecb7e313 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros @@ -79,7 +79,7 @@ fi ATH6KL_PARAMS="" [ -f "/root/wifi_test_mode" ] && { ATH6KL_PARAMS="${ATH6KL_PARAMS} testmode=1"; test_mode_str=" in test mode"; } grep -qs ath6kl_sdio /proc/modules || \ - /sbin/modprobe -q ath6kl_sdio ${ATH6KL_PARAMS} || echo "Loading ath6kl_sdio module${test_mode_str}: [FAILED]" + /sbin/modprobe --ignore-install -q ath6kl_sdio ${ATH6KL_PARAMS} || echo "Loading ath6kl_sdio module${test_mode_str}: [FAILED]" # Delay required for the interface 'wlan0' to settle down before trying to configure it. sleep 0.5 diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros.conf b/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros.conf new file mode 100644 index 000000000..81b9b1bcd --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/ccardimx28js/atheros.conf @@ -0,0 +1 @@ +install ath6kl_sdio true diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros_git.bb b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros_git.bb index 45c4ee7a7..1682d94b9 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros_git.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros_git.bb @@ -9,6 +9,7 @@ PR = "r0" SRCREV = "${AUTOREV}" SRC_URI = "${DIGI_LOG_GIT}linux-modules/atheros.git;protocol=git;branch=refs/heads/master \ file://atheros \ + file://atheros.conf \ " S = "${WORKDIR}/git" @@ -39,6 +40,8 @@ module_do_install() { do_install_append() { install -d ${D}${sysconfdir}/network/if-pre-up.d install -m 0755 ${WORKDIR}/atheros ${D}${sysconfdir}/network/if-pre-up.d/ + install -d ${D}/etc/modprobe.d + install -m 0755 ${WORKDIR}/atheros.conf ${D}${sysconfdir}/modprobe.d/ install -d ${D}/lib/firmware/ath6k/AR6003/hw2.1.1 install -m 0755 ${FIRMWARE_S}/ath6kl_fw_concurrency/athtcmd_ram.bin ${D}/lib/firmware/ath6k/AR6003/hw2.1.1/ install -m 0755 ${FIRMWARE_S}/ath6kl_fw_concurrency/athwlan.bin ${D}/lib/firmware/ath6k/AR6003/hw2.1.1/