1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/idpf
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
..
idpf.h idpf: prevent deinit uninitialized virtchnl core 2024-03-04 09:47:33 -08:00
idpf_controlq.c idpf: fix minor controlq issues 2024-03-04 09:48:33 -08:00
idpf_controlq.h idpf: add controlq init and reset checks 2023-09-13 14:59:23 -07:00
idpf_controlq_api.h idpf: implement virtchnl transaction manager 2024-03-04 09:32:41 -08:00
idpf_controlq_setup.c idpf: add controlq init and reset checks 2023-09-13 14:59:23 -07:00
idpf_dev.c idpf: add idpf_virtchnl.h 2024-03-04 09:28:27 -08:00
idpf_devids.h idpf: add module register and probe functionality 2023-09-13 14:59:23 -07:00
idpf_ethtool.c idpf: Interpret .set_channels() input differently 2024-05-23 13:02:26 +02:00
idpf_lan_pf_regs.h idpf: initialize interrupts and enable vport 2023-09-13 14:59:24 -07:00
idpf_lan_txrx.h idpf: add singleq start_xmit and napi poll 2023-09-13 14:59:24 -07:00
idpf_lan_vf_regs.h idpf: initialize interrupts and enable vport 2023-09-13 14:59:24 -07:00
idpf_lib.c idpf: don't enable NAPI and interrupts prior to allocating Rx buffers 2024-05-27 17:11:43 -07:00
idpf_main.c idpf: cleanup virtchnl cruft 2024-03-04 09:42:56 -08:00
idpf_mem.h idpf: add controlq init and reset checks 2023-09-13 14:59:23 -07:00
idpf_singleq_txrx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
idpf_txrx.c idpf: don't enable NAPI and interrupts prior to allocating Rx buffers 2024-05-27 17:11:43 -07:00
idpf_txrx.h idpf: don't enable NAPI and interrupts prior to allocating Rx buffers 2024-05-27 17:11:43 -07:00
idpf_vf_dev.c idpf: implement virtchnl transaction manager 2024-03-04 09:32:41 -08:00
idpf_virtchnl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-07 10:29:36 -08:00
idpf_virtchnl.h idpf: refactor idpf_recv_mb_msg 2024-03-04 09:39:30 -08:00
Makefile idpf: add ethtool callbacks 2023-09-13 14:59:24 -07:00
virtchnl2.h idpf: sprinkle __counted_by{,_le}() in the virtchnl2 header 2024-03-28 18:50:47 -07:00
virtchnl2_lan_desc.h