]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Wait for TX link idle for credits change
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Wed, 25 Aug 2021 05:46:21 +0000 (11:16 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Aug 2021 11:05:54 +0000 (12:05 +0100)
commit685db64c27abd6024aee1af55a5382d77d5a3d9d
treeb7a87780c3cbbf08114e3b0c91075cb6950bd506
parent1eb47160a9779ca46b3b82a119cd04ca02a2a3fd
octeontx2-af: Wait for TX link idle for credits change

NIX_AF_TX_LINKX_NORM_CREDIT holds running counter of
tx credits available per link. But, tx credits should be
configured based on MTU config. So MTU change needs tx
credit count update.

An issue exists whereby when both PF & VF are enabled and
PF traffic is flowing, if VF requests for MTU update,
updating the NORM_CREDIT register will lead to corruption
of credit count and subsequent deadlock of tx link as
the NORM_CREDIT register holds running count.

This patch provides workaround by pausing link traffic
using NIX_AF_TL1X_SW_XOFF, waiting for existing packets to
drain, and used credits be returned before updating new
credit count.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c