summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell
diff options
context:
space:
mode:
authorSubbaraya Sundeep <sbhatta@marvell.com>2024-03-18 12:29:57 +0300
committerDavid S. Miller <davem@davemloft.net>2024-03-20 13:49:07 +0300
commitdfcf6355f53b1796cf7fd50a4f27b18ee6a3497a (patch)
treec5036a3634bcafd1730bef5071c907ac6c43b416 /drivers/net/ethernet/marvell
parent7558ce0d974ced1dc07edc1197f750fe28c52e57 (diff)
downloadlinux-dfcf6355f53b1796cf7fd50a4f27b18ee6a3497a.tar.xz
octeontx2-pf: Send UP messages to VF only when VF is up.
When PF sending link status messages to VF, it is possible that by the time link_event_task work function is executed VF might have brought down. Hence before sending VF link status message check whether VF is up to receive it. Fixes: ad513ed938c9 ("octeontx2-vf: Link event notification support") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index f85d38fab321..b40bd0e46751 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -3122,6 +3122,9 @@ static void otx2_vf_link_event_task(struct work_struct *work)
vf_idx = config - config->pf->vf_configs;
pf = config->pf;
+ if (config->intf_down)
+ return;
+
mutex_lock(&pf->mbox.lock);
dwork = &config->link_event_work;