diff options
author | John Klug <john.klug@multitech.com> | 2021-11-22 15:17:40 -0600 |
---|---|---|
committer | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2022-01-11 11:32:32 +0200 |
commit | a71549ac36bb796f9110e4be7e96796ec6cdfd27 (patch) | |
tree | 5e7c6eceb8d8782ebbbbf624534c31d7011d08ac | |
parent | 98314a55dfd117bce212b40cd95df6775213ef55 (diff) | |
download | meta-multitech-atmel-a71549ac36bb796f9110e4be7e96796ec6cdfd27.tar.gz meta-multitech-atmel-a71549ac36bb796f9110e4be7e96796ec6cdfd27.tar.bz2 meta-multitech-atmel-a71549ac36bb796f9110e4be7e96796ec6cdfd27.zip |
Add a reset loop in case rs9113 does not appear on USB Hub
-rwxr-xr-x | recipes-kernel/rs9113/files/rs9113/rs9113.init | 62 | ||||
-rw-r--r-- | recipes-kernel/rs9113/rs9113_1.6.5.bb | 7 |
2 files changed, 37 insertions, 32 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init index 4ef6f4b..d9fb21e 100755 --- a/recipes-kernel/rs9113/files/rs9113/rs9113.init +++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init @@ -28,33 +28,41 @@ case "$1" in exit 0 fi # Reset the RS9113 chip is ready, and - # wait for it to settle. - if [ -f "$RS9113_RESET" ] ; then - echo 1 >$RS9113_RESET - usleep $SLEEPTIME - echo 0 >$RS9113_RESET - usleep $SLEEPTIME - echo 1 >$RS9113_RESET - N=1 - while [ $N -lt 20 ] ; do - INT=$(cat $RS9113_INT) - WKUP=$(cat $RS9113_WKUP) - if [ $INT -ne 1 -o $WKUP -ne 1 ] ; then - usleep $INTSLEEPTIME - else - break - fi - done - if [ $INT -ne 1 ] ; then - logger -t rs9113 -p error -s "$RS9113_INT is $INT" - fi - if [ $WKUP -ne 1 ] ; then - logger -t rs9113 -p error -s "$RS9113_WKUP is $WKUP" - fi - else - # No WiFi BT, so exit quietly - exit 0 - fi + # wait for it to settle. + count=0 + while : ; do + if [ -f "$RS9113_RESET" ] ; then + echo 1 >$RS9113_RESET + usleep $SLEEPTIME + echo 0 >$RS9113_RESET + usleep $SLEEPTIME + echo 1 >$RS9113_RESET + N=1 + while [ $N -lt 20 ] ; do + INT=$(cat $RS9113_INT) + if ((INT != 1)) ; then + usleep $INTSLEEPTIME + else + break + fi + done + if [ $INT -ne 1 ] ; then + logger -t rs9113 -p error -s "$RS9113_INT is $INT" + fi + else + # No WiFi BT, so exit quietly + exit 0 + fi + if /usr/bin/lsusb -d 1618:9113 >/dev/null ; then + break + fi + sleep 15 + ((count++)) + if ((count > 5)) ; then + logger -t rs9113 -p error -s "RS9113 not found after $count resets" + break + fi + done /usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules with COEX=$COEX_MODE and Country=$SET_COUNTRY_CODE" /usr/sbin/rs9113_load_modules.sh $CONFIG RETVAL=$? diff --git a/recipes-kernel/rs9113/rs9113_1.6.5.bb b/recipes-kernel/rs9113/rs9113_1.6.5.bb index edab39c..0627dcb 100644 --- a/recipes-kernel/rs9113/rs9113_1.6.5.bb +++ b/recipes-kernel/rs9113/rs9113_1.6.5.bb @@ -17,16 +17,13 @@ COMPATIBLE_MACHINE = "(mtcdt|mtrv1)" # To update this, manually copy ipk from Jenkin's job to # git://git@${MTS_INTERNAL_GIT}/mlinux/ipk.git;protocol=ssh;branch=${PV} # -PR = "r10" - -PKGR = "${PR}${KERNEL_MODULE_PACKAGE_SUFFIX}${EXTENDPRAUTO}" - +PR = "r12${KERNEL_MODULE_PACKAGE_SUFFIX}" SRC_URI = " \ file://rs9113/rs9113.init \ file://rs9113/rs9113.default \ file://rs9113/mts-rm-rs9113 \ file://rs9113/wpa_supplicant \ - file://rs9113-ipk/rs9113-from-src_${PV}-${PR}${KERNEL_MODULE_PACKAGE_SUFFIX}.0_${MACHINE}.ipk;name=binaries \ + file://rs9113-ipk/rs9113-from-src_${PV}-${PR}.0_${MACHINE}.ipk;name=binaries \ " SRCREV = "${PV}" |