netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v2] octeon_ep: Clear VF info at PF when VF driver is removed
@ 2025-09-16 13:12 Sathesh B Edara
  2025-09-17 11:55 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Sathesh B Edara @ 2025-09-16 13:12 UTC (permalink / raw)
  To: linux-kernel, sburla, vburru, davem, edumazet, kuba, pabeni,
	netdev, hgani, andrew, srasheed
  Cc: sedara

When a VF (Virtual Function) driver is removed, the PF (Physical Function)
driver continues to retain stale VF-specific information. This can lead to
inconsistencies or unexpected behavior when the VF is re-initialized or
reassigned.

This patch ensures that the PF driver clears the corresponding VF info
when the VF driver is removed, maintaining a clean state and preventing
potential issues.

Fixes: cde29af9e68e ("octeon_ep: add PF-VF mailbox communication")
Signed-off-by: Sathesh B Edara <sedara@marvell.com>
---
Changes:
V2:
  - Commit header format corrected.

 drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
index ebecdd29f3bd..f2759d2073d1 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
@@ -205,6 +205,8 @@ static void octep_pfvf_dev_remove(struct octep_device *oct,  u32 vf_id,
 {
 	int err;
 
+	/* Reset VF-specific information maintained by the PF */
+	memset(&oct->vf_info[vf_id], 0, sizeof(struct octep_pfvf_info));
 	err = octep_ctrl_net_dev_remove(oct, vf_id);
 	if (err) {
 		rsp->s.type = OCTEP_PFVF_MBOX_TYPE_RSP_NACK;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-17 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 13:12 [net PATCH v2] octeon_ep: Clear VF info at PF when VF driver is removed Sathesh B Edara
2025-09-17 11:55 ` Simon Horman
2025-09-17 12:24   ` [EXTERNAL] " Sathesh B Edara
2025-09-17 14:39     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).