Skip to content

Commit 17d1368

Browse files
Hariprasad Kelamdavem330
authored andcommitted
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>
1 parent 2f38752 commit 17d1368

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • drivers/net/ethernet/marvell/octeontx2/af

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
236236

237237
linfo = &event->link_uinfo;
238238
pfmap = cgxlmac_to_pfmap(rvu, event->cgx_id, event->lmac_id);
239+
if (!pfmap) {
240+
dev_err(rvu->dev, "CGX port%d:%d not mapped with PF\n",
241+
event->cgx_id, event->lmac_id);
242+
return;
243+
}
239244

240245
do {
241246
pfid = find_first_bit(&pfmap,

0 commit comments

Comments
 (0)