<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mmc/core/mmc.c, branch v5.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-10-12T08:21:18+00:00</updated>
<entry>
<title>mmc: core: Add host specific tuning support for eMMC HS400 mode</title>
<updated>2021-10-12T08:21:18+00:00</updated>
<author>
<name>Wenbin Mei</name>
<email>wenbin.mei@mediatek.com</email>
</author>
<published>2021-09-17T12:48:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f614fb60a1983819e83796198de2b607fba75e99'/>
<id>urn:sha1:f614fb60a1983819e83796198de2b607fba75e99</id>
<content type='text'>
This adds a -&gt;execute_hs400_tuning() host callback to enable optional
support for host specific tuning for eMMC HS400 mode. Additionally, share
mmc_get_ext_csd() through the public host headerfile, to allow it to be
used by the host drivers, which is needed to support the HS400 tuning.

Signed-off-by: Wenbin Mei &lt;wenbin.mei@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210917124803.22871-3-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Support alternative_gpt_sector() operation</title>
<updated>2021-08-24T16:09:06+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2021-08-20T00:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc913385dd74e625271482c30aefedd1e5af7b8c'/>
<id>urn:sha1:dc913385dd74e625271482c30aefedd1e5af7b8c</id>
<content type='text'>
Support generic alternative_gpt_sector() block device operation.
It calculates location of GPT entry for eMMC of NVIDIA Tegra Android
devices. Add new MMC_CAP2_ALT_GPT_TEGRA flag that enables scanning of
alternative GPT sector and add raw_boot_mult field to mmc_ext_csd
which allows to get size of the boot partitions that is needed for
the calculation.

Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Link: https://lore.kernel.org/r/20210820004536.15791-4-digetx@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>mmc: core: Move eMMC cache flushing to a new bus_ops callback</title>
<updated>2021-06-14T11:57:37+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2021-05-06T14:58:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8ae11edeb95682f6ab1983986c1daff3a00e01fc'/>
<id>urn:sha1:8ae11edeb95682f6ab1983986c1daff3a00e01fc</id>
<content type='text'>
To prepare to add internal cache management for SD cards, let's start by
moving the eMMC specific code into a new -&gt;flush_cache() bus_ops callback.

In this way, it becomes straight forward to add the SD specific parts,
as subsequent changes are about to show.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20210506145829.198823-2-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: core: Enable eMMC sleep commands to use HW busy polling</title>
<updated>2021-06-14T11:57:36+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2021-05-04T16:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fa79651cc808f68db6f6f297be5a950ccd5dffb'/>
<id>urn:sha1:6fa79651cc808f68db6f6f297be5a950ccd5dffb</id>
<content type='text'>
After the eMMC sleep command (CMD5) has been sent, the card start signals
busy on the DAT0 line, which can be monitored to understand when it's
allowed to proceed to power off the VCC regulator.

When MMC_CAP_WAIT_WHILE_BUSY isn't supported by the host the DAT0 line
isn't being monitored for busy completion, but instead we are waiting a
fixed period of time. The time corresponds to the sleep timeout that is
specified in the EXT_CSD register of the eMMC card. This is many cases
suboptimal, as the timeout corresponds to the worst case scenario.

To improve the situation add support for HW busy polling through the
-&gt;card_busy() host ops, when the host supports this.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Acked-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Link: https://lore.kernel.org/r/20210504161222.101536-6-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: core: Drop open coding when preparing commands with busy signaling</title>
<updated>2021-06-14T11:57:35+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2021-05-04T16:12:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e62f1e0b2384e25fe61042da3ecf08b7d8262f8d'/>
<id>urn:sha1:e62f1e0b2384e25fe61042da3ecf08b7d8262f8d</id>
<content type='text'>
Similar code for validating the host-&gt;max_busy_timeout towards the current
command's busy timeout, exists in mmc_do_erase(), mmc_sleep() and
__mmc_switch(). Let's move the common code into a helper function.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Acked-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Link: https://lore.kernel.org/r/20210504161222.101536-2-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: block: Issue a cache flush only when it's enabled</title>
<updated>2021-04-26T09:37:23+00:00</updated>
<author>
<name>Avri Altman</name>
<email>avri.altman@wdc.com</email>
</author>
<published>2021-04-25T06:02:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97fce126e279690105ee15be652b465fd96f9997'/>
<id>urn:sha1:97fce126e279690105ee15be652b465fd96f9997</id>
<content type='text'>
In command queueing mode, the cache isn't flushed via the mmc_flush_cache()
function, but instead by issuing a CMDQ_TASK_MGMT (CMD48) with a
FLUSH_CACHE opcode. In this path, we need to check if cache has been
enabled, before deciding to flush the cache, along the lines of what's
being done in mmc_flush_cache().

