diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-22 16:18:46 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 02:46:48 -0400 |
commit | 17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd (patch) | |
tree | 9f87df1ffbeca4c6f828b7979f2e45ef898a3ef0 /drivers/mmc/host/pxamci.c | |
parent | b7e113dc9d52c4a37d2da6fafe77959f3a28eccf (diff) |
mmc: remove custom error codes
Convert the MMC layer to use standard error codes and not its own,
incompatible values.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/pxamci.c')
-rw-r--r-- | drivers/mmc/host/pxamci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index ff960334b337..b89e32d1e9b5 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -226,7 +226,7 @@ static int pxamci_cmd_done(struct pxamci_host *host, unsigned int stat) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | if (stat & STAT_TIME_OUT_RESPONSE) { | 228 | if (stat & STAT_TIME_OUT_RESPONSE) { |
229 | cmd->error = MMC_ERR_TIMEOUT; | 229 | cmd->error = -ETIMEDOUT; |
230 | } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { | 230 | } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { |
231 | #ifdef CONFIG_PXA27x | 231 | #ifdef CONFIG_PXA27x |
232 | /* | 232 | /* |
@@ -239,11 +239,11 @@ static int pxamci_cmd_done(struct pxamci_host *host, unsigned int stat) | |||
239 | pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); | 239 | pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); |
240 | } else | 240 | } else |
241 | #endif | 241 | #endif |
242 | cmd->error = MMC_ERR_BADCRC; | 242 | cmd->error = -EILSEQ; |
243 | } | 243 | } |
244 | 244 | ||
245 | pxamci_disable_irq(host, END_CMD_RES); | 245 | pxamci_disable_irq(host, END_CMD_RES); |
246 | if (host->data && cmd->error == MMC_ERR_NONE) { | 246 | if (host->data && !cmd->error) { |
247 | pxamci_enable_irq(host, DATA_TRAN_DONE); | 247 | pxamci_enable_irq(host, DATA_TRAN_DONE); |
248 | } else { | 248 | } else { |
249 | pxamci_finish_request(host, host->mrq); | 249 | pxamci_finish_request(host, host->mrq); |
@@ -264,9 +264,9 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) | |||
264 | host->dma_dir); | 264 | host->dma_dir); |
265 | 265 | ||
266 | if (stat & STAT_READ_TIME_OUT) | 266 | if (stat & STAT_READ_TIME_OUT) |
267 | data->error = MMC_ERR_TIMEOUT; | 267 | data->error = -ETIMEDOUT; |
268 | else if (stat & (STAT_CRC_READ_ERROR|STAT_CRC_WRITE_ERROR)) | 268 | else if (stat & (STAT_CRC_READ_ERROR|STAT_CRC_WRITE_ERROR)) |
269 | data->error = MMC_ERR_BADCRC; | 269 | data->error = -EILSEQ; |
270 | 270 | ||
271 | /* | 271 | /* |
272 | * There appears to be a hardware design bug here. There seems to | 272 | * There appears to be a hardware design bug here. There seems to |
@@ -274,7 +274,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) | |||
274 | * This means that if there was an error on any block, we mark all | 274 | * This means that if there was an error on any block, we mark all |
275 | * data blocks as being in error. | 275 | * data blocks as being in error. |
276 | */ | 276 | */ |
277 | if (data->error == MMC_ERR_NONE) | 277 | if (!data->error) |
278 | data->bytes_xfered = data->blocks * data->blksz; | 278 | data->bytes_xfered = data->blocks * data->blksz; |
279 | else | 279 | else |
280 | data->bytes_xfered = 0; | 280 | data->bytes_xfered = 0; |