Skip to content

Commit 8a7cede

Browse files
amd-anathjonmason
authored andcommitted
NTB: Enable link up and down event notification
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 <[email protected]> Signed-off-by: Jon Mason <[email protected]>
1 parent 52ba447 commit 8a7cede

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/ntb/hw/amd/ntb_hw_amd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ static enum ntb_topo amd_get_topo(struct amd_ntb_dev *ndev)
994994

995995
static int amd_init_dev(struct amd_ntb_dev *ndev)
996996
{
997+
void __iomem *mmio = ndev->self_mmio;
997998
struct pci_dev *pdev;
998999
int rc = 0;
9991000

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

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

1019+
/* Enable Link-Up and Link-Down event interrupts */
1020+
ndev->int_mask &= ~(AMD_LINK_UP_EVENT | AMD_LINK_DOWN_EVENT);
1021+
writel(ndev->int_mask, mmio + AMD_INTMASK_OFFSET);
1022+
10181023
return 0;
10191024
}
10201025

0 commit comments

Comments
 (0)