Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Mario Limonciello <mario.limonciello@amd.com>
Cc: "Manuel Lauss" <manuel.lauss@gmail.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata: libata-scsi: Set the RMB bit only for removable media devices
Date: Thu, 13 Jun 2024 19:44:22 +0200	[thread overview]
Message-ID: <Zmsv9qPQ3DbuNmVC@x1-carbon.lan> (raw)
In-Reply-To: <20240613173352.1557847-2-cassel@kernel.org>

On Thu, Jun 13, 2024 at 07:33:53PM +0200, Niklas Cassel wrote:
> 
> This is however wrong. See "20-082r23SPC-6: Removable Medium Bit
> Expectations" which has since been integrated to SPC, which states that:
> 
> """
> Reports have been received that some USB Memory Stick device servers set
> the removable medium (RMB) bit to one. The rub comes when the medium is
> actually removed, because... The device server is removed concurrently
> with the medium removal. If there is no device server, then there is no
> device server that is waiting to have removable medium inserted.
> 
> Sufficient numbers of SCSI analysts see such a device:
> - not as a device that supports removable medium;
> but
> - as a removable, hot pluggable device.
> """
> 
> The definition of the RMB bit in the SPC specification has since been
> clarified to match this.
> 
> Thus, a USB stick should not have the RMB bit set (and neither shall an
> eSATA nor a hot-plug capable port).

Since SPC-6 does make it quite clear that USB Memory Stick device servers
should not have the RMB bit set, Thomas, may I ask what udisks is using to
automount USB sticks?

Since USB sticks that follow SPC-6 clearly cannot have RMB bit set,
which means that SCSI core will set removable:
(the equivalent of:)
/sys/devices/pci0000:00/0000:00:04.0/ata3/host2/target2:0:0/2:0:0:0/block/sda/removable
to 0.


Kind regards,
Niklas

  parent reply	other threads:[~2024-06-13 17:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 17:33 [PATCH] ata: libata-scsi: Set the RMB bit only for removable media devices Niklas Cassel
2024-06-13 17:35 ` Mario Limonciello
2024-06-13 17:40 ` Thomas Weißschuh
2024-06-13 17:44 ` Niklas Cassel [this message]
2024-06-13 17:49   ` Thomas Weißschuh
2024-06-13 18:00     ` Niklas Cassel
2024-06-13 19:00 ` Sergei Shtylyov
2024-06-14 12:03   ` Niklas Cassel

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=Zmsv9qPQ3DbuNmVC@x1-carbon.lan \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=manuel.lauss@gmail.com \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.com \
    /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