<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/mmc, branch linux-3.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()</title>
<updated>2016-03-21T01:17:48+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-16T13:50:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f48b7031214db56ba92de547a77ee7c0b1b72f36'/>
<id>f48b7031214db56ba92de547a77ee7c0b1b72f36</id>
<content type='text'>
commit 9098f84cced870f54d8c410dd2444cfa61467fa0 upstream.

Enclosing mmc_blk_put() is missing in power_ro_lock_show() sysfs handler,
let's add it.

Fixes: add710eaa886 ("mmc: boot partition ro lock support")
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9098f84cced870f54d8c410dd2444cfa61467fa0 upstream.

Enclosing mmc_blk_put() is missing in power_ro_lock_show() sysfs handler,
let's add it.

Fixes: add710eaa886 ("mmc: boot partition ro lock support")
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: card: Fixup request missing in mmc_blk_issue_rw_rq</title>
<updated>2015-10-22T01:20:05+00:00</updated>
<author>
<name>Ding Wang</name>
<email>justin.wang@spreadtrum.com</email>
</author>
<published>2015-05-18T12:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c4b0cf56edc955b00510b36c890ca3fd78df7d67'/>
<id>c4b0cf56edc955b00510b36c890ca3fd78df7d67</id>
<content type='text'>
commit 29535f7b797df35cc9b6b3bca635591cdd3dd2a8 upstream.

The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq function
may cause new coming request permanent missing when the ongoing
request (previoulsy started) complete end.

The problem scenario is as follows:
(1) Request A is ongoing;
(2) Request B arrived, and finally mmc_blk_issue_rw_rq() is called;
(3) Request A encounters the MMC_BLK_CMD_ERR error;
(4) In the error handling of MMC_BLK_CMD_ERR, suppose mmc_blk_cmd_err()
    end request A completed and return zero. Continue the error handling,
    suppose mmc_blk_reset() reset device success;
(5) Continue the execution, while loop completed because variable ret
    is zero now;
(6) Finally, mmc_blk_issue_rw_rq() return without processing request B.

The process related to the missing request may wait that IO request
complete forever, possibly crashing the application or hanging the system.

Fix this issue by starting new request when reset success.

Signed-off-by: Ding Wang &lt;justin.wang@spreadtrum.com&gt;
Fixes: 67716327eec7 ("mmc: block: add eMMC hardware reset support")
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 29535f7b797df35cc9b6b3bca635591cdd3dd2a8 upstream.

The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq function
may cause new coming request permanent missing when the ongoing
request (previoulsy started) complete end.

The problem scenario is as follows:
(1) Request A is ongoing;
(2) Request B arrived, and finally mmc_blk_issue_rw_rq() is called;
(3) Request A encounters the MMC_BLK_CMD_ERR error;
(4) In the error handling of MMC_BLK_CMD_ERR, suppose mmc_blk_cmd_err()
    end request A completed and return zero. Continue the error handling,
    suppose mmc_blk_reset() reset device success;
(5) Continue the execution, while loop completed because variable ret
    is zero now;
(6) Finally, mmc_blk_issue_rw_rq() return without processing request B.

The process related to the missing request may wait that IO request
complete forever, possibly crashing the application or hanging the system.

Fix this issue by starting new request when reset success.

Signed-off-by: Ding Wang &lt;justin.wang@spreadtrum.com&gt;
Fixes: 67716327eec7 ("mmc: block: add eMMC hardware reset support")
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: atmel-mci: fix bad variable type for clkdiv</title>
<updated>2015-09-18T01:20:41+00:00</updated>
<author>
<name>Ludovic Desroches</name>
<email>ludovic.desroches@atmel.com</email>
</author>
<published>2015-05-06T13:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc81c42b3fe5cac84f025715260d9bff305e9968'/>
<id>cc81c42b3fe5cac84f025715260d9bff305e9968</id>
<content type='text'>
commit 60c8f783a18feb95ad967c87e9660caf09fb4700 upstream.

clkdiv is declared as an u32 but it can be set to a negative value
causing a huge divisor value. Change its type to int to avoid this case.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 60c8f783a18feb95ad967c87e9660caf09fb4700 upstream.

