public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: "Rafał Miłecki" <rafal@milecki.pl>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Brian Norris" <computersforpeace@gmail.com>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Cyrille Pitchen" <cyrille.pitchen@atmel.com>,
	linux-mtd@lists.infradead.org,
	"Hauke Mehrtens" <hauke@hauke-m.de>
Subject: Re: [PATCH V3] mtd: bcm47xxsflash: support reading flash out of mapping window
Date: Sat, 4 Feb 2017 23:31:53 +0100	[thread overview]
Message-ID: <b9143509-e182-79f6-19c8-7bca5393b772@gmail.com> (raw)
In-Reply-To: <79f26e776e8ca071bb0a09e434114e99@milecki.pl>

On 02/04/2017 11:27 PM, Rafał Miłecki wrote:
> On 2017-02-04 23:01, Marek Vasut wrote:
>> On 01/23/2017 12:51 PM, Rafał Miłecki wrote:
>>> From: Rafał Miłecki <rafal@milecki.pl>
>>>
>>> For reading flash content we use MMIO but it's possible to read only
>>> first 16 MiB this way. It's simply an arch design/limitation.
>>> To support flash sizes bigger than 16 MiB implement indirect access
>>> using ChipCommon registers.
>>> This has been tested using MX25L25635F.
>>>
>>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>>> ---
>>> V2: Simplify line writing to buf
>>>     Add some trivial comment for OPCODE_ST_READ4B
>>>     Both requested by Marek
>>> V3: Use as much as possible MMIO access for read crossing boundary
>>> (performance)
>>
>> It's not because of performance, but because you can start reading at 15
>> MiB offset and read 2 MiB , at which point the previous patch would IMO
>> fail.
> 
> It never failed. It was slow but was working as expected.

Maybe you didn't test with dumb enough mis-usage ;) I think something
like this would've triggered it:
$ dd if=/dev/mtd0 of=/dev/null seek=15M bs=2M
Assuming mtd0 is the whole flash device, and the flash is larger than 17
MiB.

But then again, it should be OK now and we can move on to the next problem.

>> Acked-by: Marek Vasut <marek.vasut@gmail.com>
>>
>> Thanks!
> 
> Thanks


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-02-04 22:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 11:51 [PATCH V3] mtd: bcm47xxsflash: support reading flash out of mapping window Rafał Miłecki
2017-02-04 22:01 ` Marek Vasut
2017-02-04 22:27   ` Rafał Miłecki
2017-02-04 22:31     ` Marek Vasut [this message]
2017-02-08 19:35 ` Brian Norris
2017-02-08 22:53   ` Rafał Miłecki
2017-02-08 22:53 ` [PATCH V4] " Rafał Miłecki
2017-02-08 23:09   ` Brian Norris
2017-02-08 23:12     ` Brian Norris

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=b9143509-e182-79f6-19c8-7bca5393b772@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=hauke@hauke-m.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    --cc=zajec5@gmail.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