Skip to content

Commit

Permalink
report MCI error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
none committed Dec 11, 2019
1 parent 1b9d278 commit e736554
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ddbridge/ddbridge-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,19 @@ int ddb_mci_cmd(struct mci *state,
struct mci_result *result)
{
int stat;

struct mci_result res;

if (!result)
result = &res;
mutex_lock(&state->base->mci_lock);
stat = ddb_mci_cmd_raw_unlocked(state,
(u32 *)command, sizeof(*command)/sizeof(u32),
(u32 *)result, sizeof(*result)/sizeof(u32));
mutex_unlock(&state->base->mci_lock);
if (command && result && (result->status & 0x80))
dev_warn(state->base->link->dev->dev,
"mci_command 0x%02x, error=0x%02x\n",
command->command, result->status);
return stat;
}

Expand Down

0 comments on commit e736554

Please sign in to comment.