libndctl: Fix probe of non-nfit nvdimms
PATCH 1/1 libndctl: Fix probe of non-nfit nvdimms
commit 107a24ff429f ("ndctl/list: Add firmware activation enumeration") introduced changes in add_dimm() to enumerate the status of firmware activation. However a branch added in that commit broke the probe for non-nfit nvdimms like one provided by papr-scm. This cause an error reported when listing namespaces like below:
$ sudo ndctl list libndctl: add_dimm: nmem0: probe failed: No such device libndctl: __sysfs_device_parse: nmem0: add_dev() failed
Do a fix for this by removing the offending branch in the add_dimm() patch. This continues the flow of add_dimm() probe even if the nfit is not detected on the associated bus.
--- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-)
ndctl/lib/libndctl.c +0 -3
@@ -1875,9 +1875,6 @@ static void *add_dimm(void *parent, int id, const char *dimm_base)else dimm->fwa_result =fwa_result_to_result (buf); -if (!ndctl_bus_has_nfit (bus)) - goto out; -/* Check if the given dimm supports nfit */ if (ndctl_bus_has_nfit (bus)) { dimm->formats = formats;
Signature · 4 lines
2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Verma, Vishal L
maintainerQuoted 14 lines · Vaibhav Jain
commit
107a24ff429f("ndctl/list: Add firmware activation enumeration") introduced changes inadd_dimm()to enumerate the status of firmware activation. However a branch added in that commit broke the probe for non-nfit nvdimms like one provided by papr-scm. This cause an error reported when listing namespaces like below:$ sudo ndctl list libndctl: add_dimm: nmem0: probe failed: No such device libndctl: __sysfs_device_parse: nmem0: add_dev() failedDo a fix for this by removing the offending branch in the
add_dimm()patch. This continues the flow ofadd_dimm()probe even if the nfit is not detected on the associated bus.
Quoted 5 lines
Fixes 107a24ff429fa("ndctl/list: Add firmware activation enumeration")Signed-off-by Vaibhav Jain <[email protected]>--- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-)
Ah apologies - this snuck in when I reflowed Dan's patches on top of the papr work for v70.
I expect you'd like a point release with this fix asap?
Is there a way for me to incorporate some papr unit tests into my release workflow so I can avoid breaking things like this again?
I'll also try to do a better job of pushing things out to the pending branch more frequently so if you're monitoring that branch, hopefully things like this will get caught before a release happens :)
Quoted 6 lines
ndctl/lib/libndctl.c +0
-0
ndctl/lib/libndctl.c static void *add_dimm(void *parent, int id, const char *dimm_base) · line 1880
Quoted 9 lines
ndctl/lib/libndctl.c +0
-3@@ -1875,9 +1875,6 @@ static void *add_dimm(void *parent, int id, const char *dimm_base)else dimm->fwa_result =fwa_result_to_result (buf); -if (!ndctl_bus_has_nfit (bus)) - goto out; -/* Check if the given dimm supports nfit */ if (ndctl_bus_has_nfit (bus)) { dimm->formats = formats;
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 25 lines · Vishal L
Quoted 14 lines · Vaibhav Jain
commit
107a24ff429f("ndctl/list: Add firmware activation enumeration") introduced changes inadd_dimm()to enumerate the status of firmware activation. However a branch added in that commit broke the probe for non-nfit nvdimms like one provided by papr-scm. This cause an error reported when listing namespaces like below:$ sudo ndctl list libndctl: add_dimm: nmem0: probe failed: No such device libndctl: __sysfs_device_parse: nmem0: add_dev() failedDo a fix for this by removing the offending branch in the
add_dimm()patch. This continues the flow ofadd_dimm()probe even if the nfit is not detected on the associated bus.Quoted 5 lines
Fixes 107a24ff429fa("ndctl/list: Add firmware activation enumeration")Signed-off-by Vaibhav Jain <[email protected]>--- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-)Ah apologies - this snuck in when I reflowed Dan's patches on top of the papr work for v70.
Quoted 8 lines
I expect you'd like a point release with this fix asap?
Is there a way for me to incorporate some papr unit tests into my release workflow so I can avoid breaking things like this again?
I'll also try to do a better job of pushing things out to the pending branch more frequently so if you're monitoring that branch, hopefully things like this will get caught before a release happens :)
Would be nice to have something like a papr_test next to nfit_test for such regression testing. These kinds of mistakes are really only avoidable with regression tests.
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Hi Dan and Vishal,
Thanks so much for quick turnaround on this.
Quoted 18 lines · Dan Williams
Quoted 16 lines · Vishal L
Quoted 14 lines · Vaibhav Jain
commit
107a24ff429f("ndctl/list: Add firmware activation enumeration") introduced changes inadd_dimm()to enumerate the status of firmware activation. However a branch added in that commit broke the probe for non-nfit nvdimms like one provided by papr-scm. This cause an error reported when listing namespaces like below:$ sudo ndctl list libndctl: add_dimm: nmem0: probe failed: No such device libndctl: __sysfs_device_parse: nmem0: add_dev() failedDo a fix for this by removing the offending branch in the
add_dimm()patch. This continues the flow ofadd_dimm()probe even if the nfit is not detected on the associated bus.
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Fixes 107a24ff429fa("ndctl/list: Add firmware activation enumeration")Signed-off-by Vaibhav Jain <[email protected]>--- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-)Ah apologies - this snuck in when I reflowed Dan's patches on top of the papr work for v70.
No worries :-)
Quoted 2 lines
Quoted 2 lines
I expect you'd like a point release with this fix asap?
Yes, that will be great. Thanks
Quoted 7 lines
Quoted 7 lines
Is there a way for me to incorporate some papr unit tests into my release workflow so I can avoid breaking things like this again?
I'll also try to do a better job of pushing things out to the pending branch more frequently so if you're monitoring that branch, hopefully things like this will get caught before a release happens :)
Fully agree, if that happens we can incorporate it into our CI system to ensure that such regressions are caught early on before any release is tagged.
Quoted 4 lines
Would be nice to have something like a
papr_testnext tonfit_testfor such regression testing. These kinds of mistakes are really only avoidable with regression tests.
Yes Agree, fortunatly Santosh has recently posted an RFC patchset implementing such tests at [1]. Once that gets merged, can used to perform regression testing.
[1] "testing/nvdimm: Add test module for non-nfit platforms"
https://lore.kernel.org/linux-nvdimm/[email protected]/
Signature · 5 lines
Cheers ~ Vaibhav _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 54 lines · Vaibhav Jain
Hi Dan and Vishal,
Thanks so much for quick turnaround on this.
Quoted 18 lines · Dan Williams
Quoted 16 lines · Vishal L
Quoted 14 lines · Vaibhav Jain
commit
107a24ff429f("ndctl/list: Add firmware activation enumeration") introduced changes inadd_dimm()to enumerate the status of firmware activation. However a branch added in that commit broke the probe for non-nfit nvdimms like one provided by papr-scm. This cause an error reported when listing namespaces like below:$ sudo ndctl list libndctl: add_dimm: nmem0: probe failed: No such device libndctl: __sysfs_device_parse: nmem0: add_dev() failedDo a fix for this by removing the offending branch in the
add_dimm()patch. This continues the flow ofadd_dimm()probe even if the nfit is not detected on the associated bus.Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Fixes 107a24ff429fa("ndctl/list: Add firmware activation enumeration")Signed-off-by Vaibhav Jain <[email protected]>--- ndctl/lib/libndctl.c | 3 --- 1 file changed, 3 deletions(-)Ah apologies - this snuck in when I reflowed Dan's patches on top of the papr work for v70.
No worries :-)
Quoted 2 lines
Quoted 2 lines
I expect you'd like a point release with this fix asap?
Yes, that will be great. Thanks
Quoted 7 lines
Quoted 7 lines
Is there a way for me to incorporate some papr unit tests into my release workflow so I can avoid breaking things like this again?
I'll also try to do a better job of pushing things out to the pending branch more frequently so if you're monitoring that branch, hopefully things like this will get caught before a release happens :)
Fully agree, if that happens we can incorporate it into our CI system to ensure that such regressions are caught early on before any release is tagged.
Quoted 4 lines
Would be nice to have something like a
papr_testnext tonfit_testfor such regression testing. These kinds of mistakes are really only avoidable with regression tests.
Quoted 7 lines
Yes Agree, fortunatly Santosh has recently posted an RFC patchset implementing such tests at [1]. Once that gets merged, can used to perform regression testing.
[1] "testing/nvdimm: Add test module for non-nfit platforms"
https://lore.kernel.org/linux-nvdimm/[email protected]/
Thanks Vaibhav to point that out.
Dan/Vishal/Ira,
If you could provide your comments on the above RFC we could move forward on this.
Thanks,
Santosh
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]