From c0e34831c8d9d8bf24f7bc9e12663e3daf1646ef Mon Sep 17 00:00:00 2001 From: "Peter E. Berger" Date: Fri, 31 Jul 2015 01:55:06 -0500 Subject: [PATCH] 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 Signed-off-by: Johan Hovold --- Reading git-format-patch failed