LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Palmer <daniel@0x0f.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: linux-mtd@lists.infradead.org, richard@nod.at,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] mtd: spinand: add support for Foresee FS35ND0*G parts
Date: Mon, 23 Aug 2021 23:54:20 +0900 [thread overview]
Message-ID: <CAFr9PXkSeeHNn-KVyrVxp6RRdLYExTgWpheWKLLSZqEo_EHvRg@mail.gmail.com> (raw)
In-Reply-To: <20210823162148.35a24183@xps13>
Hi Miquel,
On Mon, 23 Aug 2021 at 23:21, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> I am not sure to follow, above the software says "3 corrected bf" while
Due to the status being "between 0 and 3 bitflips" I think it'll
basically report 3 most of the time.
As a refresher we seem to have a status for 0 - 3 flips but ok, 4 bit
flips but ok, and >4 flips no go.
In most cases (0 - 3) the driver is reporting 3.
> I thought the problem was when getting 4 bf, but the dump show many
> more. Can you show me how it behaves:
> * erase (like you did)
> * insert {1, 2, 3, 4, 5} bf and show the dump each time?
Here's a complete log of erasing the page then flipping all the bits
in the first byte.
# flash_erase /dev/mtd0 0x8000000 1
Erasing 128 Kibyte @ 8000000 -- 100 % complete
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6249
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 0@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6252
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 1@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6255
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: fc ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 2@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6258
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: f8 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 3@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6261
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 4@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6264
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 5@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6267
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 6@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6270
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: 80 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandflipbits /dev/mtd0 7@0x8000000
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6273
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
#
For completeness logs of what nandbiterrs does:
# flash_erase /dev/mtd0 0x8000000 1
Erasing 128 Kibyte @ 8000000 -- 100 % complete
# nandbiterrs -i ^C 1024 /dev/mtd0
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6478
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandbiterrs -i -b 1024 /dev/mtd0
incremental biterrors test
Read reported 3 corrected bit errors
Successfully corrected 0 bit errors per subpage
Inserted biterror @ 0/5
Read reported 4 corrected bit errors
ECC failure, invalid data despite read success
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6488
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 4 corrected bitflip(s) at offset 0x08000000
0x08000000: 05 a5 65 e5 05 85 45 c5 b5 35 f5 75 95 15 d5 55 |..e...E..5.u...U|
0x08000010: 6d ed 2d ad 4d cd 0d 8d fd 7d bd 3d dd 5d 9d 1d |m.-.M....}.=.]..|
0x08000020: 81 01 c1 41 a1 21 e1 61 11 91 51 d1 31 b1 71 f1 |...A.!.a..Q.1.q.|
0x08000030: c9 49 89 09 e9 69 a9 29 59 d9 19 99 79 f9 39 b9 |.I...i.)Y...y.9.|
0x08000040: 77 d7 37 b7 57 d7 17 97 e7 67 a7 27 c7 47 87 07 |w.7.W....g.'.G..|
0x08000050: 3f bf 7f ff 1f 9f 5f df af 2f ef 6f 8f 0f cf 4f |?....._../.o...O|
0x08000060: d3 53 93 13 f3 73 b3 33 43 c3 03 83 63 e3 23 a3 |.S...s.3C...c.#.|
0x08000070: 9b 1b db 5b bb 3b fb 7b 0b 8b 4b cb 2b ab 6b eb |...[.;.{..K.+.k.|
0x08000080: 0c 8c 4c cc 2c ac 6c ec 9c 1c dc 5c bc 3c fc 7c |..L.,.l....\.<.||
0x08000090: 44 c4 04 84 64 e4 24 a4 d4 54 94 14 f4 74 b4 34 |D...d.$..T...t.4|
#
# flash_erase /dev/mtd0 0x8000000 1
Erasing 128 Kibyte @ 8000000 -- 100 % complete
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 0
ECC corrected: 6492
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
# nandbiterrs -o -b 1024 /dev/mtd0
overwrite biterrors test
Read reported 3 corrected bit errors
Read reported 4 corrected bit errors
Failed to recover 1 bitflips
Bit error histogram (873 operations total):
Page reads with 0 corrected bit errors: 0
Page reads with 1 corrected bit errors: 0
Page reads with 2 corrected bit errors: 0
Page reads with 3 corrected bit errors: 785
# nanddump --bb=dumpbad -s 0x8000000 -l 1 -c -p /dev/mtd0 | head -n 10
ECC failed: 1
ECC corrected: 9202
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x08000000 and ending at 0x08000001...
ECC: 3 corrected bitflip(s) at offset 0x08000000
0x08000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0x08000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
Cheers,
Daniel
next prev parent reply other threads:[~2021-08-23 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 8:49 Daniel Palmer
2021-08-16 8:11 ` Miquel Raynal
2021-08-23 14:19 ` Daniel Palmer
2021-08-23 14:21 ` Miquel Raynal
2021-08-23 14:54 ` Daniel Palmer [this message]
2021-08-23 15:03 ` Miquel Raynal
2021-08-23 16:16 ` Daniel Palmer
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=CAFr9PXkSeeHNn-KVyrVxp6RRdLYExTgWpheWKLLSZqEo_EHvRg@mail.gmail.com \
--to=daniel@0x0f.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--subject='Re: [PATCH v3] mtd: spinand: add support for Foresee FS35ND0*G parts' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).