<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/mtd, branch v4.4</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-01-07T04:32:08Z</updated>
<entry>
<title>Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd</title>
<updated>2016-01-07T04:32:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-07T04:32:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b06f3a168cdcd80026276898fd1fee443ef25743'/>
<id>urn:sha1:b06f3a168cdcd80026276898fd1fee443ef25743</id>
<content type='text'>
Pull MTD fixes from Brian Norris:
 "Three last MTD fixes for v4.4.  These are all fixes for regressions
  and bugs reported mid cycle.  Unfortunately, some of them took a bit
  long to get proper testing and feedback.

   - Assign the default MTD name earlier in the registration process, so
     partition parsers (like cmdlinepart) see the right name.  Without
     this, some systems may come up with unpartitioned flash.  This was
     a v4.4-rc1 regression.

   - Revert some new Winbond SPI NOR flash unlocking/locking support;
     new code in v4.4 caused regressions on some Spansion flash.

   - Fix mis-typed parameter ordering in SPI NOR unlock function; this
     bug was introduced in v4.4-rc1"

* tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
  mtd: spi-nor: fix stm_is_locked_sr() parameters
  mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
  mtd: fix cmdlinepart parser, early naming for auto-filled MTD
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix stm_is_locked_sr() parameters</title>
<updated>2016-01-06T00:00:41Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-15T18:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a32d5b726ff8cf32bf491522b0ac8ae2545a063e'/>
<id>urn:sha1:a32d5b726ff8cf32bf491522b0ac8ae2545a063e</id>
<content type='text'>
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.

Reported-by: Bayi Cheng &lt;bayi.cheng@mediatek.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Bayi Cheng &lt;bayi.cheng@mediatek.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix Spansion regressions (aliased with Winbond)</title>
<updated>2016-01-06T00:00:03Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-15T18:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=67b9bcd36906e12a15ffec19463afbbd6a41660e'/>
<id>urn:sha1:67b9bcd36906e12a15ffec19463afbbd6a41660e</id>
<content type='text'>
Spansion and Winbond have occasionally used the same manufacturer ID,
and they don't support the same features. Particularly, writing SR=0
seems to break read access for Spansion's s25fl064k. Unfortunately, we
don't currently have a way to differentiate these Spansion and Winbond
parts, so rather than regressing support for these Spansion flash, let's
drop the new Winbond lock/unlock support for now. We can try to address
Winbond support during the next release cycle.

Original discussion:

http://patchwork.ozlabs.org/patch/549173/
http://patchwork.ozlabs.org/patch/553683/

