<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/mtd, branch v4.14.72</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.72</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.72'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-09-26T06:38:09Z</updated>
<entry>
<title>mtdchar: fix overflows in adjustment of `count`</title>
<updated>2018-09-26T06:38:09Z</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2018-07-07T03:37:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b888dba2e81d2b20d4896dcdebefb7e6d7e9697d'/>
<id>urn:sha1:b888dba2e81d2b20d4896dcdebefb7e6d7e9697d</id>
<content type='text'>
[ Upstream commit 6c6bc9ea84d0008024606bf5ba10519e20d851bf ]

The first checks in mtdchar_read() and mtdchar_write() attempt to limit
`count` such that `*ppos + count &lt;= mtd-&gt;size`. However, they ignore the
possibility of `*ppos &gt; mtd-&gt;size`, allowing the calculation of `count` to
wrap around. `mtdchar_lseek()` prevents seeking beyond mtd-&gt;size, but the
pread/pwrite syscalls bypass this.

I haven't found any codepath on which this actually causes dangerous
behavior, but it seems like a sensible change anyway.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd/maps: fix solutionengine.c printk format warnings</title>
<updated>2018-09-26T06:38:00Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-07-24T18:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=28b6561183ed02dcb3a5f2d261c4a5b46976fa5c'/>
<id>urn:sha1:28b6561183ed02dcb3a5f2d261c4a5b46976fa5c</id>
<content type='text'>
[ Upstream commit 1d25e3eeed1d987404e2d2e451eebac8c15cecc1 ]

Fix 2 printk format warnings (this driver is currently only used by
arch/sh/) by using "%pap" instead of "%lx".

Fixes these build warnings:

../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps':
../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here
  printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
                                                  ~~~~^
                                                  %08x
../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here
  printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
                                                                    ~~~~^
                                                                    %08x

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: linux-mtd@lists.infradead.org
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: linux-sh@vger.kernel.org
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: ubi: wl: Fix error return code in ubi_wl_init()</title>
<updated>2018-09-19T20:43:48Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-18T14:05:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8626c40a30937960926727a8606c6d0d8207425c'/>
<id>urn:sha1:8626c40a30937960926727a8606c6d0d8207425c</id>
<content type='text'>
commit 7233982ade15eeac05c6f351e8d347406e6bcd2f upstream.

Fix to return error code -ENOMEM from the kmem_cache_alloc() error
handling case instead of 0, as done elsewhere in this function.

