<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v5.17</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=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-03-07T16:46:54Z</updated>
<entry>
<title>mtd: rawnand: omap2: Actually prevent invalid configuration and build error</title>
<updated>2022-03-07T16:46:54Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@kernel.org</email>
</author>
<published>2022-02-19T19:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42da5a4ba17070e9d99abf375a5bd70e85d2a6b8'/>
<id>urn:sha1:42da5a4ba17070e9d99abf375a5bd70e85d2a6b8</id>
<content type='text'>
The root of the problem is that we are selecting symbols that have
dependencies. This can cause random configurations that can fail.
The cleanest solution is to avoid using select.

This driver uses interfaces from the OMAP_GPMC driver so we have to
depend on it instead.

Fixes: 4cd335dae3cf ("mtd: rawnand: omap2: Prevent invalid configuration and build error")
Signed-off-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/linux-mtd/20220219193600.24892-1-rogerq@kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2022-02-25T20:12:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-02-25T20:12:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c47658311d60be064b839f329c0e4d34f5f0735b'/>
<id>urn:sha1:c47658311d60be064b839f329c0e4d34f5f0735b</id>
<content type='text'>
Pull char/misc driver fixes from Greg KH:
 "Here are a few small driver fixes for 5.17-rc6 for reported issues.

  The majority of these are IIO fixes for small things, and the other
  two are a mvmem and mtd core conflict fix.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mtd: core: Fix a conflict between MTD and NVMEM on wp-gpios property
  nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property
  iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot
  iio: Fix error handling for PM
  iio: addac: ad74413r: correct comparator gpio getters mask usage
  iio: addac: ad74413r: use ngpio size when iterating over mask
  iio: addac: ad74413r: Do not reference negative array offsets
  iio: adc: men_z188_adc: Fix a resource leak in an error handling path
  iio: frequency: admv1013: remove the always true condition
  iio: accel: fxls8962af: add padding to regmap for SPI
  iio:imu:adis16480: fix buffering for devices with no burst mode
  iio: adc: ad7124: fix mask used for setting AIN_BUFP &amp; AIN_BUFM bits
  iio: adc: tsc2046: fix memory corruption by preventing array overflow
</content>
</entry>
<entry>
<title>mtd: core: Fix a conflict between MTD and NVMEM on wp-gpios property</title>
<updated>2022-02-21T16:59:25Z</updated>
<author>
<name>Christophe Kerello</name>
<email>christophe.kerello@foss.st.com</email>
</author>
<published>2022-02-20T15:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c7621890995d089a56a06d11580d185ede7c2f8'/>
<id>urn:sha1:6c7621890995d089a56a06d11580d185ede7c2f8</id>
<content type='text'>
Wp-gpios property can be used on NVMEM nodes and the same property can
be also used on MTD NAND nodes. In case of the wp-gpios property is
defined at NAND level node, the GPIO management is done at NAND driver
level. Write protect is disabled when the driver is probed or resumed
and is enabled when the driver is released or suspended.

When no partitions are defined in the NAND DT node, then the NAND DT node
will be passed to NVMEM framework. If wp-gpios property is defined in
this node, the GPIO resource is taken twice and the NAND controller
driver fails to probe.

A new Boolean flag named ignore_wp has been added in nvmem_config.
In case ignore_wp is set, it means that the GPIO is handled by the
provider. Lets set this flag in MTD layer to avoid the conflict on
wp_gpios property.

Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
Cc: stable@vger.kernel.org
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Christophe Kerello &lt;christophe.kerello@foss.st.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20220220151432.16605-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: brcmnand: Fixed incorrect sub-page ECC status</title>
<updated>2022-01-31T16:08:56Z</updated>
<author>
<name>david regan</name>
<email>dregan@mail.com</email>
</author>
<published>2022-01-26T22:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36415a7964711822e63695ea67fede63979054d9'/>
<id>urn:sha1:36415a7964711822e63695ea67fede63979054d9</id>
<content type='text'>
The brcmnand driver contains a bug in which if a page (example 2k byte)
is read from the parallel/ONFI NAND and within that page a subpage (512
byte) has correctable errors which is followed by a subpage with
uncorrectable errors, the page read will return the wrong status of
correctable (as opposed to the actual status of uncorrectable.)

The bug is in function brcmnand_read_by_pio where there is a check for
uncorrectable bits which will be preempted if a previous status for
correctable bits is detected.

