Skip to contentSkip to conversation

nvme:fix the NVME_ID_NS_NVM_STS_MASK definition

PATCH Applied Ankit Kumar 3 participants 3 messages Jun 23, 2023 – Jul 10, 2023 1 message not in the archive NVMe

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20230623071848epcas5p10d8edb4c9c8673ba612f4b81119ed2fb@epcas5p1.samsung.com

#1 lore raw

PATCH 1/1 nvme:fix the NVME_ID_NS_NVM_STS_MASK definition

As per NVMe command set specification 1.0c Storage tag size is 7 bits

Fixes 4020aad85c67 ("nvme: add support for enhanced metadata")
---
 include/linux/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/nvme.h +1 -1
index 779507ac750b..2819d6c3a6b5 100644
@@ -473,7 +473,7 @@ struct nvme_id_ns_nvm {
 };
 
 enum {
-	NVME_ID_NS_NVM_STS_MASK		= 0x3f,
+	NVME_ID_NS_NVM_STS_MASK		= 0x7f,
 	NVME_ID_NS_NVM_GUARD_SHIFT	= 7,
 	NVME_ID_NS_NVM_GUARD_MASK	= 0x3,
 };
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#2 lore raw
Quoted 13 lines · Ankit Kumar

As per NVMe command set specification 1.0c Storage tag size is 7 bits

Fixes 4020aad85c67 ("nvme: add support for enhanced metadata")

---
include/linux/nvme.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/nvme.h +0 -0
index 779507ac750b..2819d6c3a6b5 100644

include/linux/nvme.h struct nvme_id_ns_nvm { · line 476

Quoted 5 lines
include/linux/nvme.h +1 -1
@@ -473,7 +473,7 @@ struct nvme_id_ns_nvm {
 };
 
 enum {
-	NVME_ID_NS_NVM_STS_MASK		= 0x3f,
+	NVME_ID_NS_NVM_STS_MASK		= 0x7f,

Right, 7 bits are needed there to speak the max possible value (i.e.,64).