diff options
author | Jesse Gilles <jgilles@multitech.com> | 2012-08-28 14:52:32 -0500 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2012-08-28 14:52:32 -0500 |
commit | d602974189ad6a4c1011c833a7c9b24106757946 (patch) | |
tree | c7892365803ba9684faaa69c2376e164b521dfcf /multitech | |
parent | a62bd8f418e0fc3b45f28a1b16f54d33a273d1e9 (diff) |
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.
Diffstat (limited to 'multitech')
-rw-r--r-- | multitech/recipes/multitech/mts-io.inc | 6 | ||||
-rwxr-xr-x | multitech/recipes/multitech/mts-io/radio-reset-h5 | 11 |
2 files changed, 15 insertions, 2 deletions
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 |