From: Vignesh Raghavendra <vigneshr@ti.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: richard@nod.at, sudeep.holla@arm.com,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, miquel.raynal@bootlin.com
Subject: Re: [PATCH] mtd: cfi_cmdset_0001: Support the absence of protection registers
Date: Fri, 1 May 2020 11:54:53 +0530 [thread overview]
Message-ID: <0159fa15-926a-05d3-ce5f-917b9af87c12@ti.com> (raw)
In-Reply-To: <20200430163245.GK2717@gaia>
Hi,
On 4/30/2020 10:02 PM, Catalin Marinas wrote:
> On Fri, Apr 17, 2020 at 04:23:26PM +0200, Jean-Philippe Brucker wrote:
>> The flash controller implemented by the Arm Base platform behaves like
>> the Intel StrataFlash J3 device, but omits several features. In
>> particular it doesn't implement a protection register, so "Number of
>> Protection register fields" in the Primary Vendor-Specific Extended
>> Query, is 0.
>>
>> The Intel StrataFlash J3 datasheet only lists 1 as a valid value for
>> NumProtectionFields. It describes the field as:
>>
>> "Number of Protection register fields in JEDEC ID space.
>> “00h,” indicates that 256 protection bytes are available"
>>
>> While a value of 0 may arguably not be architecturally valid, the
>> driver's current behavior is certainly wrong: if NumProtectionFields is
>> 0, read_pri_intelext() adds a negative value to the unsigned extra_size,
>> and ends up in an infinite loop.
>>
>> Fix it by ignoring a NumProtectionFields of 0.
>>
>> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
>
> If you need another confirmation:
>
> Tested-by: Catalin Marinas <catalin.marinas@arm.com>
>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git cfi/next
Thanks
Vignesh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-05-01 6:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 14:23 [PATCH] mtd: cfi_cmdset_0001: Support the absence of protection registers Jean-Philippe Brucker
2020-04-29 14:47 ` Sudeep Holla
2020-04-30 16:32 ` Catalin Marinas
2020-05-01 6:24 ` Vignesh Raghavendra [this message]
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=0159fa15-926a-05d3-ce5f-917b9af87c12@ti.com \
--to=vigneshr@ti.com \
--cc=catalin.marinas@arm.com \
--cc=jean-philippe@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=sudeep.holla@arm.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