clkdiv is declared as an u32 but it can be set to a negative value
causing a huge divisor value. Change its type to int to avoid this case.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: core: add missing pm event in mmc_pm_notify to fix hib restore</title>
<updated>2015-09-18T01:20:35+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>Grygorii.Strashko@linaro.org</email>
</author>
<published>2015-04-23T10:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=df48a548aef381a3fe0cffcdcd3f6566a94df8ce'/>
<id>df48a548aef381a3fe0cffcdcd3f6566a94df8ce</id>
<content type='text'>
commit 184af16b09360d6273fd6160e6ff7f8e2482ef23 upstream.

The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(),
as result mmc_rescan() could be scheduled and executed at
late hibernation restore stages when MMC device is suspended
already - which, in turn, will lead to system crash on TI dra7-evm board:

WARNING: CPU: 0 PID: 3188 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x258/0x374()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in User mode during Functional access

Hence, add missed PM_RESTORE_PREPARE PM event in mmc_pm_notify().

Fixes: 4c2ef25fe0b8 (mmc: fix all hangs related to mmc/sd card...)
Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 184af16b09360d6273fd6160e6ff7f8e2482ef23 upstream.

The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(),
as result mmc_rescan() could be scheduled and executed at
late hibernation restore stages when MMC device is suspended
already - which, in turn, will lead to system crash on TI dra7-evm board:

WARNING: CPU: 0 PID: 3188 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x258/0x374()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in User mode during Functional access

Hence, add missed PM_RESTORE_PREPARE PM event in mmc_pm_notify().

Fixes: 4c2ef25fe0b8 (mmc: fix all hangs related to mmc/sd card...)
Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li &lt;lizefan@huawei.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: mxs-mmc: fix deadlock caused by recursion loop</title>
<updated>2014-04-14T13:44:32+00:00</updated>
<author>
<name>Lauri Hintsala</name>
<email>lauri.hintsala@bluegiga.com</email>
</author>
<published>2012-07-17T14:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=82d16b39266179ca80f6b81b4084631ade240219'/>
<id>82d16b39266179ca80f6b81b4084631ade240219</id>
<content type='text'>
commit fc108d24d3a6da63576a460e122fa1df0cbdea20 upstream.

Release the lock before mmc_signal_sdio_irq is called by
mxs_mmc_enable_sdio_irq.

Backtrace:
[   65.470000] =============================================
[   65.470000] [ INFO: possible recursive locking detected ]
[   65.470000] 3.5.0-rc5 #2 Not tainted
[   65.470000] ---------------------------------------------
[   65.470000] ksdioirqd/mmc0/73 is trying to acquire lock:
[   65.470000]  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] but task is already holding lock:
[   65.470000]  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] other info that might help us debug this:
[   65.470000]  Possible unsafe locking scenario:
[   65.470000]
[   65.470000]        CPU0
[   65.470000]        ----
[   65.470000]   lock(&amp;(&amp;host-&gt;lock)-&gt;rlock#2);
[   65.470000]   lock(&amp;(&amp;host-&gt;lock)-&gt;rlock#2);
[   65.470000]
[   65.470000]  *** DEADLOCK ***
[   65.470000]
[   65.470000]  May be due to missing lock nesting notation
[   65.470000]
[   65.470000] 1 lock held by ksdioirqd/mmc0/73:
[   65.470000]  #0:  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] stack backtrace:
[   65.470000] [&lt;c0014990&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c005ccb8&gt;] (__lock_acquire+0x14f8/0x1b98)
[   65.470000] [&lt;c005ccb8&gt;] (__lock_acquire+0x14f8/0x1b98) from [&lt;c005d3f8&gt;] (lock_acquire+0xa0/0x108)
[   65.470000] [&lt;c005d3f8&gt;] (lock_acquire+0xa0/0x108) from [&lt;c02f671c&gt;] (_raw_spin_lock_irqsave+0x48/0x5c)
[   65.470000] [&lt;c02f671c&gt;] (_raw_spin_lock_irqsave+0x48/0x5c) from [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc])
[   65.470000] [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]) from [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc])
[   65.470000] [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc]) from [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274)
[   65.470000] [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274) from [&lt;c003c324&gt;] (kthread+0x8c/0x98)
[   65.470000] [&lt;c003c324&gt;] (kthread+0x8c/0x98) from [&lt;c00101ac&gt;] (kernel_thread_exit+0x0/0x8)
[   65.470000] BUG: spinlock lockup suspected on CPU#0, ksdioirqd/mmc0/73
[   65.470000]  lock: 0xc3358724, .magic: dead4ead, .owner: ksdioirqd/mmc0/73, .owner_cpu: 0
[   65.470000] [&lt;c0014990&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c01b46b0&gt;] (do_raw_spin_lock+0x100/0x144)
[   65.470000] [&lt;c01b46b0&gt;] (do_raw_spin_lock+0x100/0x144) from [&lt;c02f6724&gt;] (_raw_spin_lock_irqsave+0x50/0x5c)
[   65.470000] [&lt;c02f6724&gt;] (_raw_spin_lock_irqsave+0x50/0x5c) from [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc])
[   65.470000] [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]) from [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc])
[   65.470000] [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc]) from [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274)
[   65.470000] [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274) from [&lt;c003c324&gt;] (kthread+0x8c/0x98)
[   65.470000] [&lt;c003c324&gt;] (kthread+0x8c/0x98) from [&lt;c00101ac&gt;] (kernel_thread_exit+0x0/0x8)

Reported-by: Attila Kinali &lt;attila@kinali.ch&gt;
Signed-off-by: Lauri Hintsala &lt;lauri.hintsala@bluegiga.com&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - HW_SSP_STATUS is a simple rather than function-like macro]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Qiang Huang &lt;h.huangqiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fc108d24d3a6da63576a460e122fa1df0cbdea20 upstream.

Release the lock before mmc_signal_sdio_irq is called by
mxs_mmc_enable_sdio_irq.

Backtrace:
[   65.470000] =============================================
[   65.470000] [ INFO: possible recursive locking detected ]
[   65.470000] 3.5.0-rc5 #2 Not tainted
[   65.470000] ---------------------------------------------
[   65.470000] ksdioirqd/mmc0/73 is trying to acquire lock:
[   65.470000]  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] but task is already holding lock:
[   65.470000]  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] other info that might help us debug this:
[   65.470000]  Possible unsafe locking scenario:
[   65.470000]
[   65.470000]        CPU0
[   65.470000]        ----
[   65.470000]   lock(&amp;(&amp;host-&gt;lock)-&gt;rlock#2);
[   65.470000]   lock(&amp;(&amp;host-&gt;lock)-&gt;rlock#2);
[   65.470000]
[   65.470000]  *** DEADLOCK ***
[   65.470000]
[   65.470000]  May be due to missing lock nesting notation
[   65.470000]
[   65.470000] 1 lock held by ksdioirqd/mmc0/73:
[   65.470000]  #0:  (&amp;(&amp;host-&gt;lock)-&gt;rlock#2){-.-...}, at: [&lt;bf054120&gt;] mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]
[   65.470000]
[   65.470000] stack backtrace:
[   65.470000] [&lt;c0014990&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c005ccb8&gt;] (__lock_acquire+0x14f8/0x1b98)
[   65.470000] [&lt;c005ccb8&gt;] (__lock_acquire+0x14f8/0x1b98) from [&lt;c005d3f8&gt;] (lock_acquire+0xa0/0x108)
[   65.470000] [&lt;c005d3f8&gt;] (lock_acquire+0xa0/0x108) from [&lt;c02f671c&gt;] (_raw_spin_lock_irqsave+0x48/0x5c)
[   65.470000] [&lt;c02f671c&gt;] (_raw_spin_lock_irqsave+0x48/0x5c) from [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc])
[   65.470000] [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]) from [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc])
[   65.470000] [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc]) from [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274)
[   65.470000] [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274) from [&lt;c003c324&gt;] (kthread+0x8c/0x98)
[   65.470000] [&lt;c003c324&gt;] (kthread+0x8c/0x98) from [&lt;c00101ac&gt;] (kernel_thread_exit+0x0/0x8)
[   65.470000] BUG: spinlock lockup suspected on CPU#0, ksdioirqd/mmc0/73
[   65.470000]  lock: 0xc3358724, .magic: dead4ead, .owner: ksdioirqd/mmc0/73, .owner_cpu: 0
[   65.470000] [&lt;c0014990&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c01b46b0&gt;] (do_raw_spin_lock+0x100/0x144)
[   65.470000] [&lt;c01b46b0&gt;] (do_raw_spin_lock+0x100/0x144) from [&lt;c02f6724&gt;] (_raw_spin_lock_irqsave+0x50/0x5c)
[   65.470000] [&lt;c02f6724&gt;] (_raw_spin_lock_irqsave+0x50/0x5c) from [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc])
[   65.470000] [&lt;bf054120&gt;] (mxs_mmc_enable_sdio_irq+0x18/0xdc [mxs_mmc]) from [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc])
[   65.470000] [&lt;bf0541d0&gt;] (mxs_mmc_enable_sdio_irq+0xc8/0xdc [mxs_mmc]) from [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274)
[   65.470000] [&lt;c0219b38&gt;] (sdio_irq_thread+0x1bc/0x274) from [&lt;c003c324&gt;] (kthread+0x8c/0x98)
[   65.470000] [&lt;c003c324&gt;] (kthread+0x8c/0x98) from [&lt;c00101ac&gt;] (kernel_thread_exit+0x0/0x8)

Reported-by: Attila Kinali &lt;attila@kinali.ch&gt;
Signed-off-by: Lauri Hintsala &lt;lauri.hintsala@bluegiga.com&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - HW_SSP_STATUS is a simple rather than function-like macro]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Qiang Huang &lt;h.huangqiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA</title>
<updated>2014-02-13T19:51:08+00:00</updated>
<author>
<name>Ludovic Desroches</name>
<email>ludovic.desroches@atmel.com</email>
</author>
<published>2013-11-20T15:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6fadde4ee7c143a0f059ecddfa14958a876bd934'/>
<id>6fadde4ee7c143a0f059ecddfa14958a876bd934</id>
<content type='text'>
commit 66b512eda74d59b17eac04c4da1b38d82059e6c9 upstream.

With some SDIO devices, timeout errors can happen when reading data.
To solve this issue, the DMA transfer has to be activated before sending
the command to the device. This order is incorrect in PDC mode. So we
have to take care if we are using DMA or PDC to know when to send the
MMC command.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 66b512eda74d59b17eac04c4da1b38d82059e6c9 upstream.

With some SDIO devices, timeout errors can happen when reading data.
To solve this issue, the DMA transfer has to be activated before sending
the command to the device. This order is incorrect in PDC mode. So we
have to take care if we are using DMA or PDC to know when to send the
MMC command.

Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: block: fix a bug of error handling in MMC driver</title>
<updated>2013-12-08T15:29:42+00:00</updated>
<author>
<name>KOBAYASHI Yoshitake</name>
<email>yoshitake.kobayashi@toshiba.co.jp</email>
</author>
<published>2013-07-06T22:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=98048d9b597625034b47f7e0bd04595b6002a045'/>
<id>98048d9b597625034b47f7e0bd04595b6002a045</id>
<content type='text'>
commit c8760069627ad3b0dbbea170f0c4c58b16e18d3d upstream.

Current MMC driver doesn't handle generic error (bit19 of device
status) in write sequence. As a result, write data gets lost when
generic error occurs. For example, a generic error when updating a
filesystem management information causes a loss of write data and
corrupts the filesystem. In the worst case, the system will never
boot.

This patch includes the following functionality:
  1. To enable error checking for the response of CMD12 and CMD13
     in write command sequence
  2. To retry write sequence when a generic error occurs

Messages are added for v2 to show what occurs.

Signed-off-by: KOBAYASHI Yoshitake &lt;yoshitake.kobayashi@toshiba.co.jp&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c8760069627ad3b0dbbea170f0c4c58b16e18d3d upstream.

Current MMC driver doesn't handle generic error (bit19 of device
status) in write sequence. As a result, write data gets lost when
generic error occurs. For example, a generic error when updating a
filesystem management information causes a loss of write data and
corrupts the filesystem. In the worst case, the system will never
boot.

This patch includes the following functionality:
  1. To enable error checking for the response of CMD12 and CMD13
     in write command sequence
  2. To retry write sequence when a generic error occurs

Messages are added for v2 to show what occurs.

Signed-off-by: KOBAYASHI Yoshitake &lt;yoshitake.kobayashi@toshiba.co.jp&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: tmio_mmc_dma: fix PIO fallback on SDHI</title>
<updated>2013-09-27T00:15:51+00:00</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2013-08-25T03:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ae48ae828eab7046716a8fcb143dab520f803027'/>
<id>ae48ae828eab7046716a8fcb143dab520f803027</id>
<content type='text'>
commit f936f9b67b7f8c2eae01dd303a0e90bd777c4679 upstream.

I'm testing SH-Mobile SDHI driver in DMA mode with  a new DMA controller  using
'bonnie++' and getting DMA error after which the tmio_mmc_dma.c code falls back
to PIO but all commands time out after that.  It turned out that the fallback
code calls tmio_mmc_enable_dma() with RX/TX channels already freed and pointers
to them cleared, so that the function bails out early instead  of clearing the
DMA bit in the CTL_DMA_ENABLE register. The regression was introduced by commit
162f43e31c5a376ec16336e5d0ac973373d54c89 (mmc: tmio: fix a deadlock).
Moving tmio_mmc_enable_dma() calls to the top of the PIO fallback code in
tmio_mmc_start_dma_{rx|tx}() helps.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f936f9b67b7f8c2eae01dd303a0e90bd777c4679 upstream.

I'm testing SH-Mobile SDHI driver in DMA mode with  a new DMA controller  using
'bonnie++' and getting DMA error after which the tmio_mmc_dma.c code falls back
to PIO but all commands time out after that.  It turned out that the fallback
code calls tmio_mmc_enable_dma() with RX/TX channels already freed and pointers
to them cleared, so that the function bails out early instead  of clearing the
DMA bit in the CTL_DMA_ENABLE register. The regression was introduced by commit
162f43e31c5a376ec16336e5d0ac973373d54c89 (mmc: tmio: fix a deadlock).
Moving tmio_mmc_enable_dma() calls to the top of the PIO fallback code in
tmio_mmc_start_dma_{rx|tx}() helps.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: atmel-mci: pio hang on block errors</title>
<updated>2013-05-08T02:51:57+00:00</updated>
<author>
<name>Terry Barnaby</name>
<email>terry@beam.ltd.uk</email>
</author>
<published>2013-04-08T16:05:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=37f8417572877c7c8c58400d2779248f1f7d74ed'/>
<id>37f8417572877c7c8c58400d2779248f1f7d74ed</id>
<content type='text'>
commit bdbc5d0c60f3e9de3eeccf1c1a18bdc11dca62cc upstream.

The driver is doing, by default, multi-block reads. When a block error
occurs, card/block.c instigates a single block read: "mmcblk0: retrying
using single block read".  It leaves the sg chain intact and just changes
the length attribute for the first sg entry and the overall sg_len
parameter.  When atmci_read_data_pio is called to read the single block
of data it ignores the sg_len and expects to read more than 512 bytes as
it sees there are multiple items in the sg list. No more data comes as
the controller has only been commanded to get one block.

Signed-off-by: Terry Barnaby &lt;terry@beam.ltd.uk&gt;
Acked-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bdbc5d0c60f3e9de3eeccf1c1a18bdc11dca62cc upstream.

The driver is doing, by default, multi-block reads. When a block error
occurs, card/block.c instigates a single block read: "mmcblk0: retrying
using single block read".  It leaves the sg chain intact and just changes
the length attribute for the first sg entry and the overall sg_len
parameter.  When atmci_read_data_pio is called to read the single block
of data it ignores the sg_len and expects to read more than 512 bytes as
it sees there are multiple items in the sg list. No more data comes as
the controller has only been commanded to get one block.

Signed-off-by: Terry Barnaby &lt;terry@beam.ltd.uk&gt;
Acked-by: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: core: Fix bit width test failing on old eMMC cards</title>
<updated>2013-05-08T02:51:57+00:00</updated>
<author>
<name>Philip Rakity</name>
<email>prakity@yahoo.com</email>
</author>
<published>2013-04-04T19:18:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=217fd3afce27de54b0b10fc33ce6268c999dbdb4'/>
<id>217fd3afce27de54b0b10fc33ce6268c999dbdb4</id>
<content type='text'>
commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3 upstream.

PARTITION_SUPPORT needs to be set before doing the compare on version
number so the bit width test does not get invalid data.  Before this
patch, a Sandisk iNAND eMMC card would detect 1-bit width although
the hardware supports 4-bit.

Only affects old emmc devices - pre 4.4 devices.

Reported-by: Elad Yi &lt;elad.yi@gmail.com&gt;
Signed-off-by: Philip Rakity &lt;prakity@yahoo.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3 upstream.

PARTITION_SUPPORT needs to be set before doing the compare on version
number so the bit width test does not get invalid data.  Before this
patch, a Sandisk iNAND eMMC card would detect 1-bit width although
the hardware supports 4-bit.

Only affects old emmc devices - pre 4.4 devices.

Reported-by: Elad Yi &lt;elad.yi@gmail.com&gt;
Signed-off-by: Philip Rakity &lt;prakity@yahoo.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