The fix is to stop checking for bad bits only if we already have a bad
bits status.

Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
Signed-off-by: david regan &lt;dregan@mail.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/trinity-478e0c09-9134-40e8-8f8c-31c371225eda-1643237024774@3c-app-mailcom-lxa02
</content>
</entry>
<entry>
<title>mtd: rawnand: gpmi: don't leak PM reference in error path</title>
<updated>2022-01-26T09:02:36Z</updated>
<author>
<name>Christian Eggers</name>
<email>ceggers@arri.de</email>
</author>
<published>2022-01-25T08:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9161f365c91614e5a3f5c6dcc44c3b1b33bc59c0'/>
<id>urn:sha1:9161f365c91614e5a3f5c6dcc44c3b1b33bc59c0</id>
<content type='text'>
If gpmi_nfc_apply_timings() fails, the PM runtime usage counter must be
dropped.

Reported-by: Pavel Machek &lt;pavel@denx.de&gt;
Fixes: f53d4c109a66 ("mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings")
Signed-off-by: Christian Eggers &lt;ceggers@arri.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220125081619.6286-1-ceggers@arri.de
</content>
</entry>
<entry>
<title>mtd: phram: Prevent divide by zero bug in phram_setup()</title>
<updated>2022-01-25T09:32:07Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-01-21T11:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e3765875b1b8864898603768fd5c93eeb552211'/>
<id>urn:sha1:3e3765875b1b8864898603768fd5c93eeb552211</id>
<content type='text'>
The problem is that "erasesize" is a uint64_t type so it might be
non-zero but the lower 32 bits are zero so when it's truncated,
"(uint32_t)erasesize", then that value is zero. This leads to a
divide by zero bug.

Avoid the bug by delaying the divide until after we have validated
that "erasesize" is non-zero and within the uint32_t range.

Fixes: dc2b3e5cbc80 ("mtd: phram: use div_u64_rem to stop overwrite len in phram_setup")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220121115505.GI1978@kadam
</content>
</entry>
<entry>
<title>mtd: rawnand: omap2: Prevent invalid configuration and build error</title>
<updated>2022-01-25T09:32:07Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@kernel.org</email>
</author>
<published>2022-01-18T12:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cd335dae3cf25412427938d8abbaf04d46e63b5'/>
<id>urn:sha1:4cd335dae3cf25412427938d8abbaf04d46e63b5</id>
<content type='text'>
We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
this driver depends on OMAP_GPMC driver and uses symbols from there.

Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220118123525.8020-1-rogerq@kernel.org
</content>
</entry>
<entry>
<title>mtd: parsers: qcom: Fix missing free for pparts in cleanup</title>
<updated>2022-01-25T09:32:07Z</updated>
<author>
<name>Ansuel Smith</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-01-16T03:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3dd8ba961b9356c4113b96541c752c73d98fef70'/>
<id>urn:sha1:3dd8ba961b9356c4113b96541c752c73d98fef70</id>
<content type='text'>
Mtdpart doesn't free pparts when a cleanup function is declared.
Add missing free for pparts in cleanup function for smem to fix the
leak.

Fixes: 10f3b4d79958 ("mtd: parsers: qcom: Fix leaking of partition name")
Signed-off-by: Ansuel Smith &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220116032211.9728-2-ansuelsmth@gmail.com
</content>
</entry>
<entry>
<title>mtd: parsers: qcom: Fix kernel panic on skipped partition</title>
<updated>2022-01-25T09:31:44Z</updated>
<author>
<name>Ansuel Smith</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-01-16T03:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=65d003cca335cabc0160d3cd7daa689eaa9dd3cd'/>
<id>urn:sha1:65d003cca335cabc0160d3cd7daa689eaa9dd3cd</id>
<content type='text'>
In the event of a skipped partition (case when the entry name is empty)
the kernel panics in the cleanup function as the name entry is NULL.
Rework the parser logic by first checking the real partition number and
then allocate the space and set the data for the valid partitions.

The logic was also fundamentally wrong as with a skipped partition, the
parts number returned was incorrect by not decreasing it for the skipped
partitions.

Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser")
Signed-off-by: Ansuel Smith &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220116032211.9728-1-ansuelsmth@gmail.com
</content>
</entry>
<entry>
<title>mtd: parsers: qcom: Don't print error message on -EPROBE_DEFER</title>
<updated>2022-01-25T09:31:44Z</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2022-01-03T03:03:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=079e6bdb2b1cc1da8b5c602229db782732668ae7'/>
<id>urn:sha1:079e6bdb2b1cc1da8b5c602229db782732668ae7</id>
<content type='text'>
Its possible for the main smem driver to not be loaded by the time we come
along to parse the smem partition description but, this is a perfectly
normal thing.

No need to print out an error message in this case.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220103030316.58301-3-bryan.odonoghue@linaro.org
</content>
</entry>
</feed>
