Message ID | 20180123032135.28863-7-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | SDCard: housekeeping, add tracing (part 4) | expand |
On Mon, Jan 22, 2018 at 7:21 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Alistair Francis <alistair.francis@xilinx.com> Alistair > --- > hw/sd/sd.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index dc4b2329e4..27c08aa894 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -816,13 +816,15 @@ static void sd_lock_command(SDState *sd) > sd->card_status &= ~CARD_IS_LOCKED; > } > > -static sd_rsp_type_t sd_normal_command(SDState *sd, > - SDRequest req) > +static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) > { > 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)); > + if (req.cmd != 55 || sd->expecting_acmd) { > + trace_sdcard_normal_command(req.cmd, req.arg, > + sd_state_name(sd->state)); > + } > > /* Not interpreting this as an app command */ > sd->card_status &= ~APP_CMD; > -- > 2.15.1 > >
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index dc4b2329e4..27c08aa894 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -816,13 +816,15 @@ static void sd_lock_command(SDState *sd) sd->card_status &= ~CARD_IS_LOCKED; } -static sd_rsp_type_t sd_normal_command(SDState *sd, - SDRequest req) +static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) { 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)); + if (req.cmd != 55 || sd->expecting_acmd) { + trace_sdcard_normal_command(req.cmd, req.arg, + sd_state_name(sd->state)); + } /* Not interpreting this as an app command */ sd->card_status &= ~APP_CMD;
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/sd/sd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)