Commit 222bf101 authored by Michael Karcher's avatar Michael Karcher
Browse files

Fix programmer-centric probe (patch v2)


As reported by Stefan Tauner on IRC, the new programmer-centric logic
is broken by re-using occupied members of the flashes array when changing
to the next programmer. This fixes it.

patch v2:
  prevent probing one chip per programmer even if the array is full. Using
  a do-while loop was a bad idea.

Corresponding to flashrom svn r1479.
Signed-off-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
parent 3cf335eb
......@@ -451,9 +451,10 @@ int main(int argc, char *argv[])
for (j = 0; j < registered_programmer_count; j++) {
startchip = 0;
for (i = 0; i < ARRAY_SIZE(flashes); i++) {
while (chipcount < ARRAY_SIZE(flashes)) {
startchip = probe_flash(&registered_programmers[j],
startchip, &flashes[i], 0);
startchip,
&flashes[chipcount], 0);
if (startchip == -1)
break;
chipcount++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment