OSDN Git Service

USB: io_ti: Add heartbeat to keep idle EP/416 ports from disconnecting
authorPeter E. Berger <pberger@brimson.com>
Fri, 31 Jul 2015 06:55:08 +0000 (01:55 -0500)
committerJohan Hovold <johan@kernel.org>
Fri, 31 Jul 2015 10:09:57 +0000 (12:09 +0200)
commit26c78daade0fbeef7f20bae3c5508a7c571078cd
tree5f3e453d8a2bb93b242b28b17e281ae944a32d11
parentdcb8e99dbc8a8a7825e39a43e79558d46b20d1e5
USB: io_ti: Add heartbeat to keep idle EP/416 ports from disconnecting

When using Edgeport/416 models with newer firmware (sometime after
firmware version 4.80.0), idle ports are automatically bounced
(disconnected and then reconnected) approximately every 60 seconds.
This breaks programs (e.g: minicom) where idle periods are common,
normal and expected.

I confirmed with the manufacturer (Digi International) that Edgeport/416
models now ship from the factory with firmware that expects periodic
"heartbeat" queries from the driver to keep idle ports alive.  This
patch implements heartbeat support using the mechanism Digi suggested
(periodically requesting an I2C descriptor address) that appears effective
on Edgeports running the newer firmware (that require it) and benign on
Edgeport devices running older firmware.  Since we know that Edgeport
firmware version 4.80 (the version distributed in /lib/firmware/down3.bin
and used for Edgeports that are either running still older versions or
have no onboard non-volatile firmware image) does not require heartbeat
support, this patch schedules heartbeats only on Edgeport/416 devices,
and only if they are running firmware versions newer than 4.80.

Signed-off-by: Peter E. Berger <pberger@brimson.com>
[johan: minor style changes ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/io_ti.c