Re: [RESEND PATCH] mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()

From: Michael Walle
Date: Thu Jan 27 2022 - 04:18:48 EST


Am 2022-01-27 04:31, schrieb Chen-Tsung Hsieh:
On Thu, Jan 27, 2022 at 6:38 AM Michael Walle <michael@xxxxxxxx> wrote:
Out of curiosity, on what flash did you discover this?

It's Winbond W25Q64JWZPIM
https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&partNo=W25Q64JW

We are verifying the write protection on W25Q64JWZPIM and run into an
issue that spi_nor_sr_unlock() always return success even if HW & SW
write protection are both enabled.

Ah that ring a bell... Anyway, could you dump the SFDP data please?
See [1], you'll find the files in sysfs. I wonder why that flash is
using the 16bit write at all.

-michael

[1] https://lore.kernel.org/linux-mtd/4304e19f3399a0a6e856119d01ccabe0@xxxxxxxx/