All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Alistair Francis <alistair@alistair23.me>,
	"Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/8] sdcard: Do not trace CMD55, except when we already expect an ACMD
Date: Fri, 9 Mar 2018 15:44:44 +0000	[thread overview]
Message-ID: <CAFEAcA_A+EKpc9BPbBOCU+-_Pw11D7ALDBZ5zDytzQPB6qp1QA@mail.gmail.com> (raw)
In-Reply-To: <20180309153654.13518-2-f4bug@amsat.org>

On 9 March 2018 at 15:36, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Acked-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
>  hw/sd/sd.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 933890e86f..4a9520e38e 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -866,13 +866,18 @@ 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));
> +    /* CMD55 precedes an ACMD, so we are not interested in tracing it.
> +     * However there is no ACMD55, so we want to trace this particular case.
> +     */
> +    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.16.2

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

  reply	other threads:[~2018-03-09 15:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 15:36 [Qemu-devel] [PATCH 0/8] SDCard: improve tracing, support UHS-I Philippe Mathieu-Daudé
2018-03-09 15:36 ` [Qemu-devel] [PATCH 1/8] sdcard: Do not trace CMD55, except when we already expect an ACMD Philippe Mathieu-Daudé
2018-03-09 15:44   ` Peter Maydell [this message]
2018-03-09 15:36 ` [Qemu-devel] [PATCH 2/8] sdcard: Display command name when tracing CMD/ACMD Philippe Mathieu-Daudé
2018-03-09 15:47   ` Peter Maydell
2018-03-09 15:36 ` [Qemu-devel] [PATCH 3/8] sdcard: Display which protocol is used when tracing (SD or SPI) Philippe Mathieu-Daudé
2018-03-09 15:36 ` [Qemu-devel] [PATCH 4/8] sdcard: Add the Tuning Command (CMD19) Philippe Mathieu-Daudé
2018-03-09 15:36 ` [Qemu-devel] [PATCH 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3) Philippe Mathieu-Daudé
2018-03-09 17:03   ` Peter Maydell
2018-03-09 17:08     ` Edgar E. Iglesias
2018-03-09 17:33     ` Philippe Mathieu-Daudé
2018-03-12 12:32     ` Philippe Mathieu-Daudé
2018-03-12 12:36     ` Philippe Mathieu-Daudé
2018-03-12 13:12       ` Peter Maydell
2018-03-12 13:03     ` Philippe Mathieu-Daudé
2018-03-12 13:16       ` Peter Maydell
2018-05-22  4:45         ` Philippe Mathieu-Daudé
2018-05-09  5:36     ` Philippe Mathieu-Daudé
2018-03-09 17:06   ` Peter Maydell
2018-03-12 12:36     ` Philippe Mathieu-Daudé
2018-03-12 13:08       ` Peter Maydell
2018-03-09 15:36 ` [Qemu-devel] [PATCH 6/8] sdcard: Add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit Philippe Mathieu-Daudé
2018-03-09 15:36 ` [Qemu-devel] [PATCH 7/8] sdhci: Fix a typo in comment Philippe Mathieu-Daudé
2018-03-09 15:43   ` Peter Maydell
2018-03-09 15:36 ` [Qemu-devel] [PATCH 8/8] MAINTAINERS: Add entries for SD (SDHCI, SDBus, SDCard) Philippe Mathieu-Daudé
2018-03-09 15:43   ` Peter Maydell
2018-03-09 17:08 ` [Qemu-devel] [PATCH 0/8] SDCard: improve tracing, support UHS-I Peter Maydell
2018-03-09 17:14   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA_A+EKpc9BPbBOCU+-_Pw11D7ALDBZ5zDytzQPB6qp1QA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@xilinx.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.