Skip to content

Commit 71260a2

Browse files
maquefelgregkh
authored andcommitted
ntb: intel: Fix using link status DB's
[ Upstream commit 8144e9c ] Make sure we are not using DB's which were remapped for link status. Fixes: f6e51c3 ("ntb: intel: split out the gen3 code") Signed-off-by: Nikita Shubin <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Signed-off-by: Jon Mason <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0df2e03 commit 71260a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/ntb/hw/intel/ntb_hw_gen3.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ static int gen3_init_ntb(struct intel_ntb_dev *ndev)
215215
}
216216

217217
ndev->db_valid_mask = BIT_ULL(ndev->db_count) - 1;
218+
/* Make sure we are not using DB's used for link status */
219+
if (ndev->hwerr_flags & NTB_HWERR_MSIX_VECTOR32_BAD)
220+
ndev->db_valid_mask &= ~ndev->db_link_mask;
218221

219222
ndev->reg->db_iowrite(ndev->db_valid_mask,
220223
ndev->self_mmio +

0 commit comments

Comments
 (0)