Re: [PATCH 3/3] mmc: rtsx: Add SD Express mode support for RTS5261

From: Christoph Hellwig
Date: Fri Oct 23 2020 - 05:14:17 EST


On Fri, Oct 23, 2020 at 10:02:15AM +0200, Ulf Hansson wrote:
> > > Is there no mechanism to support read-only PCIe/NVMe based storage devices?
> > > If that is the case, maybe it's simply better to not support the readonly option
> > > at all for SD express cards?
> > >
> > I think there's no mechanism to support read-only PCIe/NVMe based storage devices.
>
> I have looped in Christoph, maybe he can give us his opinion on this.

NVMe namespaces can have a bunch of 'write protection' modes advertised
by the controller, which Linux respects. The controller in this case would
be part of the SD-Card. IMHO it is a quality of implementation issue
of the SD-Card/Controller to have the the write protection mode of the
namespace(s) match that of the SD interface, and the SD card spec should
talk about that if it doesn't already.