From d602974189ad6a4c1011c833a7c9b24106757946 Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Tue, 28 Aug 2012 14:52:32 -0500 Subject: mts-io: add radio-reset-h5 script radio-reset-h5 is a workaround script to perform a reset of the H5 radio. The script disables the USB controller before resetting the radio and enables it afterward. If this script is not used and a radio reset is done with mts-io directly, the radio will not enumerate properly after reset and will continue to reset itself indefinitely. --- multitech/recipes/multitech/mts-io.inc | 6 ++++-- multitech/recipes/multitech/mts-io/radio-reset-h5 | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 multitech/recipes/multitech/mts-io/radio-reset-h5 (limited to 'multitech') diff --git a/multitech/recipes/multitech/mts-io.inc b/multitech/recipes/multitech/mts-io.inc index 3c8fb29..679eaa9 100644 --- a/multitech/recipes/multitech/mts-io.inc +++ b/multitech/recipes/multitech/mts-io.inc @@ -5,11 +5,12 @@ PRIORITY = "optional" LICENSE = "GPL" DEPENDS = "virtual/kernel" RDEPENDS = "kernel (${KERNEL_VERSION})" -INC_PR = "r1" +INC_PR = "r2" SRC_URI = " \ file://mts-io.init \ git://git.multitech.net/cdp-io-controller.git;protocol=git;tag=v${PV} \ + file://radio-reset-h5 \ " S = "${WORKDIR}/git/io-module" @@ -35,7 +36,7 @@ PACKAGES = "${PN}" FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko" FILES_${PN} += "${sysconfdir}/init.d/mts-io" FILES_${PN} += "${libdir}/mts-io-sysfs*" -FILES_${PN} += "${sbindir}/mts-io-sysfs" +FILES_${PN} += "${sbindir}/mts-io-sysfs ${sbindir}/radio-reset-h5" INITSCRIPT_NAME = "mts-io" INITSCRIPT_PARAMS = "start 90 S ." @@ -56,4 +57,5 @@ fakeroot do_install () { install -d ${D}${libdir}/mts-io-sysfs install -m 0755 ${WORKDIR}/git/io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs install -m 0755 ${WORKDIR}/git/io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs + install -m 0755 ${WORKDIR}/radio-reset-h5 ${D}${sbindir}/radio-reset-h5 } diff --git a/multitech/recipes/multitech/mts-io/radio-reset-h5 b/multitech/recipes/multitech/mts-io/radio-reset-h5 new file mode 100755 index 0000000..7a059eb --- /dev/null +++ b/multitech/recipes/multitech/mts-io/radio-reset-h5 @@ -0,0 +1,11 @@ +#!/bin/sh + +# This script works around an H5 radio quirk by disabling USB and +# waiting for the radio to power up before re-enabling it. Note that +# this will disable all USB devices connected to the USB host controller +# until the reset is finished. USB device port is not affected. + +rmmod ohci_hcd +mts-io-sysfs store radio-reset 0 +sleep 8 +modprobe ohci_hcd -- cgit v1.2.3