<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-15T23:55:09Z</updated>
<entry>
<title>Merge tag 'ubifs-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs</title>
<updated>2023-04-15T23:55:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-04-15T23:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc88aa51a61819956bb23dc26fa72b5bc9a81af3'/>
<id>urn:sha1:bc88aa51a61819956bb23dc26fa72b5bc9a81af3</id>
<content type='text'>
Pull UBI fixes from Richard Weinberger:

 - Fix failure to attach when vid_hdr offset equals the (sub)page size

 - Fix for a deadlock in UBI's worker thread

* tag 'ubifs-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
  ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size
  ubi: Fix deadlock caused by recursively holding work_sem
</content>
</entry>
<entry>
<title>mtd: rawnand: meson: fix bitmask for length in command word</title>
<updated>2023-04-03T15:58:01Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@sberdevices.ru</email>
</author>
<published>2023-03-29T07:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93942b70461574ca7fc3d91494ca89b16a4c64c7'/>
<id>urn:sha1:93942b70461574ca7fc3d91494ca89b16a4c64c7</id>
<content type='text'>
Valid mask is 0x3FFF, without this patch the following problems were
found:

1) [    0.938914] Could not find a valid ONFI parameter page, trying
                  bit-wise majority to recover it
   [    0.947384] ONFI parameter recovery failed, aborting

2) Read with disabled ECC mode was broken.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/3794ffbf-dfea-e96f-1f97-fe235b005e19@sberdevices.ru
</content>
</entry>
<entry>
<title>mtdblock: tolerate corrected bit-flips</title>
<updated>2023-04-03T15:57:59Z</updated>
<author>
<name>Bang Li</name>
<email>libang.linuxer@gmail.com</email>
</author>
<published>2023-03-28T16:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c3089601f064d80b3838eceb711fcac04bceaad'/>
<id>urn:sha1:0c3089601f064d80b3838eceb711fcac04bceaad</id>
<content type='text'>
mtd_read() may return -EUCLEAN in case of corrected bit-flips.This
particular condition should not be treated like an error.

Signed-off-by: Bang Li &lt;libang.linuxer@gmail.com&gt;
Fixes: e47f68587b82 ("mtd: check for max_bitflips in mtd_read_oob()")
Cc: &lt;stable@vger.kernel.org&gt; # v3.7
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230328163012.4264-1-libang.linuxer@gmail.com
</content>
</entry>
<entry>
<title>mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min</title>
<updated>2023-04-03T15:57:57Z</updated>
<author>
<name>Christophe Kerello</name>
<email>christophe.kerello@foss.st.com</email>
</author>
<published>2023-03-28T15:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ddbb664b6ab8de7dffa388ae0c88cd18616494e5'/>
<id>urn:sha1:ddbb664b6ab8de7dffa388ae0c88cd18616494e5</id>
<content type='text'>
Use timings.mode value instead of checking tRC_min timing
for EDO mode support.

Signed-off-by: Christophe Kerello &lt;christophe.kerello@foss.st.com&gt;
Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
Cc: stable@vger.kernel.org #v5.10+
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230328155819.225521-3-christophe.kerello@foss.st.com
</content>
</entry>
<entry>
<title>mtd: rawnand: stm32_fmc2: remove unsupported EDO mode</title>
<updated>2023-04-03T15:57:56Z</updated>
<author>
<name>Christophe Kerello</name>
<email>christophe.kerello@foss.st.com</email>
</author>
<published>2023-03-28T15:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f71e0e329c152c7f11ddfd97ffc62aba152fad3f'/>
<id>urn:sha1:f71e0e329c152c7f11ddfd97ffc62aba152fad3f</id>
<content type='text'>
Remove the EDO mode support from as the FMC2 controller does not
support the feature.

Signed-off-by: Christophe Kerello &lt;christophe.kerello@foss.st.com&gt;
Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
Cc: stable@vger.kernel.org #v5.4+
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230328155819.225521-2-christophe.kerello@foss.st.com
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2023-04-02T17:10:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-04-02T17:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a10ca0950afe36fa5a20e8fc3e843beef8808fc1'/>
<id>urn:sha1:a10ca0950afe36fa5a20e8fc3e843beef8808fc1</id>
<content type='text'>
Pull driver core fixes from Greg KH:
 "Here are three small changes for 6.3-rc5 semi-related to driver core
  stuff:

   - documentation update where we move the security_bugs file to a more
     relevant location.

   - mdt/spi-nor debugfs memory leak fix that's been floating around for
     a long time and acked by the maintainer

   - cacheinfo bugfix for a regression in 6.3-rc1

  All have been in linux-next with no reported problems"

* tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  cacheinfo: Fix LLC is not exported through sysfs
  Documentation/security-bugs: move from admin-guide/ to process/
  mtd: spi-nor: fix memory leak when using debugfs_lookup()
</content>
</entry>
<entry>
<title>ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size</title>
<updated>2023-03-29T21:32:57Z</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2023-03-06T01:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e020e1b96afdecd20680b5b5be2a6ffc3d27628'/>
<id>urn:sha1:1e020e1b96afdecd20680b5b5be2a6ffc3d27628</id>
<content type='text'>
Following process will make ubi attaching failed since commit
1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"):

ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB
modprobe nandsim id_bytes=$ID
flash_eraseall /dev/mtd0
modprobe ubi mtd="0,2048"  # set vid_hdr offset as 2048 (one page)
(dmesg):
  ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large.
  UBI error: cannot attach mtd0
  UBI error: cannot initialize UBI, error -22

