From: "Peter E. Berger" <[email protected]>
I found that when using the Edgeport EP/416, idle ports are regularly
bounced (disconnected and then reconnected). I discussed this with the
manufacturer (Digi International) and learned that EP/416 devices now
ship from the factory running firmware that requires periodic heartbeat
messages from the driver, so I enclose a proposed patch to implement their
suggested mechanism (which works both with old and new firmware).
While developing my heartbeat patch, I discovered that the firmware
download code was not working properly, so I also include three proposed
patches to fix this.
I welcome any comments or suggestions.
Thanks.
--Peter
Changes since v7 [1]
Addressing Johan's review comments. Thanks Johan!
- Another consultation with Digi confirmed that the EP/416 models are
the only ones that currently require heartbeat support, even with
newer firmware. Added code to check the product id and only schedule
heartbeats for EP/416 models, and only if they are running new
firmware.
- Added new struct edgeport_fw_hdr for use both with the firmware
version decoding and sanity checks.
- Renamed patch 2/4 to the more descriptive "Fix firmware version
handling".
- Added minimal sanity check on the firmware length in the "Fix
firmware version handling" patch.
- Improvements to check_fw_sanity():
- use the new struct edgeport_fw_hdr
- return -EINVAL on errors
- replace %d with %u and %zu and drop unneeded cast
- use fw->size instead of length_total
- add a newline for better readability
- drop the unneeded "fw == NULL" check in edge_startup()
[1]: v7: http://marc.info/?l=linux-usb&m=143551612329338&w=2
---
Peter E. Berger (4):
USB: io_ti: Increase insufficient timeout for firmware downloads
USB: io_ti: Fix firmware version handling
USB: io_ti: Add firmware image sanity checks
USB: io_ti: Add heartbeat to keep idle EP/416 ports from disconnecting
drivers/usb/serial/io_ti.c | 275 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 209 insertions(+), 66 deletions(-)
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html