linux/drivers/net/ethernet/freescale/enetc
Wei Fang 9e68817f12 net: enetc: avoid VF->PF mailbox timeout during SR-IOV teardown
During SR-IOV teardown, enetc_msg_psi_free() disables the MR interrupt
before pci_disable_sriov() removes the VFs. If a VF sends a mailbox
message during this window, the PF cannot receive it, causing the VF to
timeout waiting for a reply.

Since the timeout occurs during SR-IOV teardown when the VF is about to
be removed anyway, it has no functional impact on operation. However,
more messages will be added in the future, some visible error logs may
confuse users. So fix it by calling pci_disable_sriov() first to remove
all VFs, then safely clean up the mailbox resources. This eliminates the
race window where VFs could send messages to an unresponsive PF.

Fixes: beb74ac878 ("enetc: Add vf to pf messaging support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260520064421.91569-10-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-21 08:49:00 -07:00
..
enetc_cbdr.c net: enetc: Remove CBDR cacheability AXI settings for ENETC v4 2026-02-02 18:11:52 -08:00
enetc_ethtool.c net: enetc: add unstructured counters for ENETC v4 2026-04-12 13:03:48 -07:00
enetc_hw.h net: enetc: fix unbounded loop and interrupt handling in VF-to-PF messaging 2026-05-21 08:48:59 -07:00
enetc_ierb.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
enetc_ierb.h net: update NXP copyright text 2021-09-17 13:52:17 +01:00
enetc_mdio.c enetc: Separate C22 and C45 transactions 2023-01-13 21:40:54 -08:00
enetc_msg.c net: enetc: fix init and teardown order to prevent use of unsafe resources 2026-05-21 08:48:59 -07:00
enetc_pci_mdio.c net: enetc: add i.MX95 EMDIO support 2024-11-04 10:03:51 +00:00
enetc_pf_common.c net: enetc: update the base address of port MDIO registers for ENETC v4 2025-11-25 17:44:48 -08:00
enetc_pf_common.h net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c 2025-05-08 19:43:52 -07:00
enetc_pf.c net: enetc: avoid VF->PF mailbox timeout during SR-IOV teardown 2026-05-21 08:49:00 -07:00
enetc_pf.h net: enetc: fix race condition in VF MAC address configuration 2026-05-21 08:48:59 -07:00
enetc_ptp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
enetc_qos.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
enetc_vf.c net: enetc: fix VSI mailbox timeout handling and DMA lifecycle 2026-04-30 17:35:56 -07:00
enetc.c net: enetc: reset PIR and CIR if they are not equal when initializing TX ring 2026-03-26 20:19:05 -07:00
enetc.h net: enetc: fix VSI mailbox timeout handling and DMA lifecycle 2026-04-30 17:35:56 -07:00
enetc4_debugfs.c net: enetc: add debugfs interface to dump MAC filter 2025-05-08 19:43:51 -07:00
enetc4_debugfs.h net: enetc: add debugfs interface to dump MAC filter 2025-05-08 19:43:51 -07:00
enetc4_hw.h net: enetc: add unstructured counters for ENETC v4 2026-04-12 13:03:48 -07:00
enetc4_pf.c net: enetc: do not access non-existent registers on pseudo MAC 2026-03-26 20:19:06 -07:00
Kconfig net: enetc: add PTP synchronization support for ENETC v4 2025-09-02 13:13:34 +02:00
Makefile net: enetc: add debugfs interface to dump MAC filter 2025-05-08 19:43:51 -07:00
netc_blk_ctrl.c net: enetc: do not skip setting LaBCR[MDIO_PHYAD_PRTAD] for addr 0 2026-03-10 10:36:46 +01:00
ntmp_private.h net: enetc: fix NTMP DMA use-after-free issue 2026-04-16 19:27:51 -07:00
ntmp.c net: enetc: fix NTMP DMA use-after-free issue 2026-04-16 19:27:51 -07:00