<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mmc/core/sdio_ops.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-04-24T19:41:42+00:00</updated>
<entry>
<title>mmc: sdio: improve mmc_io_rw_extended</title>
<updated>2017-04-24T19:41:42+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2017-03-22T20:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7aceaf566e1d6f7bf29516d680ee883697909cc7'/>
<id>urn:sha1:7aceaf566e1d6f7bf29516d680ee883697909cc7</id>
<content type='text'>
Improve mmc_io_rw_extended a little:
- using DIV_ROUND_UP achieves the same but is better readable
- simplify code by using sg_set_buf
- simplify one statement by using -= operator

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: use empty initializer list to zero-clear structures</title>
<updated>2017-02-13T12:19:54+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2016-12-19T11:51:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7836d1593b87cb813c58cf64e08b052ebbe2a78'/>
<id>urn:sha1:c7836d1593b87cb813c58cf64e08b052ebbe2a78</id>
<content type='text'>
In the MMC subsystem, we see such initializers that only clears the
first member explicitly.

For example,

  struct mmc_request mrq = {NULL};

sets the first member (.sbc) to NULL explicitly.  However, this is
an unstable form because we may insert a non-pointer member at the
top of the struct mmc_request in the future. (if we do so, the
compiler will spit warnings.)

So, using a designated initializer is preferred coding style.  The
expression above is equivalent to:

  struct mmc_request mrq = { .sbc = NULL };

Of course, this does not express our intention.  We want to fill
all struct members with zeros.  Please note struct members are
implicitly zero-cleared unless otherwise specified in the initializer.

After all, the most reasonable (and stable) form is:

  struct mmc_request mrq = {};

Do likewise for mmc_command, mmc_data as well.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdio: deploy error handling instead of triggering BUG_ON</title>
<updated>2016-09-26T19:31:15+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2016-08-26T00:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=923dff87373708801f501cbe8993df98a91b566e'/>
<id>urn:sha1:923dff87373708801f501cbe8993df98a91b566e</id>
<content type='text'>
When using mmc_io_rw_extended, it's intent to avoid null
pointer of card and invalid func number. But actually it
didn't prevent that as the seg_size already use the card.
Currently the wrapper function sdio_io_rw_ext_helper already
use card before calling mmc_io_rw_extended, so we should move
this check to there. As to the func number, it was token from
'(ocr &amp; 0x70000000) &gt;&gt; 28' which should be enough to guarantee
that it won't be larger than 7. But we should prevent the
caller like wifi drivers modify this value. So let's move this
check into sdio_io_rw_ext_helper either.

Also we remove the BUG_ON for mmc_send_io_op_cond since all
possible paths calling this function are protected by checking
the arguments in advance. After deploying these changes, we
could not see any panic within SDIO API even if func drivers
abuse the SDIO func APIs.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: remove unnecessary assignment statements before return</title>
<updated>2016-02-29T10:02:47+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2016-01-08T02:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0899e741938758e20cbca055f66b0f5558da7a49'/>
<id>urn:sha1:0899e741938758e20cbca055f66b0f5558da7a49</id>
<content type='text'>
Variable assignment just before return is redundant.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdio: Use multiple scatter/gather list</title>
<updated>2012-12-06T18:54:43+00:00</updated>
<author>
<name>Kyoungil Kim</name>
<email>ki0351.kim@samsung.com</email>
</author>
<published>2012-10-22T11:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=968a64ea638bbd48839b41981ff50197f3412676'/>
<id>urn:sha1:968a64ea638bbd48839b41981ff50197f3412676</id>
<content type='text'>
Before this patch, we always used only single sg entry for SDIO transfer.
This patch switches to using multiple sg entries. In the case of dwmci,
it supports only up to 4KB size per single sg entry. So if we want to
transfer more than 4KB, we should send more than 1 command.

When we tested before applying this patch, it took around 335 us for
5K(5120) bytes transfer with dwmci controller. After applying this patch,
it takes 242 us for 5K bytes. So this patch makes around 38% performance
improvement for 5K bytes transfer. If the transfer size is bigger, then
the performance improvement ratio will be increased.

