Skip to content

Commit

Permalink
hw/sd/sdcard: When card is in wrong state, log which state it is
Browse files Browse the repository at this point in the history
We report the card is in an inconsistent state, but don't precise
in which state it is. Add this information, as it is useful when
debugging problems.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210624142209.1193073-2-f4bug@amsat.org>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
  • Loading branch information
philmd committed Jul 12, 2021
1 parent d1987c8 commit c60b292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/sd/sd.c
Expand Up @@ -1504,7 +1504,8 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
return sd_illegal;
}

qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state\n", req.cmd);
qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state: %s\n",
req.cmd, sd_state_name(sd->state));
return sd_illegal;
}

Expand Down

0 comments on commit c60b292

Please sign in to comment.