Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49001 )
Change subject: ichspi: print transaction error in debug mode ......................................................................
Patch Set 1:
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.