ntb: intel: Fix using link status DB's
Subsystems (2)
PATCH 1/1 ntb: intel: Fix using link status DB's
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 <[email protected]>
---
Hello Dave, sending a patch as planned.
Thank you for looking into this!
--- drivers/ntb/hw/intel/ntb_hw_gen3.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/ntb/hw/intel/ntb_hw_gen3.c +3 -0
@@ -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,
Signature · 1 line
Nikita Shubin <[email protected]>
Quoted 6 lines · On 6/6/24 1:15 AM, Nikita Shubin via B4 Relay wrote:
From: Nikita Shubin <[email protected]>
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 <[email protected]>
Thank you for the patch.
Reviewed-by Dave Jiang <[email protected]>
Quoted 30 lines
---
Hello Dave, sending a patch as planned.Thank you for looking into this!
--- drivers/ntb/hw/intel/ntb_hw_gen3.c | 3 +++ 1 file changed, 3 insertions(+)drivers/ntb/hw/intel/ntb_hw_gen3.c +3
-1@@ -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-036299fabc48Best regards,