Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Octeontx2-af: Fix NIX X2P calibration failures

Before configuring the NIX block, the AF driver initiates the
"NIX block X2P bus calibration" and verifies that NIX interfaces
such as CGX and LBK are active and functioning correctly.

On few silicon variants(CNF10KA and CNF10KB), X2P calibration failures
have been observed on some CGX blocks that are not mapped to the NIX block.

Since both NIX-mapped and non-NIX-mapped CGX blocks share the same
VENDOR,DEVICE,SUBSYS_DEVID, it's not possible to skip probe based on
these parameters.

This patch introuduces "is_cgx_mapped_to_nix" API to detect and skip
probe of non NIX mapped CGX blocks.

Fixes: aba53d5dbcea ("octeontx2-af: NIX block admin queue init")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://patch.msgid.link/20250822105805.2236528-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hariprasad Kelam and committed by
Jakub Kicinski
d280233f ec79003c

+21
+7
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
··· 1978 1978 goto err_release_regions; 1979 1979 } 1980 1980 1981 + if (!is_cn20k(pdev) && 1982 + !is_cgx_mapped_to_nix(pdev->subsystem_device, cgx->cgx_id)) { 1983 + dev_notice(dev, "CGX %d not mapped to NIX, skipping probe\n", 1984 + cgx->cgx_id); 1985 + goto err_release_regions; 1986 + } 1987 + 1981 1988 cgx->lmac_count = cgx->mac_ops->get_nr_lmacs(cgx); 1982 1989 if (!cgx->lmac_count) { 1983 1990 dev_notice(dev, "CGX %d LMAC count is zero, skipping probe\n", cgx->cgx_id);
+14
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
··· 783 783 return false; 784 784 } 785 785 786 + static inline bool is_cgx_mapped_to_nix(unsigned short id, u8 cgx_id) 787 + { 788 + /* On CNF10KA and CNF10KB silicons only two CGX blocks are connected 789 + * to NIX. 790 + */ 791 + if (id == PCI_SUBSYS_DEVID_CNF10K_A || id == PCI_SUBSYS_DEVID_CNF10K_B) 792 + return cgx_id <= 1; 793 + 794 + return !(cgx_id && !(id == PCI_SUBSYS_DEVID_96XX || 795 + id == PCI_SUBSYS_DEVID_98XX || 796 + id == PCI_SUBSYS_DEVID_CN10K_A || 797 + id == PCI_SUBSYS_DEVID_CN10K_B)); 798 + } 799 + 786 800 static inline bool is_rvu_npc_hash_extract_en(struct rvu *rvu) 787 801 { 788 802 u64 npc_const3;