Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask'
acceptable by papr_scm. This is needed as since commit
92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm
performs a validation of 'nd_cmd_pkg.nd_family' received as part of
ND_CMD_CALL processing to ensure only known command families can use
the general ND_CMD_CALL pass-through functionality.
Without this change the ND_CMD_CALL pass-through targeting
NVDIMM_FAMILY_PAPR error out with -EINVAL.
Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices")
Signed-off-by: Vaibhav Jain <redacted>
---
arch/powerpc/platforms/pseries/papr_scm.c | 3 +++
1 file changed, 3 insertions(+)
@@ -898,6 +898,9 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)p->bus_desc.of_node=p->pdev->dev.of_node;p->bus_desc.provider_name=kstrdup(p->pdev->name,GFP_KERNEL);+/* Set the dimm command family mask to accept PDSMs */+set_bit(NVDIMM_FAMILY_PAPR,&p->bus_desc.dimm_family_mask);+if(!p->bus_desc.provider_name)return-ENOMEM;
Hi Dan, Ira and Vishal,
Can you please take a look at this patch. Without it the functionality
to report nvdimm health via ndctl breaks on 5.9
Thanks,
~ Vaibhav
Vaibhav Jain [off-list ref] writes:
quoted hunk
Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask'
acceptable by papr_scm. This is needed as since commit
92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm
performs a validation of 'nd_cmd_pkg.nd_family' received as part of
ND_CMD_CALL processing to ensure only known command families can use
the general ND_CMD_CALL pass-through functionality.
Without this change the ND_CMD_CALL pass-through targeting
NVDIMM_FAMILY_PAPR error out with -EINVAL.
Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices")
Signed-off-by: Vaibhav Jain <redacted>
---
arch/powerpc/platforms/pseries/papr_scm.c | 3 +++
1 file changed, 3 insertions(+)
@@ -898,6 +898,9 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)p->bus_desc.of_node=p->pdev->dev.of_node;p->bus_desc.provider_name=kstrdup(p->pdev->name,GFP_KERNEL);+/* Set the dimm command family mask to accept PDSMs */+set_bit(NVDIMM_FAMILY_PAPR,&p->bus_desc.dimm_family_mask);+if(!p->bus_desc.provider_name)return-ENOMEM;
Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask'
acceptable by papr_scm. This is needed as since commit
92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm
performs a validation of 'nd_cmd_pkg.nd_family' received as part of
ND_CMD_CALL processing to ensure only known command families can use
the general ND_CMD_CALL pass-through functionality.
Without this change the ND_CMD_CALL pass-through targeting
NVDIMM_FAMILY_PAPR error out with -EINVAL.
Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices")
Signed-off-by: Vaibhav Jain <redacted>
@@ -898,6 +898,9 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)p->bus_desc.of_node=p->pdev->dev.of_node;p->bus_desc.provider_name=kstrdup(p->pdev->name,GFP_KERNEL);+/* Set the dimm command family mask to accept PDSMs */+set_bit(NVDIMM_FAMILY_PAPR,&p->bus_desc.dimm_family_mask);+if(!p->bus_desc.provider_name)return-ENOMEM;
From: Michael Ellerman <hidden> Date: 2020-10-09 06:22:44
On Mon, 14 Sep 2020 02:49:04 +0530, Vaibhav Jain wrote:
Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask'
acceptable by papr_scm. This is needed as since commit
92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm
performs a validation of 'nd_cmd_pkg.nd_family' received as part of
ND_CMD_CALL processing to ensure only known command families can use
the general ND_CMD_CALL pass-through functionality.
[...]