To fix this problem, let's add a new bus ops callback -&gt;cache_enabled() and
implement it for the mmc bus type. In this way, the mmc block device driver
can call it to know whether cache flushing should be done.

Fixes: 1e8e55b67030 (mmc: block: Add CQE support)
Cc: stable@vger.kernel.org
Reported-by: Brendan Peter &lt;bpeter@lytx.com&gt;
Signed-off-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Tested-by: Brendan Peter &lt;bpeter@lytx.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/20210425060207.2591-2-avri.altman@wdc.com
Link: https://lore.kernel.org/r/20210425060207.2591-3-avri.altman@wdc.com
[Ulf: Squashed the two patches and made some minor updates]
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Add a retries parameter to __mmc_switch function</title>
<updated>2021-04-15T11:43:17+00:00</updated>
<author>
<name>Bean Huo</name>
<email>beanhuo@micron.com</email>
</author>
<published>2021-04-14T21:22:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e52a168be3775c06cce279b03d156efbad5478b'/>
<id>urn:sha1:5e52a168be3775c06cce279b03d156efbad5478b</id>
<content type='text'>
Add command retries parameter to __mmc_switch(), let caller
pass retries according to the caller's condition.

Signed-off-by: Bean Huo &lt;beanhuo@micron.com&gt;
Link: https://lore.kernel.org/r/20210414212236.346813-2-huobean@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Fix partition switch time for eMMC</title>
<updated>2021-03-09T09:00:52+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-03-03T09:26:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66fbacccbab91e6e55d9c8f1fc0910a8eb6c81f7'/>
<id>urn:sha1:66fbacccbab91e6e55d9c8f1fc0910a8eb6c81f7</id>
<content type='text'>
Avoid the following warning by always defining partition switch time:

 [    3.209874] mmc1: unspecified timeout for CMD6 - use generic
 [    3.222780] ------------[ cut here ]------------
 [    3.233363] WARNING: CPU: 1 PID: 111 at drivers/mmc/core/mmc_ops.c:575 __mmc_switch+0x200/0x204

Reported-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
Fixes: 1c447116d017 ("mmc: mmc: Fix partition switch timeout for some eMMCs")
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/168bbfd6-0c5b-5ace-ab41-402e7937c46e@intel.com
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: remove redundant card null check to mmc_can_sleep()</title>
<updated>2021-02-01T10:54:46+00:00</updated>
<author>
<name>Yue Hu</name>
<email>huyue2@yulong.com</email>
</author>
<published>2021-01-15T03:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=783667ccb5b57cc81af2646b46f56ada05f0f0ae'/>
<id>urn:sha1:783667ccb5b57cc81af2646b46f56ada05f0f0ae</id>
<content type='text'>
Note that only _mmc_suspend() will call mmc_can_sleep(). And card is
checked before in mmc_can_poweroff_notify().

Signed-off-by: Yue Hu &lt;huyue2@yulong.com&gt;
Link: https://lore.kernel.org/r/20210115034506.646-1-zbestahu@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: remove needless err = 0 in mmc_init_card()</title>
<updated>2021-02-01T10:54:45+00:00</updated>
<author>
<name>Yue Hu</name>
<email>huyue2@yulong.com</email>
</author>
<published>2021-01-13T11:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c148853e8eb433ec88cf0b9482376ec7814b599'/>
<id>urn:sha1:1c148853e8eb433ec88cf0b9482376ec7814b599</id>
<content type='text'>
Since they will always being in successful path to return 0 directly,
no need to set err = 0.

Signed-off-by: Yue Hu &lt;huyue2@yulong.com&gt;
Link: https://lore.kernel.org/r/20210113113431.522-1-zbestahu@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
