[PATCH] nvme:fix the NVME_ID_NS_NVM_STS_MASK definition

Ankit Kumar posted 1 patch 2 years, 7 months ago
include/linux/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] nvme:fix the NVME_ID_NS_NVM_STS_MASK definition
Posted by Ankit Kumar 2 years, 7 months ago
As per NVMe command set specification 1.0c Storage tag size is 7 bits
Fixes: 4020aad85c67 ("nvme: add support for enhanced metadata")

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
---
 include/linux/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 779507ac750b..2819d6c3a6b5 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -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,
 };
-- 
2.34.1
Re: [PATCH] nvme:fix the NVME_ID_NS_NVM_STS_MASK definition
Posted by Kanchan Joshi 2 years, 7 months ago
On Fri, Jun 23, 2023 at 06:08:05PM +0530, Ankit Kumar wrote:
>As per NVMe command set specification 1.0c Storage tag size is 7 bits
>Fixes: 4020aad85c67 ("nvme: add support for enhanced metadata")
>
>Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
>---
> include/linux/nvme.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/include/linux/nvme.h b/include/linux/nvme.h
>index 779507ac750b..2819d6c3a6b5 100644
>--- a/include/linux/nvme.h
>+++ b/include/linux/nvme.h
>@@ -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).

Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Re: [PATCH] nvme:fix the NVME_ID_NS_NVM_STS_MASK definition
Posted by Keith Busch 2 years, 7 months ago
Thanks, applied.