Skip to content

Commit

Permalink
NTB: Enable link up and down event notification
Browse files Browse the repository at this point in the history
Link-Up and Link-Down events can occur irrespective
of whether a data transfer is in progress or not.
So we need to enable the interrupt delivery for
these events early during driver load.

Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Arindam Nath authored and Jon Mason committed Mar 13, 2020
1 parent 52ba447 commit 8a7cede
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/ntb/hw/amd/ntb_hw_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ static enum ntb_topo amd_get_topo(struct amd_ntb_dev *ndev)

static int amd_init_dev(struct amd_ntb_dev *ndev)
{
void __iomem *mmio = ndev->self_mmio;
struct pci_dev *pdev;
int rc = 0;

Expand All @@ -1015,6 +1016,10 @@ static int amd_init_dev(struct amd_ntb_dev *ndev)

ndev->db_valid_mask = BIT_ULL(ndev->db_count) - 1;

/* Enable Link-Up and Link-Down event interrupts */
ndev->int_mask &= ~(AMD_LINK_UP_EVENT | AMD_LINK_DOWN_EVENT);
writel(ndev->int_mask, mmio + AMD_INTMASK_OFFSET);

return 0;
}

Expand Down

0 comments on commit 8a7cede

Please sign in to comment.