1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel
Alexander Lobakin d514c8b542 idpf: don't enable NAPI and interrupts prior to allocating Rx buffers
Currently, idpf enables NAPI and interrupts prior to allocating Rx
buffers.
This may lead to frame loss (there are no buffers to place incoming
frames) and even crashes on quick ifup-ifdown. Interrupts must be
enabled only after all the resources are here and available.
Split interrupt init into two phases: initialization and enabling,
and perform the second only after the queues are fully initialized.
Note that we can't just move interrupt initialization down the init
process, as the queues must have correct a ::q_vector pointer set
and NAPI already added in order to allocate buffers correctly.
Also, during the deinit process, disable HW interrupts first and
only then disable NAPI. Otherwise, there can be a HW event leading
to napi_schedule(), but the NAPI will already be unavailable.

Fixes: d4d5587182 ("idpf: initialize interrupts and enable vport")
Reported-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240523-net-2024-05-23-intel-net-fixes-v1-1-17a923e0bb5f@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-27 17:11:43 -07:00
..
e1000 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
e1000e net: e1000e & ixgbe: Remove PCI_HEADER_TYPE_MFD duplicates 2024-05-08 09:26:46 -07:00
fm10k net: intel: implement modern PM ops declarations 2024-03-29 08:58:43 -07:00
i40e tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
iavf tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ice Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
idpf idpf: don't enable NAPI and interrupts prior to allocating Rx buffers 2024-05-27 17:11:43 -07:00
igb igb: flower: validate control flags 2024-05-08 09:22:33 -07:00
igbvf net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
igc dma-mapping updates for Linux 6.10 2024-05-20 10:23:39 -07:00
ixgbe Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
ixgbevf net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
libeth libeth: add Rx buffer management 2024-04-24 11:06:25 -07:00
libie net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
e100.c net: intel: implement modern PM ops declarations 2024-03-29 08:58:43 -07:00
Kconfig net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
Makefile net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00