I'm not sure that any of the listed devices are relevant for the description of the functionality of this patch.

Looking at the code in Chromium OS mentioned in the commit message, the while loop only reacts to CDS and then another exit condition is defined through the if upon FCERR.

The flashrom upstream code however alreaady exits the loop on either FCERR or CDS, so the additional if is superfluous, as the exit condition would be reached at the same time as with the patch, just in a tighter loop.
Also, the CDS timeout would be announced through either a an actual timeout or through FCERR aborting the loop. This cosmetic incorrectness is there with and without this patch.

Overall I think the error message should distinguish between those two exit criteria, but (the rest of) this patch should be abandoned.

Patch set 1:Code-Review -1

View Change

To view, visit change 46325. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I93198cb8536705e9b71b7fbe43a20e151c2a72a8
Gerrit-Change-Number: 46325
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: Stefan Reinauer <reinauer@chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Fri, 16 Oct 2020 17:42:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment