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]>
---
Hello Dave, sending a patch as planned.
Thank you for looking into this!
Link: https://lore.kernel.org/all/[email protected]/
---
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 <[email protected]>
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]>
> ---
> Hello Dave, sending a patch as planned.
>
> Thank you for looking into this!
>
> Link: https://lore.kernel.org/all/[email protected]/
> ---
> 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,