<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mmc/core/core.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-06-01T19:12:47Z</updated>
<entry>
<title>mmc: longer timeout for long read time quirk</title>
<updated>2016-06-01T19:12:47Z</updated>
<author>
<name>Matt Gumbel</name>
</author>
<published>2016-05-20T07:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33326c068a79dc48a0f8992b881d4a6bed5b7a28'/>
<id>urn:sha1:33326c068a79dc48a0f8992b881d4a6bed5b7a28</id>
<content type='text'>
commit 32ecd320db39bcb007679ed42f283740641b81ea upstream.

008GE0 Toshiba mmc in some Intel Baytrail tablets responds to
MMC_SEND_EXT_CSD in 450-600ms.

This patch will...

() Increase the long read time quirk timeout from 300ms to 600ms. Original
   author of that quirk says 300ms was only a guess and that the number
   may need to be raised in the future.

() Add this specific MMC to the quirk

Signed-off-by: Matt Gumbel &lt;matthew.k.gumbel@intel.com&gt;
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mmc: core: fix race condition in mmc_wait_data_done</title>
<updated>2015-10-01T09:36:15Z</updated>
<author>
<name>Jialing Fu</name>
</author>
<published>2015-08-28T03:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a30c50d2817332e8c5701134b6a869be1a9a1d70'/>
<id>urn:sha1:a30c50d2817332e8c5701134b6a869be1a9a1d70</id>
<content type='text'>
commit 71f8a4b81d040b3d094424197ca2f1bf811b1245 upstream.

The following panic is captured in ker3.14, but the issue still exists
in latest kernel.
---------------------------------------------------------------------
[   20.738217] c0 3136 (Compiler) Unable to handle kernel NULL pointer dereference
at virtual address 00000578
......
[   20.738499] c0 3136 (Compiler) PC is at _raw_spin_lock_irqsave+0x24/0x60
[   20.738527] c0 3136 (Compiler) LR is at _raw_spin_lock_irqsave+0x20/0x60
[   20.740134] c0 3136 (Compiler) Call trace:
[   20.740165] c0 3136 (Compiler) [&lt;ffffffc0008ee900&gt;] _raw_spin_lock_irqsave+0x24/0x60
[   20.740200] c0 3136 (Compiler) [&lt;ffffffc0000dd024&gt;] __wake_up+0x1c/0x54
[   20.740230] c0 3136 (Compiler) [&lt;ffffffc000639414&gt;] mmc_wait_data_done+0x28/0x34
[   20.740262] c0 3136 (Compiler) [&lt;ffffffc0006391a0&gt;] mmc_request_done+0xa4/0x220
[   20.740314] c0 3136 (Compiler) [&lt;ffffffc000656894&gt;] sdhci_tasklet_finish+0xac/0x264
[   20.740352] c0 3136 (Compiler) [&lt;ffffffc0000a2b58&gt;] tasklet_action+0xa0/0x158
[   20.740382] c0 3136 (Compiler) [&lt;ffffffc0000a2078&gt;] __do_softirq+0x10c/0x2e4
[   20.740411] c0 3136 (Compiler) [&lt;ffffffc0000a24bc&gt;] irq_exit+0x8c/0xc0
[   20.740439] c0 3136 (Compiler) [&lt;ffffffc00008489c&gt;] handle_IRQ+0x48/0xac
[   20.740469] c0 3136 (Compiler) [&lt;ffffffc000081428&gt;] gic_handle_irq+0x38/0x7c
----------------------------------------------------------------------
Because in SMP, "mrq" has race condition between below two paths:
path1: CPU0: &lt;tasklet context&gt;
  static void mmc_wait_data_done(struct mmc_request *mrq)
  {
     mrq-&gt;host-&gt;context_info.is_done_rcv = true;
     //
     // If CPU0 has just finished "is_done_rcv = true" in path1, and at
     // this moment, IRQ or ICache line missing happens in CPU0.
     // What happens in CPU1 (path2)?
     //
     // If the mmcqd thread in CPU1(path2) hasn't entered to sleep mode:
     // path2 would have chance to break from wait_event_interruptible
     // in mmc_wait_for_data_req_done and continue to run for next
     // mmc_request (mmc_blk_rw_rq_prep).
     //
     // Within mmc_blk_rq_prep, mrq is cleared to 0.
     // If below line still gets host from "mrq" as the result of
     // compiler, the panic happens as we traced.
     wake_up_interruptible(&amp;mrq-&gt;host-&gt;context_info.wait);
  }

