CHROMIUM: internal.c: laptop_ok global state can become stale
Craask and similar DUT's are erroneously probing random second chips.
```
Found chipset "Intel Alder Lake-N".
Enabling flash write... SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x003a0000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x0039ffff) is read-write.
OK.
Found Winbond flash chip "W25Q128.V..M" (16384 kB, Programmer-specific) on host.
Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
Found MoselVitelic flash chip "V29C51000T" (64 kB, Parallel) mapped at physical address 0x00000000ffff0000.
```
This seems to be due to `laptop_ok` becoming a stale global state
after the first operation leading to probing on unrelated buses.
Therefore unconditionally reset the global state upon entry into
the internal driver.
BUG=b:260518132,b:260151917
BRANCH=none
TEST=Craask reportly no longer finds duplicate chip.
Change-Id: I2c00c351904307eeb1488c5dfaffc91d6468ee25
Signed-off-by: Edward O'Callaghan <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/4059786
Reviewed-by: Sam McNally <[email protected]>
Commit-Queue: Edward O'Callaghan <[email protected]>
Tested-by: Edward O'Callaghan <[email protected]>
(cherry picked from commit 326f547a6f02606504b385d6a8161a3273d2f4df)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/4075027
Reviewed-by: Reka Norman <[email protected]>
1 file changed