Skip to content

Commit dea2d93

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
==================== Intel Wired LAN Driver Updates 2022-03-15 This series contains updates to ice and iavf drivers. Maciej adjusts null check logic on Tx ring to prevent possible NULL pointer dereference for ice. Sudheer moves destruction of Flow Director lock as it was being accessed after destruction for ice. Przemyslaw removes an excess mutex unlock as it was being double unlocked for iavf. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 886e44c + 16b2dd8 commit dea2d93

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,13 @@ static void iavf_watchdog_task(struct work_struct *work)
25412541
queue_delayed_work(iavf_wq, &adapter->watchdog_task, HZ * 2);
25422542
}
25432543

2544+
/**
2545+
* iavf_disable_vf - disable VF
2546+
* @adapter: board private structure
2547+
*
2548+
* Set communication failed flag and free all resources.
2549+
* NOTE: This function is expected to be called with crit_lock being held.
2550+
**/
25442551
static void iavf_disable_vf(struct iavf_adapter *adapter)
25452552
{
25462553
struct iavf_mac_filter *f, *ftmp;
@@ -2595,7 +2602,6 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
25952602
memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
25962603
iavf_shutdown_adminq(&adapter->hw);
25972604
adapter->netdev->flags &= ~IFF_UP;
2598-
mutex_unlock(&adapter->crit_lock);
25992605
adapter->flags &= ~IAVF_FLAG_RESET_PENDING;
26002606
iavf_change_state(adapter, __IAVF_DOWN);
26012607
wake_up(&adapter->down_waitqueue);

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4880,14 +4880,14 @@ static void ice_remove(struct pci_dev *pdev)
48804880
ice_devlink_unregister_params(pf);
48814881
set_bit(ICE_DOWN, pf->state);
48824882

4883-
mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
48844883
ice_deinit_lag(pf);
48854884
if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
48864885
ice_ptp_release(pf);
48874886
if (!ice_is_safe_mode(pf))
48884887
ice_remove_arfs(pf);
48894888
ice_setup_mc_magic_wake(pf);
48904889
ice_vsi_release_all(pf);
4890+
mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
48914891
ice_set_wake(pf);
48924892
ice_free_irq_msix_misc(pf);
48934893
ice_for_each_vsi(pf, i) {
@@ -5962,8 +5962,9 @@ ice_update_vsi_tx_ring_stats(struct ice_vsi *vsi,
59625962
u64 pkts = 0, bytes = 0;
59635963

59645964
ring = READ_ONCE(rings[i]);
5965-
if (ring)
5966-
ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes);
5965+
if (!ring)
5966+
continue;
5967+
ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes);
59675968
vsi_stats->tx_packets += pkts;
59685969
vsi_stats->tx_bytes += bytes;
59695970
vsi->tx_restart += ring->tx_stats.restart_q;

0 commit comments

Comments
 (0)