summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHariprasad Kelam <hkelam@marvell.com>2023-08-25 13:40:22 +0300
committerDavid S. Miller <davem@davemloft.net>2023-08-28 12:05:56 +0300
commit17d1368f4f19eec2047c7527e7e606496481f1bf (patch)
treeac17da382a4b16ef242f556cbb6689fcd63ddb3d /drivers
parent2f387525d484c0eca841b71842e1cd672220c20c (diff)
downloadlinux-17d1368f4f19eec2047c7527e7e606496481f1bf.tar.xz
octeontx2-af: print error message incase of invalid pf mapping
During AF driver initialization, it creates a mapping between pf to cgx,lmac pair. Whenever there is a physical link change, using this mapping driver forwards the message to the associated netdev. This patch prints error message incase of cgx,lmac pair is not associated with any pf netdev. Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
index 4e3aec7bdbee..f2b1edf1bb43 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
@@ -236,6 +236,11 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
linfo = &event->link_uinfo;
pfmap = cgxlmac_to_pfmap(rvu, event->cgx_id, event->lmac_id);
+ if (!pfmap) {
+ dev_err(rvu->dev, "CGX port%d:%d not mapped with PF\n",
+ event->cgx_id, event->lmac_id);
+ return;
+ }
do {
pfid = find_first_bit(&pfmap,