linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: "Christian Löhle" <CLoehle@hyperstone.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hch@infradead.org" <hch@infradead.org>
Subject: RE: [PATCH] mmc: block: Differentiate busy and non-TRAN state
Date: Wed, 7 Jul 2021 10:16:41 +0000	[thread overview]
Message-ID: <DM6PR04MB65751AF67891F655ABBAA7C6FC1A9@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <CWXP265MB2680AE8D71546A5656B410DCC41A9@CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM>

> Hey Avri,
> 
> >Are you using mmc-utils?
> No, Im accessing the ioctl interface with my own application.
> 
> >Can you share exactly the sequence of commands you are sending?
> 
> The one I initially encountered was, as stated earlier, a Unlock-Force Erase
> into a new Lock with set password. Basically any R1 (no b) command that
> transitions to PROG, so behaves like a write command, could trigger this.
> But obviously Unlock force erase is the best example, as a full erase will
> take quite some time and many (all?) cards will not accept new commands
> (i.e. stay in PROG) until the erase has actually completed. The current
> code will not check anything for CMD42 after the response.
> I have not hit the race condition with anything but CMD42.
> 
> So to be verbose:
> CMD16 - CMD42 Set PW - (CMD16)* - CMD42 Unlock Force Erase - (CMD42
> Set PW)+
> * May be omitted if you craft the CMD42 carefully (i.e. equal data size)
> + is pretty much irrelevant, can be replaced with anything that is illegal in
> PROG.
Oh, OK.  Interesting.
This functionality is missing in mmc-utils.
While at it, I encourage you to consider adding it.

Thanks,
Avri


> 
> >Again, can you share the sequence of the commands you are using?
> >
> >Thanks,
> >Avri
> Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz
> Managing Directors: Dr. Jan Peter Berns.
> Commercial register of local courts: Freiburg HRB381782


  reply	other threads:[~2021-07-07 10:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  9:43 [PATCH] mmc: block: Differentiate busy and non-TRAN state Christian Löhle
2021-07-02  7:43 ` Christoph Hellwig
2021-07-06  8:20 ` Christian Löhle
2021-07-06  8:40   ` Ulf Hansson
2021-07-06  9:09     ` Christian Löhle
2021-07-06  9:34       ` Ulf Hansson
2021-07-07  6:49       ` Avri Altman
2021-07-07  8:27         ` [PATCHv2] mmc: block: Differentiate busy and PROG state Christian Löhle
2021-07-07 11:57           ` Ulf Hansson
2021-07-07 14:36             ` Christian Löhle
2021-08-09 15:16               ` Ulf Hansson
2021-07-07  9:01         ` [PATCH] mmc: block: Differentiate busy and non-TRAN state Christian Löhle
2021-07-07 10:16           ` Avri Altman [this message]
2021-07-07 14:42             ` Christian Löhle

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=DM6PR04MB65751AF67891F655ABBAA7C6FC1A9@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=CLoehle@hyperstone.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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).