linux/drivers/net/ethernet/marvell/octeontx2/af
Hariprasad Kelam 66a5209b53 octeontx2-pf: Fix synchnorization issue in mbox
Mbox implementation in octeontx2 driver has three states
alloc, send and reset in mbox response. VF allocate and
sends message to PF for processing, PF ACKs them back and
reset the mbox memory. In some case we see synchronization
issue where after msgs_acked is incremented and before
mbox_reset API is called, if current execution is scheduled
out and a different thread is scheduled in which checks for
msgs_acked. Since the new thread sees msgs_acked == msgs_sent
it will try to allocate a new message and to send a new mbox
message to PF.Now if mbox_reset is scheduled in, PF will see
'0' in msgs_send.
This patch fixes the issue by calling mbox_reset before
incrementing msgs_acked flag for last processing message and
checks for valid message size.

Fixes: d424b6c02 ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-30 15:07:19 -07:00
..
cgx_fw_if.h octeontx2-af: Optimize data retrieval from firmware 2020-03-02 11:08:51 -08:00
cgx.c octeontx2-af: Optimize data retrieval from firmware 2020-03-02 11:08:51 -08:00
cgx.h octeontx2-af: Optimize data retrieval from firmware 2020-03-02 11:08:51 -08:00
common.h octeontx2-af: change (struct qmem)->entry_sz from u8 to u16 2020-06-18 20:46:23 -07:00
Makefile octeontx2-af: Dump current resource provisioning status 2019-11-14 18:09:15 -08:00
mbox.c octeontx2-pf: Fix synchnorization issue in mbox 2020-09-30 15:07:19 -07:00
mbox.h octeontx2-pf: Fix synchnorization issue in mbox 2020-09-30 15:07:19 -07:00
npc_profile.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
npc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
rvu_cgx.c octeontx2-af: Pause frame configuration at cgx 2020-03-02 11:08:51 -08:00
rvu_debugfs.c octeontx2-af: Add NPC MCAM entry allocation status to debugfs 2019-11-14 18:09:15 -08:00
rvu_nix.c octeontx2-af: Fix enable/disable of default NPC entries 2020-09-30 15:07:19 -07:00
rvu_npa.c octeontx2-af: Interface backpressure configuration 2020-03-02 11:08:51 -08:00
rvu_npc.c octeontx2-af: Fix enable/disable of default NPC entries 2020-09-30 15:07:19 -07:00
rvu_reg.c octeontx2-af: NIX Tx scheduler queue config support 2018-10-22 20:15:37 -07:00
rvu_reg.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
rvu_struct.h octeontx2-af: Set discovery ID for RVUM block 2020-03-02 11:08:51 -08:00
rvu.c octeontx2-af: Remove driver version and fix authorship 2020-03-23 21:11:44 -07:00
rvu.h octeontx2-af: Fix enable/disable of default NPC entries 2020-09-30 15:07:19 -07:00