Skip to content

Commit 130dbfe

Browse files
Hariprasad Kelamgregkh
authored andcommitted
Octeontx2-af: Fix NIX X2P calibration failures
[ Upstream commit d280233 ] 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: aba53d5 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 691d30b commit 130dbfe

File tree

2 files changed

+21
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

2 files changed

+21
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,13 @@ static int cgx_probe(struct pci_dev *pdev, const struct pci_device_id *id)
19401940
goto err_release_regions;
19411941
}
19421942

1943+
if (!is_cn20k(pdev) &&
1944+
!is_cgx_mapped_to_nix(pdev->subsystem_device, cgx->cgx_id)) {
1945+
dev_notice(dev, "CGX %d not mapped to NIX, skipping probe\n",
1946+
cgx->cgx_id);
1947+
goto err_release_regions;
1948+
}
1949+
19431950
cgx->lmac_count = cgx->mac_ops->get_nr_lmacs(cgx);
19441951
if (!cgx->lmac_count) {
19451952
dev_notice(dev, "CGX %d LMAC count is zero, skipping probe\n", cgx->cgx_id);

drivers/net/ethernet/marvell/octeontx2/af/rvu.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,20 @@ static inline bool is_cn10kb(struct rvu *rvu)
761761
return false;
762762
}
763763

764+
static inline bool is_cgx_mapped_to_nix(unsigned short id, u8 cgx_id)
765+
{
766+
/* On CNF10KA and CNF10KB silicons only two CGX blocks are connected
767+
* to NIX.
768+
*/
769+
if (id == PCI_SUBSYS_DEVID_CNF10K_A || id == PCI_SUBSYS_DEVID_CNF10K_B)
770+
return cgx_id <= 1;
771+
772+
return !(cgx_id && !(id == PCI_SUBSYS_DEVID_96XX ||
773+
id == PCI_SUBSYS_DEVID_98XX ||
774+
id == PCI_SUBSYS_DEVID_CN10K_A ||
775+
id == PCI_SUBSYS_DEVID_CN10K_B));
776+
}
777+
764778
static inline bool is_rvu_npc_hash_extract_en(struct rvu *rvu)
765779
{
766780
u64 npc_const3;

0 commit comments

Comments
 (0)