<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mmc/core/sd.c, branch linux-2.6.31.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-10-05T16:31:38Z</updated>
<entry>
<title>mmc_spi: fail gracefully if host or card do not support the switch command</title>
<updated>2009-10-05T16:31:38Z</updated>
<author>
<name>Wolfgang Muees</name>
</author>
<published>2009-09-22T23:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=904f470bbf1cb422b963bc3d479930e0968c30ed'/>
<id>urn:sha1:904f470bbf1cb422b963bc3d479930e0968c30ed</id>
<content type='text'>
commit d08ebeddfb3293fa4bdfca9c610daf1e8ec8b233 upstream.

Some time ago, I have send a patch to the mmc_spi subsystem changing the
error codes.  This was after a discussion with Pierre about using EINVAL
only for non-recoverable errors.  This patch was accepted as

http://git.kernel.org/linus/fdd858db7113ca64132de390188d7ca00701013d

Unfortunately, several weeks later, I realized that this patch has opened
a little can of worms because there are SD cards on the market which

a) claim that they support the switch command
AND
b) refuse to execute this command if operating in SPI mode.

So, such a card would get unusuable in an embedded linux system in SPI
mode, because the init sequence terminates with an error.

This patch adds the missing error codes to the caller of the switch
command and restores the old behaviour to fail gracefully if these
commands can not execute.

Signed-off-by: Wolfgang Muees &lt;wolfgang.mues@auerswald.de&gt;
Cc: &lt;linux-mmc@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>mmc_spi: do not check CID and CSD blocks with CRC16</title>
<updated>2009-04-08T18:37:53Z</updated>
<author>
<name>Wolfgang Muees</name>
</author>
<published>2009-04-07T13:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d9f25c036dd584db175552a7d162403d3ab54b3'/>
<id>urn:sha1:9d9f25c036dd584db175552a7d162403d3ab54b3</id>
<content type='text'>
Some cards are not able to calculate a valid CRC16 value
for CID and CSD reads (CRC for 512 byte data blocks is OK).
By moving the CRC enable after the read of CID and CSD, these
cards can be used. This patch was tested with a faulty 8 GByte
takeMS Class 6 SDHC card. This patch was suggested by
Pierre Ossman.

Signed-off-by: Wolfgang Muees &lt;wolfgang.mues@auerswald.de&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</content>
</entry>
<entry>
<title>MMC: Trivial comment cleanup</title>
<updated>2008-07-15T12:14:41Z</updated>
<author>
<name>Deepak Saxena</name>
</author>
<published>2008-06-17T02:20:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8769392b1918ec70ab62eebc82e06c47c12f8304'/>
<id>urn:sha1:8769392b1918ec70ab62eebc82e06c47c12f8304</id>
<content type='text'>
Make the variable name in the comments match the actual name
of the variable.

Signed-off-by: Deepak Saxena &lt;dsaxena@laptop.org&gt;
Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: change .get_ro() callback semantics</title>
<updated>2008-07-15T12:14:41Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2008-06-17T14:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08f80bb5196517a0dfe50dc7c10f234c0ff2f0e8'/>
<id>urn:sha1:08f80bb5196517a0dfe50dc7c10f234c0ff2f0e8</id>
<content type='text'>
Now get_ro() callback must return 0/1 values for its logical states, and
negative errno values in case of error. If particular host instance doesn't
support RO/WP switch, it should return -ENOSYS.

This patch changes some hosts in two ways:

1. Now functions should be smart to not return negative values in
   "RO asserted" case (particularly gpio_ calls could return negative
   values for the outermost GPIOs).

   Also, board code usually passes get_ro() callbacks that directly return
   gpioreg &amp; bit result, so at91_mci, imxmmc, pxamci and mmc_spi's get_ro()
   handlers need take special care when returning platform's values to the
   mmc core.

2. In case of host instance didn't implement get_ro() callback, it should
   really return -ENOSYS and let the mmc core decide what to do about it
   (mmc core thinks the same way as the hosts, so it isn't functional
   change).

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: use sysfs groups to handle conditional attributes</title>
<updated>2008-03-23T00:02:20Z</updated>
<author>
<name>Pierre Ossman</name>
</author>
<published>2008-03-21T22:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51ec92e295d563dd5712d198a7e46c2ae5ccccb2'/>
<id>urn:sha1:51ec92e295d563dd5712d198a7e46c2ae5ccccb2</id>
<content type='text'>
Suppressing uevents turned out to be a bad idea as it screws up the
order of events, making user space very confused. Change the system to
use sysfs groups instead.

