USB: io_ti: Fix firmware version handling
authorPeter E. Berger <pberger@brimson.com>
Fri, 31 Jul 2015 06:55:06 +0000 (01:55 -0500)
committerJohan Hovold <johan@kernel.org>
Fri, 31 Jul 2015 09:57:31 +0000 (11:57 +0200)
commitc0e34831c8d9d8bf24f7bc9e12663e3daf1646ef
tree4519a8d3df84067ba8a2291b121d7361743078ef
parentc3ece7e70dd8fab4fd3e4b9a74ad2df4cfa22e11
USB: io_ti: Fix firmware version handling

The io_ti driver fails to download firmware to Edgeport
devices such as the EP/416, even when the on-disk firmware image
(/lib/firmware/edgeport/down3.bin) is more current than the version
on the EP/416.  The current download code is broken in a few ways.
Notably it mis-uses global variables OperationalMajorVersion and
OperationalMinorVersion (reading their values before they've been
properly initialized and subsequently initializing them multiple times
without synchronization).  This patch drops the global variables and
replaces the redundant calls to request_firmware()/release_firmware()
in download_fw() with a single call pair in edge_startup(); the firmware
image pointer is then passed to download_fw() and build_i2c_fw_hdr().

Signed-off-by: Peter E. Berger <pberger@brimson.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/io_ti.c
This page took 0.024296 seconds and 5 git commands to generate.