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 5/8] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3)
Date: Mon, 12 Mar 2018 13:16:44 +0000	[thread overview]
Message-ID: <CAFEAcA_ed2RsYXN5jP2u5L0UYi3XP7MxjjF76RoKsjjwBKtLCw@mail.gmail.com> (raw)
In-Reply-To: <0cf434fe-a8f3-dc24-4350-197d2d56c4f3@amsat.org>

On 12 March 2018 at 13:03, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 03/09/2018 06:03 PM, Peter Maydell wrote:
>> I think the spec says that if the guest makes an invalid selection
>> for one function in the group then we must ignore all the set values,
>
> ... for the current group? ...
>
>> not just the one that was wrong, so we need to check everything
>> first before we start writing the new values back.
>
> I'm following the "Physical Layer Simplified Specification Version 3.01".
>
>   4.3.10.3 Mode 1 Operation - Set Function
>
>   Switching to a new functionality is done by:
>   • When a function cannot be switched because it is busy,
>     the card returns the current function number (not returns 0xF),
>     the other functions in the other groups may still be switched.
>
>   In response to a set function, the switch function will return ...
>   • The function that is the result of the switch command. In case
>     of invalid selection of one function or more, all set values
>     are ignored and no change will be done (identical to the case
>     where the host selects 0xF for all functions groups). The
>     response to an invalid selection of function will be 0xF.
>
> I'm not sure how to interpret this paragraph, I understand it as:
> "all set values are ignored [in the current group]" but this is
> confusing because of the "identical to ... all functions groups".

The command only lets you specify one value function in each
group, so "all set values" must mean "the set values for every
group", I think, and the parenthesised text confirms that --
it should act as if the command specified 0xf for everything.
It's slightly less clear what exactly the response should be:
should it return 0xf for the groups where there was an invalid
selection, and <whatever the current value is> for the groups
where the selection request was ok, or just 0xf for everything ?
(This is probably most easily answered by testing the behaviour
of a real sd card I guess...)

thanks
-- PMM

  reply	other threads:[~2018-03-12 13:17 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
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 [this message]
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_ed2RsYXN5jP2u5L0UYi3XP7MxjjF76RoKsjjwBKtLCw@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.