Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-06-10 (i40e, iavf, ice, e1000) For i40e: Robert Malz improves reset handling for situations where multiple reset requests could cause some to be missed. For iavf: Ahmed adds detection, and handling, of reset that could occur early in the initialization process to stop long wait/hangs. For ice: Anton, properly, sets missed use_nsecs value. For e1000: Joe Damato moves cancel_work_sync() call to avoid deadlock. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000: Move cancel_work_sync to avoid deadlock ice/ptp: fix crosstimestamp reporting iavf: fix reset_task for early reset event i40e: retry VFLR handling if there is ongoing VF reset i40e: return false from i40e_reset_vf if reset is in progress ==================== Link: https://patch.msgid.link/20250610171348.1476574-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -477,10 +477,6 @@ static void e1000_down_and_stop(struct e1000_adapter *adapter)
|
||||
|
||||
cancel_delayed_work_sync(&adapter->phy_info_task);
|
||||
cancel_delayed_work_sync(&adapter->fifo_stall_task);
|
||||
|
||||
/* Only kill reset task if adapter is not resetting */
|
||||
if (!test_bit(__E1000_RESETTING, &adapter->flags))
|
||||
cancel_work_sync(&adapter->reset_task);
|
||||
}
|
||||
|
||||
void e1000_down(struct e1000_adapter *adapter)
|
||||
@@ -1266,6 +1262,10 @@ static void e1000_remove(struct pci_dev *pdev)
|
||||
|
||||
unregister_netdev(netdev);
|
||||
|
||||
/* Only kill reset task if adapter is not resetting */
|
||||
if (!test_bit(__E1000_RESETTING, &adapter->flags))
|
||||
cancel_work_sync(&adapter->reset_task);
|
||||
|
||||
e1000_phy_hw_reset(hw);
|
||||
|
||||
kfree(adapter->tx_ring);
|
||||
|
||||
@@ -1546,8 +1546,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
|
||||
* @vf: pointer to the VF structure
|
||||
* @flr: VFLR was issued or not
|
||||
*
|
||||
* Returns true if the VF is in reset, resets successfully, or resets
|
||||
* are disabled and false otherwise.
|
||||
* Return: True if reset was performed successfully or if resets are disabled.
|
||||
* False if reset is already in progress.
|
||||
**/
|
||||
bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
||||
{
|
||||
@@ -1566,7 +1566,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
||||
|
||||
/* If VF is being reset already we don't need to continue. */
|
||||
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
i40e_trigger_vf_reset(vf, flr);
|
||||
|
||||
@@ -4328,7 +4328,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
|
||||
reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
|
||||
if (reg & BIT(bit_idx))
|
||||
/* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
|
||||
i40e_reset_vf(vf, true);
|
||||
if (!i40e_reset_vf(vf, true)) {
|
||||
/* At least one VF did not finish resetting, retry next time */
|
||||
set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -3209,6 +3209,17 @@ static void iavf_reset_task(struct work_struct *work)
|
||||
}
|
||||
|
||||
continue_reset:
|
||||
/* If we are still early in the state machine, just restart. */
|
||||
if (adapter->state <= __IAVF_INIT_FAILED) {
|
||||
iavf_shutdown_adminq(hw);
|
||||
iavf_change_state(adapter, __IAVF_STARTUP);
|
||||
iavf_startup(adapter);
|
||||
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
|
||||
msecs_to_jiffies(30));
|
||||
netdev_unlock(netdev);
|
||||
return;
|
||||
}
|
||||
|
||||
/* We don't use netif_running() because it may be true prior to
|
||||
* ndo_open() returning, so we can't assume it means all our open
|
||||
* tasks have finished, since we're not holding the rtnl_lock here.
|
||||
|
||||
@@ -79,6 +79,23 @@ iavf_poll_virtchnl_msg(struct iavf_hw *hw, struct iavf_arq_event_info *event,
|
||||
return iavf_status_to_errno(status);
|
||||
received_op =
|
||||
(enum virtchnl_ops)le32_to_cpu(event->desc.cookie_high);
|
||||
|
||||
if (received_op == VIRTCHNL_OP_EVENT) {
|
||||
struct iavf_adapter *adapter = hw->back;
|
||||
struct virtchnl_pf_event *vpe =
|
||||
(struct virtchnl_pf_event *)event->msg_buf;
|
||||
|
||||
if (vpe->event != VIRTCHNL_EVENT_RESET_IMPENDING)
|
||||
continue;
|
||||
|
||||
dev_info(&adapter->pdev->dev, "Reset indication received from the PF\n");
|
||||
if (!(adapter->flags & IAVF_FLAG_RESET_PENDING))
|
||||
iavf_schedule_reset(adapter,
|
||||
IAVF_FLAG_RESET_PENDING);
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (op_to_poll == received_op)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2299,6 +2299,7 @@ static int ice_capture_crosststamp(ktime_t *device,
|
||||
ts = ((u64)ts_hi << 32) | ts_lo;
|
||||
system->cycles = ts;
|
||||
system->cs_id = CSID_X86_ART;
|
||||
system->use_nsecs = true;
|
||||
|
||||
/* Read Device source clock time */
|
||||
ts_lo = rd32(hw, cfg->dev_time_l[tmr_idx]);
|
||||
|
||||
Reference in New Issue
Block a user