Fixes: f78e5623f45b ("ubi: fastmap: Erase outdated anchor PEBs during
attach")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: dataflash: Use ULL suffix for 64-bit constants</title>
<updated>2018-08-24T11:09:04Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-06-22T07:04:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=99654c9ffcea2d835283aa8c570432bd03ca6943'/>
<id>urn:sha1:99654c9ffcea2d835283aa8c570432bd03ca6943</id>
<content type='text'>
[ Upstream commit cbdceb9b3e1928554fffd0d889adf2d0d8edee4d ]

With gcc 4.1.2 when compiling for 32-bit:

    drivers/mtd/devices/mtd_dataflash.c:736: warning: integer constant is too large for ‘long’ type
    drivers/mtd/devices/mtd_dataflash.c:737: warning: integer constant is too large for ‘long’ type

Add the missing "ULL" suffixes to fix this.

Fixes: 67e4145ebf2c161d ("mtd: dataflash: Add flash_info for AT45DB641E")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: nand: qcom: Add a NULL check for devm_kasprintf()</title>
<updated>2018-08-15T16:12:48Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-01-05T20:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2424869e4cd1d2d08b0c23b709b116d48d1a42aa'/>
<id>urn:sha1:2424869e4cd1d2d08b0c23b709b116d48d1a42aa</id>
<content type='text'>
commit 069f05346d01e7298939f16533953cdf52370be3 upstream.

devm_kasprintf() may fail, so we should better add a NULL check
and propagate an error on failure.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages</title>
<updated>2018-08-03T05:50:35Z</updated>
<author>
<name>Jane Wan</name>
<email>Jane.Wan@nokia.com</email>
</author>
<published>2018-05-08T21:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59d9b120600d981c2cf4b31a34334f75480cb7a3'/>
<id>urn:sha1:59d9b120600d981c2cf4b31a34334f75480cb7a3</id>
<content type='text'>
[ Upstream commit a75bbe71a27875fdc61cde1af6d799037cef6bed ]

Per ONFI specification (Rev. 4.0), if the CRC of the first parameter page
read is not valid, the host should read redundant parameter page copies.
Fix FSL NAND driver to read the two redundant copies which are mandatory
in the specification.

Signed-off-by: Jane Wan &lt;Jane.Wan@nokia.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: denali_dt: set clk_x_rate to 200 MHz unconditionally</title>
<updated>2018-07-22T12:28:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-06-22T16:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f1059632a4fcb0a73b1c315082cdb623a3b3ef52'/>
<id>urn:sha1:f1059632a4fcb0a73b1c315082cdb623a3b3ef52</id>
<content type='text'>
commit 3f6e6986045d47f87bd982910821b7ab9758487e upstream.

Since commit 1bb88666775e ("mtd: nand: denali: handle timing parameters
by setup_data_interface()"), denali_dt.c gets the clock rate from the
clock driver.  The driver expects the frequency of the bus interface
clock, whereas the clock driver of SOCFPGA provides the core clock.
Thus, the setup_data_interface() hook calculates timing parameters
based on a wrong frequency.

To make it work without relying on the clock driver, hard-code the clock
frequency, 200MHz.  This is fine for existing DT of UniPhier, and also
fixes the issue of SOCFPGA because both platforms use 200 MHz for the
bus interface clock.

Fixes: 1bb88666775e ("mtd: nand: denali: handle timing parameters by setup_data_interface()")
Cc: linux-stable &lt;stable@vger.kernel.org&gt; #4.14+
Reported-by: Philipp Rosenberger &lt;p.rosenberger@linutronix.de&gt;
Suggested-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Change erase functions to check chip good only</title>
<updated>2018-07-11T14:29:23Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami@allied-telesis.co.jp</email>
</author>
<published>2018-05-30T09:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac6bfe418e043e20f3805e95b46194d8956f3357'/>
<id>urn:sha1:ac6bfe418e043e20f3805e95b46194d8956f3357</id>
<content type='text'>
commit 79ca484b613041ca223f74b34608bb6f5221724b upstream.

Currently the functions use to check both chip ready and good.
But the chip ready is not enough to check the operation status.
So change this to check the chip good instead of this.
About the retry functions to make sure the error handling remain it.

Signed-off-by: Tokunori Ikegami &lt;ikegami@allied-telesis.co.jp&gt;
Reviewed-by: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Cyrille Pitchen &lt;cyrille.pitchen@wedev4u.fr&gt;
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Change erase functions to retry for error</title>
<updated>2018-07-11T14:29:23Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami@allied-telesis.co.jp</email>
</author>
<published>2018-05-30T09:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b76d8aa04240a07b1bc55759a3aa75556c106eed'/>
<id>urn:sha1:b76d8aa04240a07b1bc55759a3aa75556c106eed</id>
<content type='text'>
commit 45f75b8a919a4255f52df454f1ffdee0e42443b2 upstream.

For the word write functions it is retried for error.
But it is not implemented to retry for the erase functions.
To make sure for the erase functions change to retry as same.

This is needed to prevent the flash erase error caused only once.
It was caused by the error case of chip_good() in the do_erase_oneblock().
Also it was confirmed on the MACRONIX flash device MX29GL512FHT2I-11G.
But the error issue behavior is not able to reproduce at this moment.
The flash controller is parallel Flash interface integrated on BCM53003.

Signed-off-by: Tokunori Ikegami &lt;ikegami@allied-telesis.co.jp&gt;
Reviewed-by: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Cyrille Pitchen &lt;cyrille.pitchen@wedev4u.fr&gt;
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Change definition naming to retry write operation</title>
<updated>2018-07-11T14:29:23Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami@allied-telesis.co.jp</email>
</author>
<published>2018-05-30T09:32:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb638a002274b5a73b2be94e1553ac96e0b4f3fd'/>
<id>urn:sha1:eb638a002274b5a73b2be94e1553ac96e0b4f3fd</id>
<content type='text'>
commit 85a82e28b023de9b259a86824afbd6ba07bd6475 upstream.

The definition can be used for other program and erase operations also.
So change the naming to MAX_RETRIES from MAX_WORD_RETRIES.

Signed-off-by: Tokunori Ikegami &lt;ikegami@allied-telesis.co.jp&gt;
Reviewed-by: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Cyrille Pitchen &lt;cyrille.pitchen@wedev4u.fr&gt;
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
