From: Jane Chu <jane.chu@oracle.com>
To: linux-nvdimm@lists.01.org
Cc: jane.chu@oracle.com
Subject: [ndctl PATCH] ndctl/dimm: Fix submit_abort_firmware()
Date: Mon, 21 Dec 2020 17:57:04 -0700 [thread overview]
Message-ID: <20201222005704.2355076-1-jane.chu@oracle.com> (raw)
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
reply other threads:[~2020-12-22 0:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201222005704.2355076-1-jane.chu@oracle.com \
--to=jane.chu@oracle.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox