<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v4.20</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=v4.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-13T21:09:44Z</updated>
<entry>
<title>ubi: Do not drop UBI device reference before using</title>
<updated>2018-12-13T21:09:44Z</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2018-11-28T03:20:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e542087701f09418702673631a908429feb3eae0'/>
<id>urn:sha1:e542087701f09418702673631a908429feb3eae0</id>
<content type='text'>
The UBI device reference is dropped but then the device is used as a
parameter of ubi_err. The bug is introduced in changing ubi_err's
behavior. The old ubi_err does not require a UBI device as its first
parameter, but the new one does.

Fixes: 32608703310 ("UBI: Extend UBI layer debug/messaging capabilities")
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: Put MTD device after it is not used</title>
<updated>2018-12-13T21:09:32Z</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2018-11-28T02:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b95f83ab762dd6211351b9140f99f43644076ca8'/>
<id>urn:sha1:b95f83ab762dd6211351b9140f99f43644076ca8</id>
<content type='text'>
The MTD device reference is dropped via put_mtd_device, however its
field -&gt;index is read and passed to ubi_msg. To fix this, the patch
moves the reference dropping after calling ubi_msg.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: nand: Fix memory allocation in nanddev_bbt_init()</title>
<updated>2018-11-28T14:41:50Z</updated>
<author>
<name>Frieder Schrempf</name>
<email>frieder.schrempf@kontron.de</email>
</author>
<published>2018-11-27T07:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40b412897ccb4b98b2cfb2a0aaabed58dd9e2086'/>
<id>urn:sha1:40b412897ccb4b98b2cfb2a0aaabed58dd9e2086</id>
<content type='text'>
Fix the size of the buffer allocated to store the in-memory BBT.
This bug was previously hidden by a different bug, that was fixed in
commit d098093ba06e ("mtd: nand: Fix nanddev_neraseblocks()").

Fixes: 9c3736a3de21 ("mtd: nand: Add core infrastructure to deal with NAND devices")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Frieder Schrempf &lt;frieder.schrempf@kontron.de&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix erase_type array to indicate current map conf</title>
<updated>2018-11-28T08:00:00Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2018-11-26T12:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc92843159a7d01e37cf68750745333e944a9e55'/>
<id>urn:sha1:dc92843159a7d01e37cf68750745333e944a9e55</id>
<content type='text'>
BFPT advertises all the erase types supported by all the possible
map configurations. Mask out the erase types that are not supported
by the current map configuration.

Backward compatibility test done on sst26vf064b.

Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table")
Reported-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix selection of uniform erase type in flexible conf</title>
<updated>2018-11-20T13:26:59Z</updated>
<author>
<name>Tudor.Ambarus@microchip.com</name>
<email>Tudor.Ambarus@microchip.com</email>
</author>
<published>2018-11-16T17:46:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8828ec1c003727fc001eab06aa19bd2ca9b677e'/>
<id>urn:sha1:e8828ec1c003727fc001eab06aa19bd2ca9b677e</id>
<content type='text'>
There are uniform, non-uniform and flexible erase flash configurations.

The non-uniform erase types, are the erase types that can _not_ erase
the entire flash by their own.

As the code was, in case flashes had flexible erase capabilities
(support both uniform and non-uniform erase types in the same flash
configuration) and supported multiple uniform erase type sizes, the
code did not sort the uniform erase types, and could select a wrong
erase type size.

Sort the uniform erase mask in case of flexible erase flash
configurations, in order to select the best uniform erase type size.

Uniform, non-uniform, and flexible configurations with just a valid
uniform erase type, are not affected by this change.

Uniform erase tested on mx25l3273fm2i-08g and sst26vf064B-104i/sn.
Non uniform erase tested on sst26vf064B-104i/sn.

