<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v3.5</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=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-13T16:56:26Z</updated>
<entry>
<title>Merge tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd</title>
<updated>2012-07-13T16:56:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-13T16:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36ec9fbfe772ba8309ccd724bb7dd26c0923b6f7'/>
<id>urn:sha1:36ec9fbfe772ba8309ccd724bb7dd26c0923b6f7</id>
<content type='text'>
Pull late MTD fixes from David Woodhouse:
 - fix 'sparse warning fix' regression which totally breaks MXC NAND
 - fix GPMI NAND regression when used with UBI
 - update/correct sysfs documentation for new 'bitflip_threshold' field
 - fix nandsim build failure

* tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd:
  mtd: nandsim: don't open code a do_div helper
  mtd: ABI documentation: clarification of bitflip_threshold
  mtd: gpmi-nand: fix read page when reading to vmalloced area
  mtd: mxc_nand: use 32bit copy functions
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd</title>
<updated>2012-07-06T17:34:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-06T17:34:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af9b9a53fa0a86921edb86973f9661ccc7ddb90d'/>
<id>urn:sha1:af9b9a53fa0a86921edb86973f9661ccc7ddb90d</id>
<content type='text'>
Pull two MTD fixes from David Woodhouse:
 - Fix a logic error in OLPC CAFÉ NAND ready() function.
 - Fix regression due to bitflip handling changes.

* tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd:
  mtd: cafe_nand: fix an &amp; vs | mistake
  mtd: nand: initialize bitflip_threshold prior to BBT scanning
</content>
</entry>
<entry>
<title>mtd: nandsim: don't open code a do_div helper</title>
<updated>2012-07-06T15:59:33Z</updated>
<author>
<name>Herton Ronaldo Krzesinski</name>
<email>herton.krzesinski@canonical.com</email>
</author>
<published>2012-05-16T19:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=596fd46268634082314b3af1ded4612e1b7f3f03'/>
<id>urn:sha1:596fd46268634082314b3af1ded4612e1b7f3f03</id>
<content type='text'>
We don't need to open code the divide function, just use div_u64 that
already exists and do the same job. While this is a straightforward
clean up, there is more to that, the real motivation for this.

While building on a cross compiling environment in armel, using gcc
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), I was getting the following build
error:

ERROR: "__aeabi_uldivmod" [drivers/mtd/nand/nandsim.ko] undefined!

After investigating with objdump and hand built assembly version
generated with the compiler, I narrowed __aeabi_uldivmod as being
generated from the divide function. When nandsim.c is built with
-fno-inline-functions-called-once, that happens when
CONFIG_DEBUG_SECTION_MISMATCH is enabled, the do_div optimization in
arch/arm/include/asm/div64.h doesn't work as expected with the open
coded divide function: even if the do_div we are using doesn't have a
constant divisor, the compiler still includes the else parts of the
optimized do_div macro, and translates the divisions there to use
__aeabi_uldivmod, instead of only calling __do_div_asm -&gt; __do_div64 and
optimizing/removing everything else out.

So to reproduce, gcc 4.6 plus CONFIG_DEBUG_SECTION_MISMATCH=y and
CONFIG_MTD_NAND_NANDSIM=m should do it, building on armel.

After this change, the compiler does the intended thing even with
-fno-inline-functions-called-once, and optimizes out as expected the
constant handling in the optimized do_div on arm. As this also avoids a
build issue, I'm marking for Stable, as I think is applicable for this
case.

Signed-off-by: Herton Ronaldo Krzesinski &lt;herton.krzesinski@canonical.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: gpmi-nand: fix read page when reading to vmalloced area</title>
<updated>2012-07-06T14:06:23Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2012-06-26T15:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6023813a2d5949ba368e7df464f2ccb649719777'/>
<id>urn:sha1:6023813a2d5949ba368e7df464f2ccb649719777</id>
<content type='text'>
The gpmi-nand driver uses virt_addr_valid() to check whether a buffer
is suitable for dma. If it's not, a driver allocated buffer is used
instead. Then after a page read the driver allocated buffer must be
copied to the user supplied buffer. This does not happen since commit
7725cc85932bd02dd12c23108e0ef748c551ccba.

This patch fixes the issue. The bug is encountered with UBI which uses a
vmalloced buffer for the volume table.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Tested-by: snijsure@grid-net.com
Acked-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: mxc_nand: use 32bit copy functions</title>
<updated>2012-07-06T14:06:18Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2012-05-29T08:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=096bcc231fd263bc8df215f0d616b08e3696c6db'/>
<id>urn:sha1:096bcc231fd263bc8df215f0d616b08e3696c6db</id>
<content type='text'>
The following commit changes the function used to copy from/to
the hardware buffer to memcpy_[from|to]io. This does not work
since the hardware cannot handle the byte accesses used by these
functions. Instead of reverting this patch introduce 32bit
correspondents of these functions.

