From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Eliav Farber <farbere@amazon.com>, <tudor.ambarus@linaro.org>,
<mwalle@kernel.org>, <richard@nod.at>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling
Date: Mon, 30 Mar 2026 16:22:15 +0200 [thread overview]
Message-ID: <87pl4l9z3c.fsf@bootlin.com> (raw)
In-Reply-To: <2vxzcy0l1k7g.fsf@kernel.org> (Pratyush Yadav's message of "Mon, 30 Mar 2026 14:10:59 +0000")
>> 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.
>
> Applied patches 1 and 3 to spi-nor/next. Thanks!
>
> Skipped patch 2 since you say that you haven't got a device to test
> with. I don't have a very strong opinion on this, but I do think we
> should test patches on real hardware just to we get some sanity checking
> for the patch.
Honestly, I am pretty convinced patch 2 cannot make more harm as the
block protection is already badly broken by not being described at
all. Furthermore, for similar chips I have, these bits are relevant, so
I would rather be in favour of going forward with patch 2, because at
most it will just not fix the behaviour as it pretends it does.
My 2cts :)
Miquèl
next prev parent reply other threads:[~2026-03-30 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 14:35 [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling Eliav Farber
2026-02-18 14:35 ` [PATCH v2 1/3] mtd: spi-nor: winbond: Fix locking support for w25q256jwm Eliav Farber
2026-02-18 14:35 ` [PATCH v2 2/3] mtd: spi-nor: winbond: Fix locking support for w25q256jw Eliav Farber
2026-02-18 14:35 ` [PATCH v2 3/3] mtd: spi-nor: winbond: Fix locking support for w25q64jvm Eliav Farber
2026-02-19 7:51 ` [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling Michael Walle
2026-02-19 8:59 ` Farber, Eliav
2026-02-19 9:05 ` Michael Walle
2026-03-30 14:10 ` Pratyush Yadav
2026-03-30 14:22 ` Miquel Raynal [this message]
2026-03-30 14:59 ` Pratyush Yadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pl4l9z3c.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=farbere@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mwalle@kernel.org \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox