From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: [PATCH v1 2/9] scsi: define depopulation capabilities related service actions
Date: Mon, 6 Jul 2026 15:56:03 +0900 [thread overview]
Message-ID: <20260706065610.3559692-3-dlemoal@kernel.org> (raw)
In-Reply-To: <20260706065610.3559692-1-dlemoal@kernel.org>
Add to include/scsi/scsi_proto.h the definition of the four service
actions of the SERVICE ACTION IN (16) command for the storage element
depopulation and restoration capabilities, as defined in the SBC5 and
ZBC2 specifications. These are:
- SAI_GET_PHYSICAL_ELEMENT_STATUS (GET PHYSICAL ELEMENT STATUS command)
- SAI_REMOVE_ELEMENT_AND_TRUNCATE (REMOVE ELEMENT AND TRUNCATE command)
- SAI_RESTORE_ELEMENTS_AND_REBUILD (RESTORE ELEMENTS AND REBUILD command)
- SAI_REMOVE_ELEMENT_AND_MODIFY_ZONES (REMOVE ELEMENT AND MODIFY ZONES
command)
The physical element types and physical element health values reported by
the GET PHYSICAL ELEMENT STATUS command are also defined.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
include/scsi/scsi_proto.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h
index 965cde7ebc5b..c6b4a4dc8d9c 100644
--- a/include/scsi/scsi_proto.h
+++ b/include/scsi/scsi_proto.h
@@ -129,6 +129,10 @@
#define SAI_GET_LBA_STATUS 0x12
#define SAI_REPORT_REFERRALS 0x13
#define SAI_GET_STREAM_STATUS 0x16
+#define SAI_GET_PHYSICAL_ELEMENT_STATUS 0x17
+#define SAI_REMOVE_ELEMENT_AND_TRUNCATE 0x18
+#define SAI_RESTORE_ELEMENTS_AND_REBUILD 0x19
+#define SAI_REMOVE_ELEMENT_AND_MODIFY_ZONES 0x1a
/* values for maintenance in */
#define MI_REPORT_IDENTIFYING_INFORMATION 0x05
#define MI_REPORT_TARGET_PGS 0x0a
@@ -464,6 +468,25 @@ enum zbc_zone_alignment_method {
ZBC_CONSTANT_ZONE_START_OFFSET = 0x8,
};
+/* SCSI physical element types */
+enum scsi_phys_element_type {
+ SCSI_PHYS_ELEM_TYPE_ALL_ACCESS_STORAGE = 0x1,
+ SCSI_PHYS_ELEM_TYPE_FRAC_ACCESS_STORAGE = 0x2,
+};
+
+/* SCSI physical element health. */
+enum scsi_phys_element_health {
+ SCSI_PHYS_ELEM_HEALTH_NOT_REPORTED = 0x00,
+ SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS = 0x01,
+ SCSI_PHYS_ELEM_HEALTH_AT_SPEC_LIMITS = 0x64,
+ SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS = 0x65,
+ SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_ERR = 0xFB,
+ SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_IN_PROGRESS = 0xFC,
+ SCSI_PHYS_ELEM_HEALTH_DEPOP_ERR = 0xFD,
+ SCSI_PHYS_ELEM_HEALTH_DEPOP_IN_PROGRESS = 0xFE,
+ SCSI_PHYS_ELEM_HEALTH_DEPOP_OK = 0xFF,
+};
+
/* Version descriptor values for INQUIRY */
enum scsi_version_descriptor {
SCSI_VERSION_DESCRIPTOR_FCP4 = 0x0a40,
--
2.54.0
next prev parent reply other threads:[~2026-07-06 6:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 6:56 [PATCH v1 0/9] ATA support for storage element management commands Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 1/9] scsi: scsi_debug: move ASC and ASCQ definitions to scsi_proto.h Damien Le Moal
2026-07-06 8:29 ` Hannes Reinecke
2026-07-06 8:55 ` Damien Le Moal
2026-07-06 8:44 ` Hannes Reinecke
2026-07-06 9:00 ` Damien Le Moal
2026-07-06 6:56 ` Damien Le Moal [this message]
2026-07-06 6:56 ` [PATCH v1 3/9] ata: libata: improve the definition of device flags Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 4/9] ata: libata-scsi: improve ata_get_xlat_func Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 5/9] ata: libata-core: detect support for depopulation capabilities Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 6/9] ata: libata-scsi: add support for the GET PHYSICAL ELEMENT STATUS command Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 7/9] ata: libata-scsi: add support for the REMOVE ELEMENT AND TRUNCATE command Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 8/9] ata: libata-scsi: add support for the RESTORE ELEMENTS AND REBUILD command Damien Le Moal
2026-07-06 6:56 ` [PATCH v1 9/9] ata: libata-scsi: add support for the REMOVE ELEMENT AND MODIFY ZONES command Damien Le Moal
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=20260706065610.3559692-3-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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