mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@nokia.com>
To: "Tudor.Ambarus@microchip.com" <Tudor.Ambarus@microchip.com>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"boris.brezillon@bootlin.com" <boris.brezillon@bootlin.com>,
	"richard@nod.at" <richard@nod.at>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: fix erase_type array to indicate current map conf
Date: Fri, 23 Nov 2018 11:33:07 +0000	[thread overview]
Message-ID: <679e7fb8-f424-b72c-ac8a-315926080ede@nokia.com> (raw)
In-Reply-To: <65d03690-a475-dc5b-ab9d-14e6216ba0bd@microchip.com>

Hello Tudor,

On 23/11/2018 11:32, Tudor.Ambarus@microchip.com wrote:
>> I've tested this patch and it fixes the erasesize for S25FS128S and
>> our 128k partitions are writeable again with this patch.
> Good. You said that the flash is configured in non-uniform mapping (hybrid
> sector option). There is no uniform erase type that can erase the entire
> flash memory by its own, so the erase should be done using the non-uniform
> erase code (spi_nor_has_uniform_erase() should return false). Does the
> non-uniform erase work as expected? 

unfortunately, it doesn't. I was too fast reporting the success...
So erasesize is back to the value before non-uniform support patches,
partitions are not made read only any more, but actual write or
erase still fails.

I'll investigate further.

Taking into account the comments from Boris, we probably need this patch
anyway.

> For example, if the hybrid section is at the top of the address space, when
> using mtd_utils:
> $ mtd_debug erase /dev/your_mtd 4096 126976
> I would expect the use of the following erase types: 7*4k, 32k, 64k
> Then write and read back to check if the erase was done correctly:
> $ dd if=/dev/urandom of=in bs=4096 count=31
> $ mtd_debug write /dev/your_mtd 4096 126976 in
> $ mtd_debug read /dev/your_mtd 4096 126976 out
> $ sha1sum in out
> the output should be the same.
> 
> Feel free to add some prints in the code to be sure that non-uniform erase code
> selects the correct erase types.
> 

-- 
Best regards,
Alexander Sverdlin.

  reply	other threads:[~2018-11-23 11:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 12:36 Tudor.Ambarus
2018-11-22 12:38 ` Tudor.Ambarus
2018-11-22 16:14 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-11-22 16:22   ` Tudor.Ambarus
2018-11-23  9:42 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2018-11-23 10:17   ` Boris Brezillon
2018-11-23 10:29     ` Boris Brezillon
2018-11-23 10:32   ` Tudor.Ambarus
2018-11-23 11:33     ` Sverdlin, Alexander (Nokia - DE/Ulm) [this message]
2018-11-23 12:39       ` Tudor.Ambarus

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=679e7fb8-f424-b72c-ac8a-315926080ede@nokia.com \
    --to=alexander.sverdlin@nokia.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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

all inboxes | Powered by JetHome®