Attention is currently required from: Felix Singer, Edward O'Callaghan.

Edward O'Callaghan uploaded patch set #2 to this change.

View Change

programmer.h: Guard against sending spi commands on non-spi mst

Validate (flash->chip->bustype == BUS_SPI) as ich copies the
chip flags in the opaque master and tries incorrectly
to issue 4BA commands which results in failure.

The issue was detected only in the case of chips >16MB, in
this case 'W25Q256FV' that has the feature bits:
```
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_ENTER_WREN |
FEATURE_4BA_EAR_C5C8 | FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
FEATURE_WRSR2,
```
The regression was noticed from,
commit 0741727925b841c2479b993204ce58c5eb75185a ichspi.c: Read chip ID and use it to populate `flash->chip`

TEST=In the case of 'W25Q256FV' on TigerLake.

Change-Id: I7cce4f9c032d33c01bf616e27a50b9727a40fe1b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M flashrom.c
M include/programmer.h
2 files changed, 33 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/69/71269/2

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7cce4f9c032d33c01bf616e27a50b9727a40fe1b
Gerrit-Change-Number: 71269
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Nikolai Artemiev <nartemiev@google.com>
Gerrit-CC: Subrata Banik <subratabanik@google.com>
Gerrit-Attention: Felix Singer <felixsinger@posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newpatchset