Do not trace CMD55 used to start an ACMD. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/sd/sd.c | 6 ++++-- hw/sd/trace-events | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c50ac752d4..8104d6c055 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -826,8 +826,10 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, uint32_t rca = 0x0000; uint64_t addr = (sd->ocr & (1 << 30)) ? (uint64_t) req.arg << 9 : req.arg; - trace_sdcard_normal_command(req.cmd, req.arg, sd_state_name(sd->state), - sd_cmd_abbreviation(req.cmd)); + if (req.cmd != 55 || sd->expecting_acmd) { + trace_sdcard_normal_command(sd_cmd_abbreviation(req.cmd), req.cmd, + req.arg, sd_state_name(sd->state)); + } /* Not interpreting this as an app command */ sd->card_status &= ~APP_CMD; diff --git a/hw/sd/trace-events b/hw/sd/trace-events index f3714a6dc5..412f01a832 100644 --- a/hw/sd/trace-events +++ b/hw/sd/trace-events @@ -24,7 +24,7 @@ sdhci_led(bool state) "LED: %u" # hw/sd/sd.c sdcard_set_mode(const char *current_mode, const char *new_mode, const char *state) "%s -> %s (state: %s)" sdcard_set_state(const char *current_state, const char *new_state, const char *mode) "%s -> %s (mode: %s)" -sdcard_normal_command(uint8_t cmd, uint32_t arg, const char *state, const char *cmd_desc) "CMD%d arg 0x%08x (state %s) %s" +sdcard_normal_command(const char *cmd_desc, uint8_t cmd, uint32_t arg, const char *state) "%20s/ CMD%02d arg 0x%08x (state %s)" sdcard_app_command(uint8_t acmd, uint32_t arg) "ACMD%d arg 0x%08x" sdcard_command_response(const char *hexdump, const char *state) "%s (state %s)" sdcard_reset(void) "" -- 2.15.1