linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Christoph Hellwig" <hch@lst.de>, 冯锐 <rui_feng@realsil.com.cn>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 3/3] mmc: rtsx: Add SD Express mode support for RTS5261
Date: Thu, 12 Nov 2020 17:42:13 +0100	[thread overview]
Message-ID: <20201112164213.GA16591@lst.de> (raw)
In-Reply-To: <CAPDyKFpgEcEv8FH59ntmeQADEyCs6aiS8P0tEaru858DRQup=A@mail.gmail.com>

On Fri, Oct 23, 2020 at 02:12:19PM +0200, Ulf Hansson wrote:
> SD spec mentions the write-protect switch on SD cards, while uSD cards
> doesn't have one. In general, host drivers implement support for it
> via a dedicated GPIO line routed to one of the pins in the SD slot.
> 
> In this SD controller case, which is based upon PCI, it works a bit
> differently, as the state of the write protect pin is managed through
> the PCI interface.
> 
> If I understand you correctly, you are saying that the controller
> should be able to communicate (upwards to the block layer) its known
> write protect state for the corresponding NVMe device, during
> initialization?

I got an answer form a member of the SD commitee, and the answer is:

"The SD specification define that case very clearly as following.
If card’s access is restricted through one of the SD unique features – PSWD
Lock/Unlock,  Temporary or Permanent WP (TWP or PWP) or CPRM  then if access
attempt is done through its NVMe interface the card will restrict the access
and respond with Access denied.    The access restriction shall be removed
through the SD protocol/interface before being able to access the card through
the NVMe.
That is defined as following in the section 8.1.6  of the SD7.0 onward."

Note that if you look at the spec this means only rejecting NVMe commands
that write dta for the write protect pin.

  parent reply	other threads:[~2020-11-12 16:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  1:57 [PATCH 3/3] mmc: rtsx: Add SD Express mode support for RTS5261 rui_feng
2020-10-20  6:52 ` 答复: " 冯锐
2020-10-20  8:14   ` Ulf Hansson
2020-10-21 13:59 ` Ulf Hansson
2020-10-22  6:04   ` 答复: " 冯锐
2020-10-23  8:02     ` Ulf Hansson
2020-10-23  9:14       ` Christoph Hellwig
2020-10-23 12:12         ` Ulf Hansson
2020-10-23 12:18           ` Christoph Hellwig
2020-11-12 16:42           ` Christoph Hellwig [this message]
2020-11-17  2:09             ` 冯锐
2020-10-26  8:22       ` 答复: " 冯锐
2020-10-27 12:54         ` Ulf Hansson
2020-10-27 19:37           ` Christoph Hellwig
2020-10-28  2:08           ` 答复: " 冯锐
2020-10-28 10:05           ` 冯锐
2020-10-28 10:18             ` Ulf Hansson

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=20201112164213.GA16591@lst.de \
    --to=hch@lst.de \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=rui_feng@realsil.com.cn \
    --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).