mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Shubin via B4 Relay <devnull+n.shubin.yadro.com@kernel.org>
To: Dave Jiang <dave.jiang@intel.com>, Jon Mason <jdmason@kudzu.us>,
	 Allen Hubbe <allenbh@gmail.com>
Cc: Nikita Shubin <nikita.shubin@maquefel.me>,
	ntb@lists.linux.dev,  linux-kernel@vger.kernel.org,
	linux@yadro.com,  Nikita Shubin <n.shubin@yadro.com>
Subject: [PATCH] ntb: intel: Fix using link status DB's
Date: Thu, 06 Jun 2024 11:15:19 +0300	[thread overview]
Message-ID: <20240606-ntb_intel_db_fix-v1-1-ba9033aea289@yadro.com> (raw)

From: Nikita Shubin <n.shubin@yadro.com>

Make sure we are not using DB's which were remapped for link status.

Fixes: f6e51c354b60 ("ntb: intel: split out the gen3 code")
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
---
Hello Dave, sending a patch as planned.

Thank you for looking into this!

Link: https://lore.kernel.org/all/686c55cc658564e8f37147e0d6d5ab62bb8372af.camel@maquefel.me/
---
 drivers/ntb/hw/intel/ntb_hw_gen3.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/ntb/hw/intel/ntb_hw_gen3.c b/drivers/ntb/hw/intel/ntb_hw_gen3.c
index ffcfc3e02c35..a5aa96a31f4a 100644
--- a/drivers/ntb/hw/intel/ntb_hw_gen3.c
+++ b/drivers/ntb/hw/intel/ntb_hw_gen3.c
@@ -215,6 +215,9 @@ static int gen3_init_ntb(struct intel_ntb_dev *ndev)
 	}
 
 	ndev->db_valid_mask = BIT_ULL(ndev->db_count) - 1;
+	/* Make sure we are not using DB's used for link status */
+	if (ndev->hwerr_flags & NTB_HWERR_MSIX_VECTOR32_BAD)
+		ndev->db_valid_mask &= ~ndev->db_link_mask;
 
 	ndev->reg->db_iowrite(ndev->db_valid_mask,
 			      ndev->self_mmio +

---
base-commit: 2df0193e62cf887f373995fb8a91068562784adc
change-id: 20240606-ntb_intel_db_fix-036299fabc48

Best regards,
-- 
Nikita Shubin <n.shubin@yadro.com>



             reply	other threads:[~2024-06-06  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06  8:15 Nikita Shubin via B4 Relay [this message]
2024-06-06 16:42 ` Dave Jiang

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=20240606-ntb_intel_db_fix-v1-1-ba9033aea289@yadro.com \
    --to=devnull+n.shubin.yadro.com@kernel.org \
    --cc=allenbh@gmail.com \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=n.shubin@yadro.com \
    --cc=nikita.shubin@maquefel.me \
    --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

all inboxes | Powered by JetHome®