From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Orgad Shaneh <orgads@gmail.com>
Cc: richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: cfi_cmdset_0002: also clamp the write buffer of an x16 part strapped to x8
Date: Mon, 12 Oct 2026 20:28:29 +0200 [thread overview]
Message-ID: <87ld82zsc2.fsf@bootlin.com> (raw)
In-Reply-To: <20261006052435.319751-1-orgads@gmail.com> (Orgad Shaneh's message of "Tue, 6 Oct 2026 05:24:35 +0000")
Hi Orgad,
On 06/10/2026 at 05:24:35 GMT, Orgad Shaneh <orgads@gmail.com> wrote:
> Commit cfc5ebc9540e ("mtd: cfi_cmdset_0002: cap the write-buffer chunk
> at 256 bytes on an x8 device") limits a Write to Buffer to 256 bytes
> when cfi->device_type is CFI_DEVICETYPE_X8, because do_write_buffer()
> sends the word count as a single bus word and an 8-bit data lane
> truncates it.
>
> The M29EW that commit was written for is an x16 part strapped to x8.
> The probe reports it as
>
> phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank.
> Manufacturer ID 0x000089 Chip ID 0x00007e
>
> so its device_type is CFI_DEVICETYPE_X16, the clamp does not apply, and
> every full 512-byte chunk still times out:
>
> MTD do_write_buffer_wait(): software timeout, address:0x002203ff.
>
> What limits the count is the width of each device's data lane, not the
> part's type. Test that instead: map_bankwidth(map) / cfi_interleave(cfi)
> is 1 for an x8 part, for x8 parts interleaved on a wider bus, and for an
> x16 part in an 8-bit bank.
>
> On the board (Octeon CN6335, the same M29EW) writes of 1, 2, 32, 64 and
> 256 bytes to an erased partition read back correctly and 512, 1024,
> 2048 and 4096 failed with the timeout above; with this patch every size
> up to 64 KiB reads back correctly and the u-boot environment can be
> saved from Linux again.
>
It no longer applies, can you please rebase and resend?
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2026-10-12 18:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 7:13 [PATCH] mtd: cfi_cmdset_0002: cap the write-buffer chunk at 256 bytes on an 8-bit bus Orgad Shaneh
2026-09-15 7:30 ` sashiko-bot
2026-09-15 7:50 ` [PATCH v2] mtd: cfi_cmdset_0002: cap the write-buffer chunk at 256 bytes on an x8 device Orgad Shaneh
2026-09-16 15:12 ` Miquel Raynal
2026-09-16 16:27 ` Orgad Shaneh
2026-09-17 12:46 ` Miquel Raynal
2026-09-16 16:27 ` [PATCH v3] " Orgad Shaneh
2026-09-25 14:28 ` Miquel Raynal
2026-10-06 5:24 ` [PATCH] mtd: cfi_cmdset_0002: also clamp the write buffer of an x16 part strapped to x8 Orgad Shaneh
2026-10-12 18:28 ` Miquel Raynal [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=87ld82zsc2.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=orgads@gmail.com \
--cc=richard@nod.at \
--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