diff options
author | Alex Dubov <oakad@yahoo.com> | 2007-02-11 00:16:40 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-02-11 10:28:22 -0500 |
commit | 12c834527b85571792f1c4f1d12632185bea44c2 (patch) | |
tree | cbabb21d9747ca9ed30efe70be4be470505f8ba9 /drivers/mmc | |
parent | abc71668b5c99b655c6b2677570748a840d4c713 (diff) |
tifm_sd: treat "status error" as normal command completion
TI FlasMedia controller attempts to validate command responses and
issues a "status error" if response does not matches its perceived
(by controller) value. As mmc layer does its own validation we can
safely ignore the controller's opinion.
Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/tifm_sd.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c index e65f8a0a9349..0581d09c58fc 100644 --- a/drivers/mmc/tifm_sd.c +++ b/drivers/mmc/tifm_sd.c | |||
@@ -36,8 +36,8 @@ module_param(fixed_timeout, bool, 0644); | |||
36 | #define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ | 36 | #define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ |
37 | #define TIFM_MMCSD_READ 0x8000 | 37 | #define TIFM_MMCSD_READ 0x8000 |
38 | 38 | ||
39 | #define TIFM_MMCSD_DATAMASK 0x001d /* set bits: EOFB, BRS, CB, EOC */ | 39 | #define TIFM_MMCSD_DATAMASK 0x401d /* set bits: CERR, EOFB, BRS, CB, EOC */ |
40 | #define TIFM_MMCSD_ERRMASK 0x41e0 /* set bits: CERR, CCRC, CTO, DCRC, DTO */ | 40 | #define TIFM_MMCSD_ERRMASK 0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */ |
41 | #define TIFM_MMCSD_EOC 0x0001 /* end of command phase */ | 41 | #define TIFM_MMCSD_EOC 0x0001 /* end of command phase */ |
42 | #define TIFM_MMCSD_CB 0x0004 /* card enter busy state */ | 42 | #define TIFM_MMCSD_CB 0x0004 /* card enter busy state */ |
43 | #define TIFM_MMCSD_BRS 0x0008 /* block received/sent */ | 43 | #define TIFM_MMCSD_BRS 0x0008 /* block received/sent */ |
@@ -242,7 +242,7 @@ change_state: | |||
242 | case IDLE: | 242 | case IDLE: |
243 | return; | 243 | return; |
244 | case CMD: | 244 | case CMD: |
245 | if (host_status & TIFM_MMCSD_EOC) { | 245 | if (host_status & (TIFM_MMCSD_EOC | TIFM_MMCSD_CERR)) { |
246 | tifm_sd_fetch_resp(cmd, sock); | 246 | tifm_sd_fetch_resp(cmd, sock); |
247 | if (cmd->data) { | 247 | if (cmd->data) { |
248 | host->state = BRS; | 248 | host->state = BRS; |
@@ -341,10 +341,7 @@ static void tifm_sd_signal_irq(struct tifm_dev *sock, | |||
341 | goto done; | 341 | goto done; |
342 | 342 | ||
343 | if (host_status & TIFM_MMCSD_ERRMASK) { | 343 | if (host_status & TIFM_MMCSD_ERRMASK) { |
344 | if (host_status & TIFM_MMCSD_CERR) | 344 | if (host_status & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO)) |
345 | error_code = MMC_ERR_FAILED; | ||
346 | else if (host_status | ||
347 | & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO)) | ||
348 | error_code = MMC_ERR_TIMEOUT; | 345 | error_code = MMC_ERR_TIMEOUT; |
349 | else if (host_status | 346 | else if (host_status |
350 | & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC)) | 347 | & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC)) |