]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i40e: Refactor argument of i40e_detect_recover_hung()
authorIvan Vecera <ivecera@redhat.com>
Sat, 27 Apr 2024 07:26:04 +0000 (09:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:55 +0000 (13:09 +0100)
[ Upstream commit 7033ada04e33048c8b33294fecbb0d73f3cd1088 ]

Commit 07d44190a389 ("i40e/i40evf: Detect and recover hung queue
scenario") changes i40e_detect_recover_hung() argument type from
i40e_pf* to i40e_vsi* to be shareable by both i40e and i40evf.
Because the i40evf does not exist anymore and the function is
exclusively used by i40e we can revert this change.

Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Stable-dep-of: 699428342153 ("i40e: validate ring_len parameter against hardware-specific values")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40e/i40e_txrx.h

index 9671058cda409575c5230cb837bd5bba027226c7..b2e185357ab27dbad9cc00189f5ad7e21052735b 100644 (file)
@@ -11275,7 +11275,7 @@ static void i40e_service_task(struct work_struct *work)
                return;
 
        if (!test_bit(__I40E_RECOVERY_MODE, pf->state)) {
-               i40e_detect_recover_hung(pf->vsi[pf->lan_vsi]);
+               i40e_detect_recover_hung(pf);
                i40e_sync_filters_subtask(pf);
                i40e_reset_subtask(pf);
                i40e_handle_mdd_event(pf);
index b94d67729283c5e6b3c7db35051f85c63d71c1a9..dabeeffd06fc1c56fa2e2610cb6782cf26e4a67d 100644 (file)
@@ -867,13 +867,15 @@ u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw)
 
 /**
  * i40e_detect_recover_hung - Function to detect and recover hung_queues
- * @vsi:  pointer to vsi struct with tx queues
+ * @pf: pointer to PF struct
  *
- * VSI has netdev and netdev has TX queues. This function is to check each of
- * those TX queues if they are hung, trigger recovery by issuing SW interrupt.
+ * LAN VSI has netdev and netdev has TX queues. This function is to check
+ * each of those TX queues if they are hung, trigger recovery by issuing
+ * SW interrupt.
  **/
-void i40e_detect_recover_hung(struct i40e_vsi *vsi)
+void i40e_detect_recover_hung(struct i40e_pf *pf)
 {
+       struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
        struct i40e_ring *tx_ring = NULL;
        struct net_device *netdev;
        unsigned int i;
index 054b7d1632e161636c665ed7cf9c713cc6dd1cf6..2ea4138099be7f16ed778dab8fae0e38b01979a4 100644 (file)
@@ -462,7 +462,7 @@ void i40e_free_rx_resources(struct i40e_ring *rx_ring);
 int i40e_napi_poll(struct napi_struct *napi, int budget);
 void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector);
 u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw);
-void i40e_detect_recover_hung(struct i40e_vsi *vsi);
+void i40e_detect_recover_hung(struct i40e_pf *pf);
 int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size);
 bool __i40e_chk_linearize(struct sk_buff *skb);
 int i40e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,