| commit 5775ba36ea9c760c2d7e697dac04f2f7fc95aa62
| Author: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
| Date:   Tue Apr 24 10:05:22 2012 +0200
|
|    mtd: mxc_nand: fix several sparse warnings about incorrect address space
|
|     Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
|     Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cafe_nand: fix an &amp; vs | mistake</title>
<updated>2012-07-06T13:27:13Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-06-09T16:08:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48f8b641297df49021093763a3271119a84990a2'/>
<id>urn:sha1:48f8b641297df49021093763a3271119a84990a2</id>
<content type='text'>
The intent here was clearly to set result to true if the 0x40000000 flag
was set.  But instead there was a | vs &amp; typo and we always set result
to true.

Artem: check the spec at
wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
and this fix looks correct.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs</title>
<updated>2012-06-28T18:41:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-28T18:41:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a7c6b73c40e916861eb852dc5855ffb3d58a3cd'/>
<id>urn:sha1:9a7c6b73c40e916861eb852dc5855ffb3d58a3cd</id>
<content type='text'>
Pull ubi/ubifs fixes from Artem Bityutskiy:
 "Fix the debugfs regression - we never enable it because incorrect
  'IS_ENABLED()' macro usage: should be 'IS_ENABLED(CONFIG_DEBUG_FS)',
  but we had 'IS_ENABLED(DEBUG_FS)'.  Also fix incorrect assertion."

* tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs:
  UBI: correct usage of IS_ENABLED()
  UBIFS: correct usage of IS_ENABLED()
  UBIFS: fix assertion
</content>
</entry>
<entry>
<title>UBI: correct usage of IS_ENABLED()</title>
<updated>2012-06-27T11:22:15Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-06-18T23:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=903e0e4ef9120c3d7693599acb95e76e8263fb35'/>
<id>urn:sha1:903e0e4ef9120c3d7693599acb95e76e8263fb35</id>
<content type='text'>
Commit "e9b4cf2 UBI: fix debugfs-less systems support" fixed one
regression but introduced a different regression - the debugfs is now always
compiled out. Root cause: IS_ENABLED() arguments should be used with the
CONFIG_* prefix.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>kmsg - kmsg_dump() use iterator to receive log buffer content</title>
<updated>2012-06-15T21:53:59Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay@vrfy.org</email>
</author>
<published>2012-06-15T12:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2ae715d66bf4becfb85eb84b7150e23cf27df30'/>
<id>urn:sha1:e2ae715d66bf4becfb85eb84b7150e23cf27df30</id>
<content type='text'>
Provide an iterator to receive the log buffer content, and convert all
kmsg_dump() users to it.

The structured data in the kmsg buffer now contains binary data, which
should no longer be copied verbatim to the kmsg_dump() users.

The iterator should provide reliable access to the buffer data, and also
supports proper log line-aware chunking of data while iterating.

Signed-off-by: Kay Sievers &lt;kay@vrfy.org&gt;
Tested-by: Tony Luck &lt;tony.luck@intel.com&gt;
Reported-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Tested-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: nand: initialize bitflip_threshold prior to BBT scanning</title>
<updated>2012-06-09T11:02:04Z</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik@jungo.com</email>
</author>
<published>2012-06-08T15:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea3b2ea24ef0f2ef9c6795b19cff456195b6728a'/>
<id>urn:sha1:ea3b2ea24ef0f2ef9c6795b19cff456195b6728a</id>
<content type='text'>
As of edbc454 [mtd: driver _read() returns max_bitflips; mtd_read()
returns -EUCLEAN], 'mtd-&gt;bitflip_threshold' must be set for mtd devices
having ECC, prior any 'mtd_read()' call.
Otherwise, 'mtd_read()' will falsely return -EUCLEAN.

Normally, 'mtd-&gt;bitflip_threshold' is initialized when the MTD is added.

However, this is too late for NAND MTDs, as 'scan_bbt()' is invoked
prior the existing initialization of 'mtd-&gt;bitflip_threshold'.

This is a problem since 'scan_bbt()' calls 'mtd_read()', in the case
of a flash-based bad block table.
It resulted in a falsely reported bitflips indication during BBT read,
which lead to constant scrubbing of the flash BBT blocks.

Initialize 'mtd-&gt;bitflip_threshold' to its default value (if not already
set by the driver), prior to invocation of 'scan_bbt()'.

Reported-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Tested-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
</feed>
