mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Subbaraya Sundeep <sbhatta@marvell.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <sgoutham@marvell.com>,
	<lcherian@marvell.com>, <gakula@marvell.com>,
	<hkelam@marvell.com>, <naveenm@marvell.com>, <horms@kernel.org>,
	Subbaraya Sundeep <sbhatta@marvell.com>
Subject: [v2 net PATCH 4/5] octeontx2-pf: Send UP messages to VF only when VF is up.
Date: Mon, 18 Mar 2024 14:59:57 +0530	[thread overview]
Message-ID: <1710754198-18632-5-git-send-email-sbhatta@marvell.com> (raw)
In-Reply-To: <1710754198-18632-1-git-send-email-sbhatta@marvell.com>

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>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index f85d38f..b40bd0e 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;
-- 
2.7.4


  parent reply	other threads:[~2024-03-18  9:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  9:29 [v2 net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 1/5] octeontx2: Detect the mbox up or down message via register Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 2/5] octeontx2-pf: Wait till detach_resources msg is complete Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 3/5] octeontx2-pf: Use default max_active works instead of one Subbaraya Sundeep
2024-03-18  9:29 ` Subbaraya Sundeep [this message]
2024-03-18  9:29 ` [v2 net PATCH 5/5] octeontx2-af: Use separate handlers for interrupts Subbaraya Sundeep
2024-03-20 10:50 ` [v2 net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710754198-18632-5-git-send-email-sbhatta@marvell.com \
    --to=sbhatta@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveenm@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®