commit f86369ea29e2 ("ndctl: merge firmware-update into dimm.c as another dimm
operation")
introduces submit_abort_firmware() that calls
ndctl_cmd_fw_xlat_firmware_status() to parse status returned
from a firmware abort action. The callee returns FW_ notion of enum,
but the caller checks for ND_CMD_STATUS_FIN_ABORTED which is a bit mask.
So firmware abort always "fails" even when it succeeds.
Fixes: f86369ea29e2 ("ndctl: merge firmware-update into dimm.c as another dimm
operation")
Tested-by: Mark Baker <[email protected]>
Signed-off-by: Jane Chu <[email protected]>
---
ndctl/dimm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ndctl/dimm.c b/ndctl/dimm.c
index 8bb7f672e35c..255dbe156a34 100644
--- a/ndctl/dimm.c
+++ b/ndctl/dimm.c
@@ -531,7 +531,7 @@ static int submit_abort_firmware(struct ndctl_dimm *dimm,
goto out;
status = ndctl_cmd_fw_xlat_firmware_status(cmd);
- if (!(status & ND_CMD_STATUS_FIN_ABORTED)) {
+ if (status != FW_ABORTED) {
fprintf(stderr,
"Firmware update abort on DIMM %s failed: %#x\n",
ndctl_dimm_get_devname(dimm), status);
--
2.18.4
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]