linux-sg2042/drivers/mmc/core
Wolfgang Muees d08ebeddfb mmc_spi: fail gracefully if host or card do not support the switch command
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 <wolfgang.mues@auerswald.de>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>		[2.6.31.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:37 -07:00
..
Kconfig mmc: Use menuconfig objects 2007-05-08 22:41:55 +02:00
Makefile mmc: Export internal host state through debugfs 2008-07-27 01:26:16 +02:00
bus.c mmc: add MODALIAS linkage for MMC/SD devices 2009-03-24 21:29:58 +01:00
bus.h mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
core.c mmc: power off once at removal 2009-09-23 07:39:34 -07:00
core.h mmc: add mmc card sleep and awake support 2009-09-23 07:39:33 -07:00
debugfs.c mmc: Add Extended CSD register to debugfs 2009-03-24 21:29:59 +01:00
host.c mmc: add 'enable' and 'disable' methods to mmc host 2009-09-23 07:39:33 -07:00
host.h mmc: add 'enable' and 'disable' methods to mmc host 2009-09-23 07:39:33 -07:00
mmc.c mmc_spi: fail gracefully if host or card do not support the switch command 2009-09-23 07:39:37 -07:00
mmc_ops.c mmc: check status after MMC SWITCH command 2009-09-23 07:39:34 -07:00
mmc_ops.h mmc: add mmc card sleep and awake support 2009-09-23 07:39:33 -07:00
sd.c mmc_spi: fail gracefully if host or card do not support the switch command 2009-09-23 07:39:37 -07:00
sd_ops.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
sd_ops.h drivers/mmc/core/: make 3 functions static 2007-07-26 02:05:57 +02:00
sdio.c sdio: add CD disable support 2009-09-23 07:39:36 -07:00
sdio_bus.c mmc: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-08 21:37:46 +01:00
sdio_bus.h mmc: basic SDIO device model 2007-09-23 19:45:31 +02:00
sdio_cis.c sdio: fix read buffer overflow 2009-09-23 07:39:36 -07:00
sdio_cis.h sdio: split up common and function CIS parsing 2007-09-23 20:44:22 +02:00
sdio_io.c sdio: add MMC_QUIRK_LENIENT_FN0 2009-09-23 07:39:37 -07:00
sdio_irq.c sdio: give sdio irq thread a host specific name 2008-10-12 11:04:30 +02:00
sdio_ops.c sdio: check that addresses are within the address space 2009-03-24 21:30:00 +01:00
sdio_ops.h sdio: extend sdio_readsb() and friends to handle any length of buffer 2007-09-23 21:21:32 +02:00