Skip to content

Commit ba5cb47

Browse files
Subbaraya SundeepPaolo Abeni
authored andcommitted
octeontx2-af: Send Link events one by one
Send link events one after another otherwise new message is overwriting the message which is being processed by PF. Fixes: a88e0f9 ("octeontx2: Detect the mbox up or down message via register") Signed-off-by: Subbaraya Sundeep <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 5cdb2c7 commit ba5cb47

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
143143

144144
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
145145

146+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
147+
146148
mutex_unlock(&rvu->mbox_lock);
147149

148150
return 0;

drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
272272

273273
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pfid);
274274

275+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pfid);
276+
275277
mutex_unlock(&rvu->mbox_lock);
276278
} while (pfmap);
277279
}

drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ static int rvu_rep_up_notify(struct rvu *rvu, struct rep_event *event)
6060

6161
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
6262

63+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
64+
6365
mutex_unlock(&rvu->mbox_lock);
6466
return 0;
6567
}

0 commit comments

Comments
 (0)