<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/mmc/card, branch dev</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-07-24T08:18:34+00:00</updated>
<entry>
<title>mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()</title>
<updated>2015-07-24T08:18:34+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.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9098f84cced870f54d8c410dd2444cfa61467fa0'/>
<id>urn:sha1:9098f84cced870f54d8c410dd2444cfa61467fa0</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>mmc: queue: prevent soft lockups on PREEMPT=n</title>
<updated>2015-06-18T07:21:04+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin.vincent@axis.com</email>
</author>
<published>2015-06-14T17:26:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a8c27c0bea45c6531fbc1e3be79ddd5a9bc1ba3e'/>
<id>urn:sha1:a8c27c0bea45c6531fbc1e3be79ddd5a9bc1ba3e</id>
<content type='text'>
On systems with CONFIG_PREEMPT=n, under certain circumstances, mmcqd
can continuously process requests for several seconds without blocking,
triggering the soft lockup watchdog.  For example, this can happen if
mmcqd runs on the CPU which services the controller's interrupt, and
a process on a different CPU continuously writes to the MMC block
device.

 NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [mmcqd/0:664]
 CPU: 0 PID: 664 Comm: mmcqd/0 Not tainted 4.1.0-rc7+ #4
 PC is at _raw_spin_unlock_irqrestore+0x24/0x28
 LR is at mmc_start_request+0x104/0x134
 ...
 [&lt;805112a8&gt;] (_raw_spin_unlock_irqrestore) from [&lt;803db664&gt;] (mmc_start_request+0x104/0x134)
 [&lt;803db664&gt;] (mmc_start_request) from [&lt;803dc008&gt;] (mmc_start_req+0x274/0x394)
 [&lt;803dc008&gt;] (mmc_start_req) from [&lt;803eb2c4&gt;] (mmc_blk_issue_rw_rq+0xd0/0xb98)
 [&lt;803eb2c4&gt;] (mmc_blk_issue_rw_rq) from [&lt;803ebe8c&gt;] (mmc_blk_issue_rq+0x100/0x470)
 [&lt;803ebe8c&gt;] (mmc_blk_issue_rq) from [&lt;803ecab8&gt;] (mmc_queue_thread+0xd0/0x170)
 [&lt;803ecab8&gt;] (mmc_queue_thread) from [&lt;8003fd14&gt;] (kthread+0xe0/0xfc)
 [&lt;8003fd14&gt;] (kthread) from [&lt;8000f768&gt;] (ret_from_fork+0x14/0x2c)

Fix it by adding a cond_resched() in the request handling loop so that
other processes get a chance to run.

Signed-off-by: Rabin Vincent &lt;rabin.vincent@axis.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: card: Fixup request missing in mmc_blk_issue_rw_rq</title>
<updated>2015-06-16T06:58:36+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.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=29535f7b797df35cc9b6b3bca635591cdd3dd2a8'/>
<id>urn:sha1:29535f7b797df35cc9b6b3bca635591cdd3dd2a8</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>mmc: queue: use swap() in mmc_queue_thread()</title>
<updated>2015-06-15T08:26:29+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-06-10T16:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7551847ca079c362663385be20e6731ad32f1a3e'/>
<id>urn:sha1:7551847ca079c362663385be20e6731ad32f1a3e</id>
<content type='text'>
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: mmc-test: use swap() in mmc_test_nonblock_transfer()</title>
<updated>2015-06-01T07:07:08+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-05-18T17:52:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=75fda77b258f9aa90ce27fd7c8be2ecbdb7fc5d4'/>
<id>urn:sha1:75fda77b258f9aa90ce27fd7c8be2ecbdb7fc5d4</id>
<content type='text'>
Use kernel.h macro definition.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: cast unsigned int to typeof(sector_t) to avoid unexpected error</title>
<updated>2015-06-01T07:07:03+00:00</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2015-05-11T07:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=087de9ed3d076d071f09b09ef77d6107c1e1df82'/>
<id>urn:sha1:087de9ed3d076d071f09b09ef77d6107c1e1df82</id>
<content type='text'>
card-&gt;csd.capacity is defined as "unsigned int", and sector_t is defined as
"u64" or "unsigned long" (depends on CONFIG_LBDAF). Thus, sector_t data
might have strange data (see below). This patch cast it to typeof(sector_t)
Special thanks to coverity &lt;http://www.coverity.com&gt;

ex) if sector_t was u64

        unsigned int data;
        sector_t sector;

        data = 0x800000;
        sector = (data &lt;&lt; 8); // 0xffffffff80000000
        sector = (((typeof(sector_t))data) &lt;&lt; 8); // 0x80000000

or

        data = 0x80000000;
        sector = (data &lt;&lt; 8); // 0x0
        sector = (((typeof(sector_t))data) &lt;&lt; 8); // 0x8000000000

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: card: mmc_test: Simplify a trivial if-return sequence</title>
<updated>2015-06-01T07:07:01+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-05-09T21:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=30a9b9e1efe63e883063afc0f44a6f204b90c334'/>
<id>urn:sha1:30a9b9e1efe63e883063afc0f44a6f204b90c334</id>
<content type='text'>
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Retry errored data requests when re-tuning is needed</title>
<updated>2015-06-01T07:06:59+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2015-05-07T10:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b8360a4945c49c07568892b5958c08e01bf7d6d2'/>
<id>urn:sha1:b8360a4945c49c07568892b5958c08e01bf7d6d2</id>
<content type='text'>
Retry errored data requests when re-tuning is needed and
add a flag to struct mmc_blk_request so that the retry
is only done once.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Check re-tuning in the recovery path</title>
<updated>2015-06-01T07:06:58+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2015-05-07T10:10:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6f398ad2075d9af4158d37442e9ca22e528f06c1'/>
<id>urn:sha1:6f398ad2075d9af4158d37442e9ca22e528f06c1</id>
<content type='text'>
If re-tuning is needed, do it in the recovery path to
give recovery commands a better chance of success.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: card: Don't access RPMB partitions for normal read/write</title>
<updated>2015-05-06T12:55:12+00:00</updated>
<author>
<name>Chuanxiao Dong</name>
<email>chuanxiao.dong@intel.com</email>
</author>
<published>2014-08-12T04:01:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4e93b9a6abc0d028daf3c8a00cb77b679d8a4df4'/>
<id>urn:sha1:4e93b9a6abc0d028daf3c8a00cb77b679d8a4df4</id>
<content type='text'>
During kernel boot, it will try to read some logical sectors
of each block device node for the possible partition table.

But since RPMB partition is special and can not be accessed
by normal eMMC read / write CMDs, it will cause below error
messages during kernel boot:
...
 mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
 mmcblk0rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
 mmcblk0rpmb: retrying using single block read
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
 end_request: I/O error, dev mmcblk0rpmb, sector 0
 Buffer I/O error on device mmcblk0rpmb, logical block 0
 end_request: I/O error, dev mmcblk0rpmb, sector 8
 Buffer I/O error on device mmcblk0rpmb, logical block 1
 end_request: I/O error, dev mmcblk0rpmb, sector 16
 Buffer I/O error on device mmcblk0rpmb, logical block 2
 end_request: I/O error, dev mmcblk0rpmb, sector 24
 Buffer I/O error on device mmcblk0rpmb, logical block 3
...

This patch will discard the access request in eMMC queue if
it is RPMB partition access request. By this way, it avoids
trigger above error messages.

Fixes: 090d25fe224c ("mmc: core: Expose access to RPMB partition")
Signed-off-by: Yunpeng Gao &lt;yunpeng.gao@intel.com&gt;
Signed-off-by: Chuanxiao Dong &lt;chuanxiao.dong@intel.com&gt;
Tested-by: Michael Shigorin &lt;mike@altlinux.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
