<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/mtd/chips, branch v5.4.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>mtd: cfi_cmdset_0002: Fix do_erase_chip() to get chip as erasing mode</title>
<updated>2019-09-15T21:51:07+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-21T16:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a9485ff09088c67b70e4e38b1679c1b9bedb808'/>
<id>8a9485ff09088c67b70e4e38b1679c1b9bedb808</id>
<content type='text'>
The chip state is set to erasing by the function after getting chip.
So it should be to get chip as erasing mode at first.
But previously it was to get chip as writing mode then fix as erasing.

Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The chip state is set to erasing by the function after getting chip.
So it should be to get chip as erasing mode at first.
But previously it was to get chip as writing mode then fix as erasing.

Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Disable write buffer functions if FORCE_WORD_WRITE is 1</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=557c759036fc3976a5358cef23e65a263853b93f'/>
<id>557c759036fc3976a5358cef23e65a263853b93f</id>
<content type='text'>
Some write buffer functions are not used when FORCE_WORD_WRITE is set to 1.
So the compile warning messages are output if FORCE_WORD_WRITE is 1. To
resolve this disable the write buffer functions if FORCE_WORD_WRITE is 1.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some write buffer functions are not used when FORCE_WORD_WRITE is set to 1.
So the compile warning messages are output if FORCE_WORD_WRITE is 1. To
resolve this disable the write buffer functions if FORCE_WORD_WRITE is 1.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Split do_write_oneword() to reduce exit paths</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0bcf880b062ef88d144ffe90918c56dd11e3d935'/>
<id>0bcf880b062ef88d144ffe90918c56dd11e3d935</id>
<content type='text'>
The do_write_oneword_done() is called twice at the exit paths.
By splitting the retry functionality it can be reduced to call once.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The do_write_oneword_done() is called twice at the exit paths.
By splitting the retry functionality it can be reduced to call once.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Split wait for write buffer completion sequence</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6beb3ea746db88904a5ab8f2cc87837489e46612'/>
<id>6beb3ea746db88904a5ab8f2cc87837489e46612</id>
<content type='text'>
Split wait for write completion from do_write_buffer() into separate
function.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split wait for write completion from do_write_buffer() into separate
function.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Split write-to-buffer-reset sequence</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=816a6d1481a55983ba527a93702160cf210acade'/>
<id>816a6d1481a55983ba527a93702160cf210acade</id>
<content type='text'>
Just refactor to split the sequence from do_write_buffer().

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just refactor to split the sequence from do_write_buffer().

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Split do_write_oneword() op_done goto statement</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=228c05c2d73e072b78d0c661c2d8717d0310ef35'/>
<id>228c05c2d73e072b78d0c661c2d8717d0310ef35</id>
<content type='text'>
To reduce function size and to remove the goto statement, split the
op_done goto statement part into do_write_oneword_done(). Also
split the start part into do_write_oneword_start() to be symmetrical.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To reduce function size and to remove the goto statement, split the
op_done goto statement part into do_write_oneword_done(). Also
split the start part into do_write_oneword_start() to be symmetrical.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Split do_write_oneword() to reduce function size</title>
<updated>2019-08-27T12:25:53+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a371ba57a205e7dd6b2ccb502a4ea009d6c010f7'/>
<id>a371ba57a205e7dd6b2ccb502a4ea009d6c010f7</id>
<content type='text'>
Reduce the size of do_write_oneword() by extracting a helper function
for the hardware access.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Reviewed-by: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduce the size of do_write_oneword() by extracting a helper function
for the hardware access.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Reviewed-by: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Remove goto statement from do_write_buffer()</title>
<updated>2019-08-27T12:25:52+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5981dfced34a517fa45d8138457fb4798bc3f436'/>
<id>5981dfced34a517fa45d8138457fb4798bc3f436</id>
<content type='text'>
Remove goto statement from do_write_buffer() to simplify the code flow.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove goto statement from do_write_buffer() to simplify the code flow.

Cc: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Co: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Reword commit message]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()</title>
<updated>2019-08-27T12:25:44+00:00</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2019-08-05T19:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=37c673ade35c707d50583b5b25091ff8ebdeafd7'/>
<id>37c673ade35c707d50583b5b25091ff8ebdeafd7</id>
<content type='text'>
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.

Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Reported-by: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.

Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Joakim Tjernlund &lt;Joakim.Tjernlund@infinera.com&gt;
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Reported-by: Fabio Bettoni &lt;fbettoni@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
[vigneshr@ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: chips: gen_probe: kill useless initializer in mtd_do_chip_probe()</title>
<updated>2019-08-27T11:38:18+00:00</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2019-07-03T20:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f454b43a564fab4aae77c0bbc32072201993c349'/>
<id>f454b43a564fab4aae77c0bbc32072201993c349</id>
<content type='text'>
The 'mtd' local variable is initialized but this value is never used,
thus kill that initializer.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'mtd' local variable is initialized but this value is never used,
thus kill that initializer.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