Rework original solution, the key point is making sure
'vid_hdr_shift + UBI_VID_HDR_SIZE &lt; ubi-&gt;vid_hdr_alsize',
so we should check vid_hdr_shift rather not vid_hdr_offset.
Then, ubi still support (sub)page aligined VID header offset.

Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size")
Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Tested-by: Nicolas Schichan &lt;nschichan@freebox.fr&gt;
Tested-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt; # v5.10, v4.19
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mtd/fixes-for-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux</title>
<updated>2023-03-27T16:41:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-03-27T16:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc5d1a9233eef4a3656712994e5bfa0c0470ebfc'/>
<id>urn:sha1:fc5d1a9233eef4a3656712994e5bfa0c0470ebfc</id>
<content type='text'>
Pull MTD fixes from Miquel Raynal:
 "Raw NAND controller driver fixes:

   - meson:
      - Invalidate cache on polling ECC bit
      - Initialize struct with zeroes

   - nandsim: Artificially prevent sequential page reads

  ECC engine driver fixes:

   - mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is
     used

  Binging fixes:

   - jedec,spi-nor: Document CPOL/CPHA support"

* tag 'mtd/fixes-for-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: rawnand: meson: invalidate cache on polling ECC bit
  mtd: rawnand: nandsim: Artificially prevent sequential page reads
  dt-bindings: mtd: jedec,spi-nor: Document CPOL/CPHA support
  mtd: nand: mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is used
  mtd: rawnand: meson: initialize struct with zeroes
</content>
</entry>
<entry>
<title>mtd: rawnand: meson: invalidate cache on polling ECC bit</title>
<updated>2023-03-22T15:59:29Z</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@sberdevices.ru</email>
</author>
<published>2023-03-13T07:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e732e39ed9929c05fd219035bc9653ba4100d4fa'/>
<id>urn:sha1:e732e39ed9929c05fd219035bc9653ba4100d4fa</id>
<content type='text'>
'info_buf' memory is cached and driver polls ECC bit in it. This bit
is set by the NAND controller. If 'usleep_range()' returns before device
sets this bit, 'info_buf' will be cached and driver won't see update of
this bit and will loop forever.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/d4ef0bd6-816e-f6fa-9385-f05f775f0ae2@sberdevices.ru
</content>
</entry>
<entry>
<title>mtd: rawnand: nandsim: Artificially prevent sequential page reads</title>
<updated>2023-03-22T15:59:29Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-03-10T08:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b043c649022ec55040aa9315cc72059c4ec254c'/>
<id>urn:sha1:9b043c649022ec55040aa9315cc72059c4ec254c</id>
<content type='text'>
The continuous read support added recently makes nandsim
unhappy. Indeed, all the supported commands should be re-encoded into
internal commands, so of course there is currently no support for the
commands and patterns needed for continuous reads to work.

I tried to add support for them but nandsim (which is more a tool to
develop/debug upper layers rather than the raw NAND core) suffers from a
big limitation: it's internal parser needs to know what exact operation
is happening when the address cycles are performed. The research is then
sequential from the start up to the address cycles, but does not check
what's coming next even though the information is available. This is a
limitation which is related to the old API used by the core which kind
of forced the controllers to guess what operation was being performed
rather early. Today the core uses a more transparent API called
-&gt;exec_op() which no longer requires controller drivers to do any more
guessing, but despite being updated to -&gt;exec_op(), nandsim is still a
bit constrained on this regard and thus cannot handle sequential page
reads because the start sequence beginning is identical to a regular
page read.

If the internal algorithm is updated some day, it should be possible to
make it support sequential page reads by adding something like:

       /* Large page devices continuous read page start */
       {OPT_LARGEPAGE, {STATE_CMD_READ0, STATE_ADDR_PAGE, STATE_CMD_READSTART,
                        STATE_CMD_READCACHESEQ | ACTION_CPY, STATE_DATAOUT,
                        STATE_READY}},
       /* Large page devices continuous read page continue */
       {OPT_LARGEPAGE, {STATE_CMD_READCACHESEQ | ACTION_CPY_NEXT, STATE_DATAOUT,
                        STATE_READY}},
       /* Large page devices continuous read page end */
       {OPT_LARGEPAGE, {STATE_CMD_READCACHEEND | ACTION_CPY_NEXT, STATE_DATAOUT,
                        STATE_READY}},

For now, we just return -EOPNOTSUPP when the core asks controller
drivers if they support the feature in order to prevent any further use
of these opcodes.

Note: This is a hack, -&gt;exec_op() is not supposed to check against the
COMMAND opcodes unless _really_ needed.

Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Reported-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Link: https://lore.kernel.org/linux-mtd/fd34fe55-7f4a-030d-8653-9bb9cf08410d@huawei.com/
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Tested-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Link: https://lore.kernel.org/linux-mtd/20230310085452.1368716-1-miquel.raynal@bootlin.com
</content>
</entry>
</feed>