Signed-off-by: Kyoungil Kim &lt;ki0351.kim@samsung.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdio: Fix to support any block size optimally</title>
<updated>2012-01-12T04:58:40+00:00</updated>
<author>
<name>Stefan Nilsson XK</name>
<email>stefan.xk.nilsson@stericsson.com</email>
</author>
<published>2011-10-26T08:52:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=052d81da6e6f0f8839ef6d5a46f215fc8cd99d5a'/>
<id>urn:sha1:052d81da6e6f0f8839ef6d5a46f215fc8cd99d5a</id>
<content type='text'>
This patch allows any block size to be set on the SDIO link,
and still have an arbitrary sized packet (adjusted in size by
using sdio_align_size) transferred in an optimal way
(preferably one transfer).

Previously if the block size was larger than the default of
512 bytes and the transfer size was exactly one block size
(possibly thanks to using sdio_align_size to get an optimal
transfer size), it was sent as a number of byte transfers instead
of one block transfer. Also if the number of blocks was
(max_blocks * N) + 1, the tranfer would be conducted with a number
of blocks and finished off with a number of byte transfers.

When doing this change it was also possible to break out the quirk
for broken byte mode in a much cleaner way, and collect the logic of
when to do byte or block transfer in one function instead of two.

Signed-off-by: Stefan Nilsson XK &lt;stefan.xk.nilsson@stericsson.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@stericsson.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdio: Workaround for dev with broken CMD53</title>
<updated>2011-10-26T20:32:02+00:00</updated>
<author>
<name>Stefan Nilsson XK</name>
<email>stefan.xk.nilsson@stericsson.com</email>
</author>
<published>2011-09-15T15:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a0da648ff3a5020406ac7784eb3b519014f66f6'/>
<id>urn:sha1:9a0da648ff3a5020406ac7784eb3b519014f66f6</id>
<content type='text'>
Adds a quirk which can be turned on for SDIO devices that do not support
512 byte requests in byte mode during CMD53. These requests will always
be sent in block mode instead.

This patch also enables this quirk for ST-Ericsson CW1200 WLAN device.

Signed-off-by: Stefan Nilsson XK &lt;stefan.xk.nilsson@stericsson.com&gt;
Signed-off-by: Ulf HANSSON &lt;ulf.hansson@stericsson.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: fix integer assignments to pointer</title>
<updated>2011-10-26T19:43:35+00:00</updated>
<author>
<name>Venkatraman S</name>
<email>svenkatr@ti.com</email>
</author>
<published>2011-08-24T19:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad5fd97288655b5628052c1fa906419417c86100'/>
<id>urn:sha1:ad5fd97288655b5628052c1fa906419417c86100</id>
<content type='text'>
Fix the sparse warning output "warning: Using plain integer as NULL pointer"

Signed-off-by: Venkatraman S &lt;svenkatr@ti.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: initialize struct mmc_request at declaration time</title>
<updated>2011-05-25T01:02:01+00:00</updated>
<author>
<name>Chris Ball</name>
<email>cjb@laptop.org</email>
</author>
<published>2011-04-14T03:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24f5b53ba076e983bc64fa48534ca795d7813d51'/>
<id>urn:sha1:24f5b53ba076e983bc64fa48534ca795d7813d51</id>
<content type='text'>
Converts from:
	struct mmc_request mrq;
	memset(&amp;mrq, 0, sizeof(struct mmc_request));

to:
	struct mmc_request mrq = {0};

because it's shorter, as performant, and easier to work out whether
initialization has happened.

Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: initialize struct mmc_data at declaration time</title>
<updated>2011-05-25T01:01:56+00:00</updated>
<author>
<name>Chris Ball</name>
<email>cjb@laptop.org</email>
</author>
<published>2011-04-14T03:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a61ad2b49bfce94dfddce828cd9222e4b9e7825b'/>
<id>urn:sha1:a61ad2b49bfce94dfddce828cd9222e4b9e7825b</id>
<content type='text'>
Converts from:
	struct mmc_data data;
	memset(&amp;data, 0, sizeof(struct mmc_data));

to:
	struct mmc_data data = {0};

because it's shorter, as performant, and easier to work out whether
initialization has happened.

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