Fixes: 357ca38d4751 ("mtd: spi-nor: support lock/unlock/is_locked for Winbond")
Fixes: c6fc2171b249 ("mtd: spi-nor: disable protection for Winbond flash at startup")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reported-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Cc: Felix Fietkau &lt;nbd@openwrt.org&gt;
</content>
</entry>
<entry>
<title>mtd: fix cmdlinepart parser, early naming for auto-filled MTD</title>
<updated>2016-01-04T18:54:18Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-11T23:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=472b444eef934eb7e90334efdd7fc7954cfe5132'/>
<id>urn:sha1:472b444eef934eb7e90334efdd7fc7954cfe5132</id>
<content type='text'>
Commit 807f16d4db95 ("mtd: core: set some defaults when dev.parent is
set") attempted to provide some default settings for MTDs that
 (a) assign the parent device and
 (b) don't provide their own name or owner

However, this isn't a perfect drop-in replacement for the boilerplate
found in some drivers, because the MTD name is used by partition
parsers like cmdlinepart, but the name isn't set until add_mtd_device(),
after the parsing is completed. This means cmdlinepart sees a NULL name
and therefore will not work properly.

Fix this by moving the default name and owner assignment to be first in
the MTD registration process.

[Note: this does not fix all reported issues, particularly with NAND
drivers. Will require an additional fix for drivers/mtd/nand/]

Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set")
Reported-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Frans Klaver &lt;fransklaver@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs</title>
<updated>2015-12-27T03:55:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-12-27T03:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3bef22eed98b53cfb3962884f14068251a5dd3f0'/>
<id>urn:sha1:3bef22eed98b53cfb3962884f14068251a5dd3f0</id>
<content type='text'>
Pull UBI bug fixes from Richard Weinberger:
 "This contains four bug fixes for UBI"

* tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs:
  mtd: ubi: don't leak e if schedule_erase() fails
  mtd: ubi: fixup error correction in do_sync_erase()
  UBI: fix use of "VID" vs. "EC" in header self-check
  UBI: fix return error code
</content>
</entry>
<entry>
<title>mtd: ubi: don't leak e if schedule_erase() fails</title>
<updated>2015-12-16T21:59:03Z</updated>
<author>
<name>Sebastian Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2015-11-26T20:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6b238de189f69dc77d660d4cce62eed15547f4c3'/>
<id>urn:sha1:6b238de189f69dc77d660d4cce62eed15547f4c3</id>
<content type='text'>
If __erase_worker() fails to erase the EB and schedule_erase() fails as
well to do anything about it then we go RO. But that is not a reason to
leak the e argument here. Therefore clean up e.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: ubi: fixup error correction in do_sync_erase()</title>
<updated>2015-12-16T21:52:46Z</updated>
<author>
<name>Sebastian Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2015-11-26T20:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1a31b20cd81d5cbc7ec6e24cb08066009a1ca32d'/>
<id>urn:sha1:1a31b20cd81d5cbc7ec6e24cb08066009a1ca32d</id>
<content type='text'>
Since fastmap we gained do_sync_erase(). This function can return an error
and its error handling isn't obvious. First the memory allocation for
struct ubi_work can fail and as such struct ubi_wl_entry is leaked.
However if the memory allocation succeeds then the tail function takes
care of the struct ubi_wl_entry. A free here could result in a double
free.
To make the error handling simpler, I split the tail function into one
piece which does the work and another which frees the struct ubi_work
which is passed as argument. As result do_sync_erase() can keep the
struct on stack and we get rid of one error source.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 8199b901a ("UBI: Add fastmap support to the WL sub-system")
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>UBI: fix use of "VID" vs. "EC" in header self-check</title>
<updated>2015-12-16T21:46:26Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-11-20T22:10:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e69d4912f2fc9d4cd952311d58ceae1cd83057b'/>
<id>urn:sha1:2e69d4912f2fc9d4cd952311d58ceae1cd83057b</id>
<content type='text'>
Looks like a typo, using UBI_EC_HDR_SIZE_CRC (note the "EC") to compute
the CRC for the VID header.

This shouldn't cause any functional change, as both structures are 64
bytes. Verified with:

	BUILD_BUG_ON(UBI_VID_HDR_SIZE_CRC != UBI_EC_HDR_SIZE_CRC);

Reported here:
http://lists.infradead.org/pipermail/linux-mtd/2013-September/048570.html

Reported by: Bill Pringlemeir &lt;bpringlemeir@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>UBI: fix return error code</title>
<updated>2015-12-16T21:45:04Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-11-20T10:14:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=97cb69dd800a471c3ee2467be3826badd9c12883'/>
<id>urn:sha1:97cb69dd800a471c3ee2467be3826badd9c12883</id>
<content type='text'>
We are checking dfs_rootdir for error value or NULL. But in the
conditional ternary operator we returned -ENODEV if dfs_rootdir contains
an error value and returned PTR_ERR(dfs_rootdir) if dfs_rootdir is NULL.
So in the case of dfs_rootdir being NULL we actually assigned 0 to err
and returned it to the caller implying a success.
Lets return -ENODEV when dfs_rootdir is NULL else return
PTR_ERR(dfs_rootdir).

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>doc: dt: mtd: partitions: add compatible property to "partitions" node</title>
<updated>2015-12-09T01:10:20Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-03T22:47:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e488ca9f8d4f62c2dc36bfa5c32f68e7f05ab381'/>
<id>urn:sha1:e488ca9f8d4f62c2dc36bfa5c32f68e7f05ab381</id>
<content type='text'>
As noted here [1], there are potentially future conflicts if we try to
use MTD's "partitions" subnode to describe anything besides just the
fixed-in-the-device-tree partitions currently described in this
document. Particularly, there was a proposal to use this node for the
AFS parser too.

It can pose a (small) problem to try to differentiate the following
nodes:

	// using binding as currently specified
	partitions {
		#address-cells = &lt;x&gt;;
		#size-cells = &lt;y&gt;;
		partition@0 {
			...;
		};
	};

and

	// proposed future binding
	partitions {
		compatible = "arm,arm-flash-structure";
	};

It's especially difficult if other uses of this node start having
subnodes.

So, since the "partitions" node is new in v4.4, let's fixup the binding
before release so that it requires a compatible property, so it's much
clearer to distinguish. e.g.:

	// proposed
	partitions {
		compatible = "fixed-partitions";
		#address-cells = &lt;x&gt;;
		#size-cells = &lt;y&gt;;
		partition@0 {
			...;
		};
	};

[1] Subject: "mtd: create a partition type device tree binding"
    http://lkml.kernel.org/g/20151113220039.GA74382@google.com
    http://lists.infradead.org/pipermail/linux-mtd/2015-November/063355.html
    http://lists.infradead.org/pipermail/linux-mtd/2015-November/063364.html

Cc: Michal Suchanek &lt;hramrach@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
</feed>