Fixes: 5390a8df769e ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: Fix Cadence QSPI page fault kernel panic</title>
<updated>2018-11-19T21:18:30Z</updated>
<author>
<name>Thor Thayer</name>
<email>thor.thayer@linux.intel.com</email>
</author>
<published>2018-11-16T14:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6a66f80c85e8e20573ca03fabf32445954a88d5'/>
<id>urn:sha1:a6a66f80c85e8e20573ca03fabf32445954a88d5</id>
<content type='text'>
The current Cadence QSPI driver caused a kernel panic sporadically
when writing to QSPI. The problem was caused by writing more bytes
than needed because the QSPI operated on 4 bytes at a time.
&lt;snip&gt;
[   11.202044] Unable to handle kernel paging request at virtual address bffd3000
[   11.209254] pgd = e463054d
[   11.211948] [bffd3000] *pgd=2fffb811, *pte=00000000, *ppte=00000000
[   11.218202] Internal error: Oops: 7 [#1] SMP ARM
[   11.222797] Modules linked in:
[   11.225844] CPU: 1 PID: 1317 Comm: systemd-hwdb Not tainted 4.17.7-d0c45cd44a8f
[   11.235796] Hardware name: Altera SOCFPGA Arria10
[   11.240487] PC is at __raw_writesl+0x70/0xd4
[   11.244741] LR is at cqspi_write+0x1a0/0x2cc
&lt;/snip&gt;
On a page boundary limit the number of bytes copied from the tx buffer
to remain within the page.

This patch uses a temporary buffer to hold the 4 bytes to write and then
copies only the bytes required from the tx buffer.

Reported-by: Adrian Amborzewicz &lt;adrian.ambrozewicz@intel.com&gt;
Signed-off-by: Thor Thayer &lt;thor.thayer@linux.intel.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: qcom: Namespace prefix some commands</title>
<updated>2018-11-18T07:10:47Z</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2018-11-17T03:43:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=33bf5519ae5dd356b182a94e3622f42860274a38'/>
<id>urn:sha1:33bf5519ae5dd356b182a94e3622f42860274a38</id>
<content type='text'>
PAGE_READ is used by RISC-V arch code included through mm headers,
and it makes sense to bring in a prefix on these in the driver.

drivers/mtd/nand/raw/qcom_nandc.c:153: warning: "PAGE_READ" redefined
 #define PAGE_READ   0x2
In file included from include/linux/memremap.h:7,
                 from include/linux/mm.h:27,
                 from include/linux/scatterlist.h:8,
                 from include/linux/dma-mapping.h:11,
                 from drivers/mtd/nand/raw/qcom_nandc.c:17:
arch/riscv/include/asm/pgtable.h:48: note: this is the location of the previous definition

Caught by riscv allmodconfig.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: atmel: fix OF child-node lookup</title>
<updated>2018-11-18T07:09:44Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2018-08-27T08:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d1e9c2212ea6b4dd735e4fc3dd6279a365d5d10'/>
<id>urn:sha1:5d1e9c2212ea6b4dd735e4fc3dd6279a365d5d10</id>
<content type='text'>
Use the new of_get_compatible_child() helper to lookup the nfc child
node instead of using of_find_compatible_node(), which searches the
entire tree from a given start node and thus can return an unrelated
(i.e. non-child) node.

This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the node of the device being probed).

While at it, also fix a related nfc-node reference leak.

Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.11
Cc: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Cc: Josh Wu &lt;rainyfeeling@outlook.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi_nor: pass DMA-able buffer to spi_nor_read_raw()</title>
<updated>2018-11-13T19:37:34Z</updated>
<author>
<name>Tudor.Ambarus@microchip.com</name>
<email>Tudor.Ambarus@microchip.com</email>
</author>
<published>2018-11-09T16:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d5ceff25aa1edcaf84e7ee26fdcc746cb245af8'/>
<id>urn:sha1:1d5ceff25aa1edcaf84e7ee26fdcc746cb245af8</id>
<content type='text'>
spi_nor_read_raw() calls nor-&gt;read() which might be implemented
by the m25p80 driver. m25p80 uses the spi-mem layer which requires
DMA-able in/out buffers. Pass kmalloc'ed dma buffer to spi_nor_read_raw().

Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table")
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: don't overwrite errno in spi_nor_get_map_in_use()</title>
<updated>2018-11-13T19:37:34Z</updated>
<author>
<name>Tudor.Ambarus@microchip.com</name>
<email>Tudor.Ambarus@microchip.com</email>
</author>
<published>2018-11-09T16:56:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9f07cc8207a2a69496beec3f5a5a8372bacdfdc'/>
<id>urn:sha1:b9f07cc8207a2a69496beec3f5a5a8372bacdfdc</id>
<content type='text'>
Don't overwrite the errno from spi_nor_read_raw().

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
</feed>
