From: Bin Meng <bmeng.cn@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Bin Meng <bin.meng@windriver.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type
Date: Mon, 8 Feb 2021 22:44:11 +0800 [thread overview]
Message-ID: <CAEUhbmWFT9RFSiTyGLh2EVxavuf1x5QySZsThJDUa4hrtpMkeA@mail.gmail.com> (raw)
In-Reply-To: <CAAdtpL4WKEQ--D0DqJ_tMo8DxiBW-8F_6+w+PfiWtsxhi_O_5A@mail.gmail.com>
HI Philippe,
On Mon, Feb 8, 2021 at 10:27 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On Mon, Feb 8, 2021 at 3:20 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Philippe,
> >
> > On Mon, Feb 8, 2021 at 10:08 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > >
> > > On 1/28/21 7:30 AM, Bin Meng wrote:
> > > > From: Bin Meng <bin.meng@windriver.com>
> > > >
> > > > Besides CMD12, the following command's reponse type is R1b:
> > > >
> > > > - SET_WRITE_PROT (CMD28)
> > > > - CLR_WRITE_PROT (CMD29)
> > > > - ERASE (CMD38)
> > > >
> > > > Reuse the same s->stopping to indicate a R1b reponse is needed.
> > > >
> > > > Signed-off-by: Bin Meng <bin.meng@windriver.com>
> > > >
> > > > ---
> > > >
> > > > Changes in v4:
> > > > - new patch: handle the rest commands with R1b response type
> > > >
> > > > hw/sd/ssi-sd.c | 6 ++++++
> > > > 1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
> > > > index 907d681d19..97ee58e20c 100644
> > > > --- a/hw/sd/ssi-sd.c
> > > > +++ b/hw/sd/ssi-sd.c
> > > > @@ -194,6 +194,12 @@ static uint32_t ssi_sd_transfer(SSIPeripheral *dev, uint32_t val)
> > > > /* CMD13 returns a 2-byte statuse work. Other commands
> > > > only return the first byte. */
> > > > s->arglen = (s->cmd == 13) ? 2 : 1;
> > > > +
> > > > + /* handle R1b */
> > > > + if (s->cmd == 28 || s->cmd == 29 || s->cmd == 38) {
> > >
> > > Why not also check CMD13 for completeness?
> > >
> >
> > I am not sure I got your point. CMD13 does not respond with R1b but R2.
>
> Forget what I wrote, you are correct =)
>
> BTW since you have a deep understanding of SD cards, would you like to
> be listed as designated reviewer in the SD/MMC section?
I would be honored to have a try. Thanks!
Regards,
Bin
next prev parent reply other threads:[~2021-02-08 19:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 6:30 [PATCH v4 0/9] hw/sd: Support block read/write in SPI mode Bin Meng
2021-01-28 6:30 ` [PATCH v4 1/9] hw/sd: ssi-sd: Support multiple block read Bin Meng
2021-01-28 6:30 ` [PATCH v4 2/9] hw/sd: sd: Remove duplicated codes in single/multiple block read/write Bin Meng
2021-01-28 6:30 ` [PATCH v4 3/9] hw/sd: sd: Allow single/multiple block write for SPI mode Bin Meng
2021-01-28 6:30 ` [PATCH v4 4/9] hw/sd: Introduce receive_ready() callback Bin Meng
2021-01-28 6:30 ` [PATCH v4 5/9] hw/sd: ssi-sd: Support single block write Bin Meng
2021-01-28 6:30 ` [PATCH v4 6/9] hw/sd: ssi-sd: Support multiple " Bin Meng
2021-01-28 6:30 ` [PATCH v4 7/9] hw/sd: ssi-sd: Fix SEND_IF_COND (CMD8) response Bin Meng
2021-01-28 6:30 ` [PATCH v4 8/9] hw/sd: ssi-sd: Fix STOP_TRANSMISSION (CMD12) response Bin Meng
2021-01-28 6:30 ` [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type Bin Meng
2021-02-08 14:08 ` Philippe Mathieu-Daudé
2021-02-08 14:20 ` Bin Meng
2021-02-08 14:27 ` Philippe Mathieu-Daudé
2021-02-08 14:44 ` Bin Meng [this message]
2021-02-04 6:02 ` [PATCH v4 0/9] hw/sd: Support block read/write in SPI mode Bin Meng
2021-02-09 14:32 ` Bin Meng
2021-02-09 17:36 ` Philippe Mathieu-Daudé
2021-02-16 11:53 ` Bin Meng
2021-02-16 13:43 ` 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=CAEUhbmWFT9RFSiTyGLh2EVxavuf1x5QySZsThJDUa4hrtpMkeA@mail.gmail.com \
--to=bmeng.cn@gmail.com \
--cc=bin.meng@windriver.com \
--cc=f4bug@amsat.org \
--cc=qemu-block@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).