Skip to content

mtd: spi-nor: winbond: Fix protection handling

Eliav Farber linux-mtd lkml 2 versions – Applied

Status from this message: Applied patches 1 and 3 to spi-nor/next. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesApplied
  2. v14 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Remove last patch in series that added dual/quad read for w25q64jvm
- Added Minimum testing requirements for w25q256jwm and w25q64jvm

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3mtd: spi-nor: winbond: Fix locking support for w25q256jwmdrivers/mtd/spi-nor/winbond.c+1 -10 replies
2/3mtd: spi-nor: winbond: Fix locking support for w25q256jwdrivers/mtd/spi-nor/winbond.c+1 -00 replies
3/3mtd: spi-nor: winbond: Fix locking support for w25q64jvmdrivers/mtd/spi-nor/winbond.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling

This series fixes block protection handling for the following Winbond SPI-NOR devices:
- w25q256jwm
- w25q256jw
- w25q64jvm

The devices do not correctly describe their Status Register layout and protection capabilities (locking flags, TB bit, BP bit configuration). As a result, the spi-nor core rejects protection requests and locking operations fail with -EINVAL, e.g.:

flash_lock -l /dev/mtd29
flash_lock: error!: could not lock device: /dev/mtd29 error 22 (Invalid argument)

Update the device flags to match the actual hardware behavior so that locking and unlocking regions work correctly.

All changes were validated using flash_lock on the affected devices.

Changes in v2:
- Remove last patch in series that added dual/quad read for w25q64jvm
- Added Minimum testing requirements for w25q256jwm and w25q64jvm

Eliav Farber (3):
mtd: spi-nor: winbond: Fix locking support for w25q256jwm
mtd: spi-nor: winbond: Fix locking support for w25q256jw
mtd: spi-nor: winbond: Fix locking support for w25q64jvm

 drivers/mtd/spi-nor/winbond.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.3