]> 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)
commit19a225ca7831d15cb7ce0637e01227c44d37ae5d
treeb7a87780c3cbbf08114e3b0c91075cb6950bd506
parentdfcd6fc1771cf237f040d5fc0f8c244eb475c8ad
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