linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH] ndctl/dimm: Fix submit_abort_firmware()
@ 2020-12-22  0:57 Jane Chu
  0 siblings, 0 replies; only message in thread
From: Jane Chu @ 2020-12-22  0:57 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: jane.chu

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 <mark.a.baker@oracle.com>
Signed-off-by: Jane Chu <jane.chu@oracle.com>
---
 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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-22  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22  0:57 [ndctl PATCH] ndctl/dimm: Fix submit_abort_firmware() Jane Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).