]> sigrok.org Git - libsigrok.git/commit
fx2lafw: Print device failed to renumerate error
authorAlexandru Gagniuc <redacted>
Thu, 6 Dec 2012 21:55:14 +0000 (15:55 -0600)
committerUwe Hermann <redacted>
Mon, 17 Dec 2012 23:48:56 +0000 (00:48 +0100)
commit443a14d81f44772076aefdb2b252657d6abc0d29
treef0a16c578d06421170fb8dd6bb7d238c04900264
parentf427daefb01cdaf578dc8b9fa5f59c5525439289
fx2lafw: Print device failed to renumerate error

commit 378abfeac6cc94d88dc82b8481dec9c9f691f3da tried to solve a bug where
the fx2lafw driver would print "Device came back" even if a timeout had occured.

It solved that issue, but inadvertently introduced a new bug:
"Device came back" would be printed even if no firmware upload was performed.
This is counterintuitive, as the device is only reset when a firmware upload is
performed.

There are three cases:
i)   Firmware upload was successful
ii)  Firmware upload failed
iii) Firmware upload was NOT needed

Each case warrants a separate message from the driver. Print the
following messages depending on the outcome:

i)   "Device came back"
ii)  "Device failed to renumerate"
iii) "Firmware upload was not needed."

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/fx2lafw/fx2lafw.c