Patch Set 1: Code-Review-1

Is there any reason to hide this error? It *is* an error.

When "--fmap" option is used, flashrom does binary search in flash for fmap. It is expected that this binary search operation may try to read region that is locked; in this case, flashrom should skip this region without error message, but instead print such message only when "-V" is specified. Otherwise, user may think there is a legitimate error.

For context, please check https://review.coreboot.org/cgit/flashrom.git/tree/fmap.c#n229.

That being said, as ich_hwseq_wait_for_cycle_complete() is called for many other cases as well, that we do need transaction error to be treated as error.

Is there a way to understand from the status register whether the region is locked? If so, we can treat it as warning only if the region is locked.

If not, one method to narrow down is to treat transaction error as warning only when ich_hwseq_wait_for_cycle_complete() is called by ich_hwseq_read(), but not by ich_hwseq_erase() and ich_hwseq_write().

Feedback/suggestions are appreciated.

View Change

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iebed1ae7f15b7f06b90a0b5947b953f7f0e1567d
Gerrit-Change-Number: 49001
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks@eltan.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin@wiwynn.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: insomniac <insomniac@slackware.it>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Fri, 01 Jan 2021 04:08:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment