<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mmc, branch v3.4.105</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.4.105</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.4.105'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2014-04-14T13:44:32+00:00</updated>
<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.radix-linux.su/kernel/linux.git/commit/?id=82d16b39266179ca80f6b81b4084631ade240219'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=6fadde4ee7c143a0f059ecddfa14958a876bd934'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=98048d9b597625034b47f7e0bd04595b6002a045'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=ae48ae828eab7046716a8fcb143dab520f803027'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=37f8417572877c7c8c58400d2779248f1f7d74ed'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=217fd3afce27de54b0b10fc33ce6268c999dbdb4'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>mmc: at91/avr32/atmel-mci: fix DMA-channel leak on module unload</title>
<updated>2013-05-08T02:51:57+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2013-03-13T16:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb878b3019cb0b1d574bd88e30ce00ea6d6814f9'/>
<id>urn:sha1:bb878b3019cb0b1d574bd88e30ce00ea6d6814f9</id>
<content type='text'>
commit 91cf54feecf815bec0b6a8d6d9dbd0e219f2f2cc upstream.

Fix regression introduced by commit 796211b7953 ("mmc: atmel-mci: add
pdc support and runtime capabilities detection") which removed the need
for CONFIG_MMC_ATMELMCI_DMA but kept the Kconfig-entry as well as the
compile guards around dma_release_channel() in remove(). Consequently,
DMA is always enabled (if supported), but the DMA-channel is not
released on module unload unless the DMA-config option is selected.

Remove the no longer used CONFIG_MMC_ATMELMCI_DMA option completely.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&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>
</entry>
<entry>
<title>mmc: sdhci-esdhc-imx: fix host version read</title>
<updated>2013-02-28T14:59:05+00:00</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2013-01-15T15:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a924a76039689fd260ee311b85fb2202bcd4910'/>
<id>urn:sha1:6a924a76039689fd260ee311b85fb2202bcd4910</id>
<content type='text'>
commit ef4d0888bb7e1b963880f086575081c3d39cad2d upstream.

When commit 95a2482 (mmc: sdhci-esdhc-imx: add basic imx6q usdhc
support) works around host version issue on imx6q, it gets the
register address fixup "reg ^= 2" lost for imx25/35/51/53 esdhc.
Thus, the controller version on these SoCs is wrongly identified
as v1 while it's actually v2.

Add the address fixup back and take a different approach to correct
imx6q host version, so that the host version read gets back to work
for all SoCs.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mmc: sh-mmcif: avoid oops on spurious interrupts (second try)</title>
<updated>2012-12-17T18:37:43+00:00</updated>
<author>
<name>Guennadi Liakhovetski</name>
<email>g.liakhovetski@gmx.de</email>
</author>
<published>2012-08-22T06:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=47dc7057a276a3394c94803dd66b395664ebc8f0'/>
<id>urn:sha1:47dc7057a276a3394c94803dd66b395664ebc8f0</id>
<content type='text'>
commit 91ab252ac5a5c3461dd6910797611e9172626aed upstream.

On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious
interrupts without any active request. To prevent the Oops, that results
in such cases, don't dereference the mmc request pointer until we make
sure, that we are indeed processing such a request.

Reported-by: Tetsuyuki Kobayashi &lt;koba@kmckk.co.jp&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Tested-by: Tetsuyuki Kobayashi &lt;koba@kmckk.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>
</entry>
<entry>
<title>Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"</title>
<updated>2012-12-17T18:37:43+00:00</updated>
<author>
<name>Chris Ball</name>
<email>cjb@laptop.org</email>
</author>
<published>2012-12-03T14:17:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e07aa3cc22bef722b29b247287d8e47d4c6c2b22'/>
<id>urn:sha1:e07aa3cc22bef722b29b247287d8e47d4c6c2b22</id>
<content type='text'>
commit 6984f3c31bb57cb7491dbec1be44b74bd00f4648 upstream.

This reverts commit 8464dd52d3198dd05, which was a misapplied debugging
version of the patch, not the final patch itself.

Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
