From: Dave Jiang <dave.jiang@intel.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>,
ntb@lists.linux.dev, lpieralisi@kernel.org, jdmason@kudzu.us,
allenbh@gmail.com, bhelgaas@google.com
Cc: alok.a.tiwarilinux@gmail.com
Subject: Re: [PATCH] NTB: epf: log teardown command failures with error code
Date: Wed, 8 Apr 2026 08:35:12 -0700 [thread overview]
Message-ID: <f146e5ad-03f9-4264-96d9-90e17e255335@intel.com> (raw)
In-Reply-To: <20260408055002.436349-1-alok.a.tiwari@oracle.com>
On 4/7/26 10:49 PM, Alok Tiwari wrote:
> ntb_epf_mw_clear_trans() initializes ret to 0 and never updates it, so it
> ignores failures from ntb_epf_send_command() and always returns 0.
> Capture the command status, return it to the caller, and log the MW index
> and error code on failure.
>
> Fixes: 812ce2f8d14e ("NTB: Add support for EPF PCI Non-Transparent Bridge")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/ntb/hw/epf/ntb_hw_epf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ntb/hw/epf/ntb_hw_epf.c b/drivers/ntb/hw/epf/ntb_hw_epf.c
> index d3ecf25a5162..0c8fc459eb7a 100644
> --- a/drivers/ntb/hw/epf/ntb_hw_epf.c
> +++ b/drivers/ntb/hw/epf/ntb_hw_epf.c
> @@ -438,11 +438,11 @@ static int ntb_epf_mw_clear_trans(struct ntb_dev *ntb, int pidx, int idx)
> {
> struct ntb_epf_dev *ndev = ntb_ndev(ntb);
> struct device *dev = ndev->dev;
> - int ret = 0;
> + int ret;
>
> - ntb_epf_send_command(ndev, CMD_TEARDOWN_MW, idx);
> + ret = ntb_epf_send_command(ndev, CMD_TEARDOWN_MW, idx);
> if (ret)
> - dev_err(dev, "Failed to teardown memory window\n");
> + dev_err(dev, "Failed to teardown memory window %d err %d\n", idx, ret);
>
> return ret;
> }
prev parent reply other threads:[~2026-04-08 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 5:49 [PATCH] NTB: epf: log teardown command failures with error code Alok Tiwari
2026-04-08 15:35 ` Dave Jiang [this message]
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=f146e5ad-03f9-4264-96d9-90e17e255335@intel.com \
--to=dave.jiang@intel.com \
--cc=allenbh@gmail.com \
--cc=alok.a.tiwari@oracle.com \
--cc=alok.a.tiwarilinux@gmail.com \
--cc=bhelgaas@google.com \
--cc=jdmason@kudzu.us \
--cc=lpieralisi@kernel.org \
--cc=ntb@lists.linux.dev \
/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