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>
This commit is contained in:
Pierre Ossman
2007-07-22 22:18:46 +02:00
parent b7e113dc9d
commit 17b0429dde
16 changed files with 203 additions and 202 deletions

View File

@ -154,11 +154,11 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
}
if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
if (status & MCI_DATACRCFAIL)
data->error = MMC_ERR_BADCRC;
data->error = -EILSEQ;
else if (status & MCI_DATATIMEOUT)
data->error = MMC_ERR_TIMEOUT;
data->error = -ETIMEDOUT;
else if (status & (MCI_TXUNDERRUN|MCI_RXOVERRUN))
data->error = MMC_ERR_FIFO;
data->error = -EIO;
status |= MCI_DATAEND;
/*
@ -193,12 +193,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
cmd->resp[3] = readl(base + MMCIRESPONSE3);
if (status & MCI_CMDTIMEOUT) {
cmd->error = MMC_ERR_TIMEOUT;
cmd->error = -ETIMEDOUT;
} else if (status & MCI_CMDCRCFAIL && cmd->flags & MMC_RSP_CRC) {
cmd->error = MMC_ERR_BADCRC;
cmd->error = -EILSEQ;
}
if (!cmd->data || cmd->error != MMC_ERR_NONE) {
if (!cmd->data || cmd->error) {
if (host->data)
mmci_stop_data(host);
mmci_request_end(host, cmd->mrq);