This is a regression that, for some odd reason, has gone unnoticed for
some time. It confuses hal so that the block devices (which have the
mmc device as a parent) are not registered. End result being that
desktop magic when cards are inserted won't work.

Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>MMC core learns about SPI</title>
<updated>2007-09-23T19:51:30Z</updated>
<author>
<name>David Brownell</name>
</author>
<published>2007-08-08T16:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af51715079e7fb6b290e1881d63d815dc4de5011'/>
<id>urn:sha1:af51715079e7fb6b290e1881d63d815dc4de5011</id>
<content type='text'>
Teach the MMC/SD/SDIO core about using SPI mode.

 - Use mmc_host_is_spi() so enumeration works through SPI signaling
   and protocols, not just the native versions.

 - Provide the SPI response type flags with each request issued,
   including requests from the new lock/unlock code.

 - Understand that cmd-&gt;resp[0] and mmc_get_status() results for SPI
   return different values than for "native" MMC/SD protocol; this
   affects resetting, checking card lock status, and some others.

 - Understand that some commands act a bit differently ... notably:
     * OP_COND command doesn't return the OCR
     * APP_CMD status doesn't have an R1_APP_CMD analogue

Those changes required some new and updated primitives:

 - Provide utilities to access two SPI-only requests, and one
   request that wasn't previously needed:
     * mmc_spi_read_ocr() ... SPI only
     * mmc_spi_set_crc() ... SPI only (override by module parm)
     * mmc_send_cid() ... for use without broadcast mode

 - Updated internal routines:
     * Previous mmc_send_csd() modified into mmc_send_cxd_native();
       it uses native "R2" responses, which include 16 bytes of data.
     * Previous mmc_send_ext_csd() becomes new mmc_send_cxd_data()
       helper for command-and-data access
     * Bugfix to that mmc_send_cxd_data() code:  dma-to-stack is
       unsafe/nonportable, so kmalloc a bounce buffer instead.

 - Modified mmc_send_ext_csd() now uses mmc_send_cxd_data() helper

 - Modified mmc_send_csd(), and new mmc_spi_send_cid(), routines use
   those helper routines based on whether they're native or SPI

The newest categories of cards supported by the MMC stack aren't expected
to work yet with SPI:  MMC or SD cards with over 4GB data, and SDIO.
All those cards support SPI mode, so eventually they should work too.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: replace BUG_ON with WARN_ON</title>
<updated>2007-09-23T19:23:07Z</updated>
<author>
<name>Pierre Ossman</name>
</author>
<published>2007-08-09T11:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d84075c8aed771d47d7ac6e96b098559da361c25'/>
<id>urn:sha1:d84075c8aed771d47d7ac6e96b098559da361c25</id>
<content type='text'>
Replace all cases of BUG_ON with WARN_ON where there is a chance
(with varying degrees of slim) that the kernel can continue without
incidence.

Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: improve error code feedback</title>
<updated>2007-09-23T07:14:43Z</updated>
<author>
<name>Pierre Ossman</name>
</author>
<published>2007-07-22T21:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adf66a0dc5e8be8d4e64f3c2114f9b175558235b'/>
<id>urn:sha1:adf66a0dc5e8be8d4e64f3c2114f9b175558235b</id>
<content type='text'>
Now that we use "normal" error codes, improve the reporting and response
to error codes in the core.

Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: remove custom error codes</title>
<updated>2007-09-23T06:46:48Z</updated>
<author>
<name>Pierre Ossman</name>
</author>
<published>2007-07-22T20:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd'/>
<id>urn:sha1:17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd</id>
<content type='text'>
Convert the MMC layer to use standard error codes and not its own,
incompatible values.

Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
<entry>
<title>mmc: add missing printk levels</title>
<updated>2007-07-26T00:05:49Z</updated>
<author>
<name>Pierre Ossman</name>
</author>
<published>2007-07-24T19:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=facba9179e3cd5fa91ff40bbc555c5cd4c101092'/>
<id>urn:sha1:facba9179e3cd5fa91ff40bbc555c5cd4c101092</id>
<content type='text'>
Some printk:s were missing an explicit level.

Signed-off-by: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
</content>
</entry>
</feed>