path2: CPU1: &lt;The mmcqd thread runs mmc_queue_thread&gt;
  static int mmc_wait_for_data_req_done(...
  {
     ...
     while (1) {
           wait_event_interruptible(context_info-&gt;wait,
                   (context_info-&gt;is_done_rcv ||
                    context_info-&gt;is_new_req));
     	   static void mmc_blk_rw_rq_prep(...
           {
           ...
           memset(brq, 0, sizeof(struct mmc_blk_request));

This issue happens very coincidentally; however adding mdelay(1) in
mmc_wait_data_done as below could duplicate it easily.

   static void mmc_wait_data_done(struct mmc_request *mrq)
   {
     mrq-&gt;host-&gt;context_info.is_done_rcv = true;
+    mdelay(1);
     wake_up_interruptible(&amp;mrq-&gt;host-&gt;context_info.wait);
    }

At runtime, IRQ or ICache line missing may just happen at the same place
of the mdelay(1).

This patch gets the mmc_context_info at the beginning of function, it can
avoid this race condition.

Signed-off-by: Jialing Fu &lt;jlfu@marvell.com&gt;
Tested-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Fixes: 2220eedfd7ae ("mmc: fix async request mechanism ....")
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mmc: core: add missing pm event in mmc_pm_notify to fix hib restore</title>
<updated>2015-05-17T16:53:51Z</updated>
<author>
<name>Grygorii Strashko</name>
</author>
<published>2015-04-23T10:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec41a70d94bf7ac9a37a29928bb08b6694d070ec'/>
<id>urn:sha1:ec41a70d94bf7ac9a37a29928bb08b6694d070ec</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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mmc: Do not call get_cd for non removable cards</title>
<updated>2014-01-13T17:48:17Z</updated>
<author>
<name>Sascha Hauer</name>
</author>
<published>2013-12-05T13:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1b55bfcb3e5599eb5e67efed70698ade02add4e'/>
<id>urn:sha1:c1b55bfcb3e5599eb5e67efed70698ade02add4e</id>
<content type='text'>
Non removable cards are always present, so do not call get_cd for them.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Remove deprecated mmc_suspend|resume_host APIs</title>
<updated>2013-10-31T00:28:38Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-26T09:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c0d22e8180b98eea412b84aa0f0c42c16159679'/>
<id>urn:sha1:3c0d22e8180b98eea412b84aa0f0c42c16159679</id>
<content type='text'>
The are no more users of the deprecated mmc_suspend|resume_host API,
so let's remove it.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Signal wakeup event at card insert/removal</title>
<updated>2013-10-31T00:26:32Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-20T09:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbd43682eb12dab2ff4addfca04c32043dfde026'/>
<id>urn:sha1:bbd43682eb12dab2ff4addfca04c32043dfde026</id>
<content type='text'>
We want to give user space provision to fully consume a card
insert/remove event, when the event was caused by a wakeup irq.

By signaling the wakeup event for a time of 5 s for devices configured
as wakeup capable, we likely will be prevent a sleep long enough to let
user space consume the event.

To enable this feature, host drivers must thus configure their devices
as wakeup capable.

This is a reworked implementation of the old wakelocks for the mmc
subsystem, originally authored by Colin Cross and San Mehat for the
Android kernel. Zoran Markovic shall also be given cred for recently
re-trying to upstream this feature.

Cc: San Mehat &lt;san@google.com&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Zoran Markovic &lt;zoran.markovic@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Zoran Markovic &lt;zoran.markovic@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Collect common code for card ocr validation</title>
<updated>2013-10-31T00:26:31Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-16T10:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=726d6f2374410d980341bfeb49399614e689e702'/>
<id>urn:sha1:726d6f2374410d980341bfeb49399614e689e702</id>
<content type='text'>
Since mmc_select_voltage now only gets called from the attach sequence,
it makes sense to move the out of spec validations of the card ocr into
this function.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Prevent violation of specs while initializing cards</title>
<updated>2013-10-31T00:26:30Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-16T09:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce69d37b7d8fa692c45d71d94aa0c921859b82ce'/>
<id>urn:sha1:ce69d37b7d8fa692c45d71d94aa0c921859b82ce</id>
<content type='text'>
According to eMMC/SD/SDIO specs, the VDD (VCC) voltage level must be
maintained during the initialization sequence. If we want/need to tune
the voltage level, a complete power cycle of the card must be executed.

Most host drivers conforms to the specifications by only allowing to
change VDD voltage level at the MMC_POWER_UP state, but some also cares
about MMC_POWER_ON state, which they should'nt. This patch will not
break those drivers, but they could clean up code to better reflect
what is expected from the protocol layer.

A big re-work of the mmc_select_voltage function is done to only change
VDD voltage level if the host supports MMC_CAP2_FULL_PWR_CYCLE.
Otherwise only validation of the host and card ocr mask will be done.

A very nice side-effect of this patch is that we now don't need to
reset the negotiated ocr mask at the mmc_power_off function, since now
it will actually reflect the present voltage level, which safely can be
used at the next power up and re-initialization. Moreover, we then only
need to execute mmc_select_voltage from the attach sequence.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Move cached value of the negotiated ocr mask to card struct</title>
<updated>2013-10-31T00:26:29Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-13T09:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6904115095ad60ced638eb1e36e0e4e5e7de00b0'/>
<id>urn:sha1:6904115095ad60ced638eb1e36e0e4e5e7de00b0</id>
<content type='text'>
The negotiated ocr mask is directly related to the card. Once a card
gets removed, the mask shall be dropped. By moving the cache of the ocr
mask from the host struct to the card struct we have accomplished this.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Let mmc_set_signal_voltage take ocr as parameter</title>
<updated>2013-10-31T00:26:26Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2013-09-12T13:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f791fdad82a02af013e4fc8c385dc690080c366'/>
<id>urn:sha1:0f791fdad82a02af013e4fc8c385dc690080c366</id>
<content type='text'>
This is yet another step of restructure code to be able to fixup the
setup of the negotiated ocr mask.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
</feed>
