[PATCH v5 00/10] Fix idle port disconnects and firmware downloading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Peter E. Berger" <pberger@xxxxxxxxxxx>

I found that when using newer Edgeport devices such as the EP/416,
idle ports are regularly bounced (disconnected and then reconnected).
I discussed this with the manufacturer (Digi International) and learned
that some newer Edgeport devices now ship from the factory running
firmware that requires periodic heartbeat messages from the driver, so
I enclose a proposed set of patches to implement their suggested mechanism
(which works both with old and new Edgeport devices).

While developing my heartbeat patches, I discovered that the firmware
download code was not working properly, so I also include a set of
proposed patches to fix this.

I welcome any comments or suggestions.

Thanks.
     --Peter

Changes since v4 [1]
Addressing Johan's review comments.  Thanks Johan!

Following Johan's suggestion, for v5 I have reorganized the original two
patches into ten smaller and more incremental ones.  While implementing
the reorganization I also made these specific changes:

 - Expand comment describing the need for heartbeat code.
 - Add comment describing the format of the (currently unused) firmware
   "build_number".
 - Add a "timeout" argument to ti_vsend_vsync() (rather than checking
   for UMPC_COPY_DNLD_TO_I2C) and update the call sites.  Also add two
   new defines for the firmware-download timeouts.
 - Fix indentation error in build_i2c_fw_hdr().
 - Replace dev_dbg() with dev_err() for "Failed to load image" message
   in edge_startup().
 - Fix whitespace in definition of FW_HEARTBEAT_VERSION_CUTOFF.
 - Rename the struct work_struct argument in edge_heartbeat_work() from
   "taskp" to "work".
 - Add "\n", skip period and use dev_err() (instead of dev_warn()) for
   the "Incomplete heartbeat" message in edge_heartbeat_work().
 - Remove stray newline in edge_heartbeat_work().
 - Drop unneeded serial number dev_dbg() in edge_startup().
 - Call INIT_DELAYED_WORK unconditionally.
 - Refactor heartbeat rescheduling code, including the test against
   FW_HEARTBEAT_VERSION_CUTOFF, to an inline helper function --
   edge_heartbeat_reschedule() -- and use it in edge_startup() and
   edge_resume().
 - Call cancel_delayed_work_sync() unconditionally in edge_release()
   and edge_suspend().

[1]: v4: http://marc.info/?l=linux-usb&m=143379313606490&w=2

Peter E. Berger (10):
  USB: io_ti: Increase insufficient timeout for firmware downloads
  USB: io_ti: Add timeout parameter to ti_vsend_sync()
  USB: io_ti: Move request_firmware() calls out of download_fw()
  USB: io_ti: Add fw_version field to edgeport_serial
  USB: io_ti: Add comment describing the unused firmware build_number
  USB: io_ti: Add heartbeat to keep idle Edgeport ports from
    disconnecting
  USB: io_ti: dev_dbg() and dev_err() changes in edge_startup()
  USB: io_ti: Call INIT_DELAYED_WORK unconditionally in edge_startup()
  USB: io_ti: Add edge_heartbeat_reschedule() helper function
  USB: io_ti: Call cancel_delayed_work_sync() unconditionally

 drivers/usb/serial/io_ti.c | 205 ++++++++++++++++++++++++++++++++-------------
 1 file changed, 146 insertions(+), 59 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux