提交 dea2d93a 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
...@@ -2541,6 +2541,13 @@ static void iavf_watchdog_task(struct work_struct *work) ...@@ -2541,6 +2541,13 @@ static void iavf_watchdog_task(struct work_struct *work)
queue_delayed_work(iavf_wq, &adapter->watchdog_task, HZ * 2); queue_delayed_work(iavf_wq, &adapter->watchdog_task, HZ * 2);
} }
/**
* iavf_disable_vf - disable VF
* @adapter: board private structure
*
* Set communication failed flag and free all resources.
* NOTE: This function is expected to be called with crit_lock being held.
**/
static void iavf_disable_vf(struct iavf_adapter *adapter) static void iavf_disable_vf(struct iavf_adapter *adapter)
{ {
struct iavf_mac_filter *f, *ftmp; struct iavf_mac_filter *f, *ftmp;
...@@ -2595,7 +2602,6 @@ static void iavf_disable_vf(struct iavf_adapter *adapter) ...@@ -2595,7 +2602,6 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE); memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
iavf_shutdown_adminq(&adapter->hw); iavf_shutdown_adminq(&adapter->hw);
adapter->netdev->flags &= ~IFF_UP; adapter->netdev->flags &= ~IFF_UP;
mutex_unlock(&adapter->crit_lock);
adapter->flags &= ~IAVF_FLAG_RESET_PENDING; adapter->flags &= ~IAVF_FLAG_RESET_PENDING;
iavf_change_state(adapter, __IAVF_DOWN); iavf_change_state(adapter, __IAVF_DOWN);
wake_up(&adapter->down_waitqueue); wake_up(&adapter->down_waitqueue);
......
...@@ -4880,7 +4880,6 @@ static void ice_remove(struct pci_dev *pdev) ...@@ -4880,7 +4880,6 @@ static void ice_remove(struct pci_dev *pdev)
ice_devlink_unregister_params(pf); ice_devlink_unregister_params(pf);
set_bit(ICE_DOWN, pf->state); set_bit(ICE_DOWN, pf->state);
mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
ice_deinit_lag(pf); ice_deinit_lag(pf);
if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags)) if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
ice_ptp_release(pf); ice_ptp_release(pf);
...@@ -4888,6 +4887,7 @@ static void ice_remove(struct pci_dev *pdev) ...@@ -4888,6 +4887,7 @@ static void ice_remove(struct pci_dev *pdev)
ice_remove_arfs(pf); ice_remove_arfs(pf);
ice_setup_mc_magic_wake(pf); ice_setup_mc_magic_wake(pf);
ice_vsi_release_all(pf); ice_vsi_release_all(pf);
mutex_destroy(&(&pf->hw)->fdir_fltr_lock);
ice_set_wake(pf); ice_set_wake(pf);
ice_free_irq_msix_misc(pf); ice_free_irq_msix_misc(pf);
ice_for_each_vsi(pf, i) { ice_for_each_vsi(pf, i) {
...@@ -5962,8 +5962,9 @@ ice_update_vsi_tx_ring_stats(struct ice_vsi *vsi, ...@@ -5962,8 +5962,9 @@ ice_update_vsi_tx_ring_stats(struct ice_vsi *vsi,
u64 pkts = 0, bytes = 0; u64 pkts = 0, bytes = 0;
ring = READ_ONCE(rings[i]); ring = READ_ONCE(rings[i]);
if (ring) if (!ring)
ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes); continue;
ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes);
vsi_stats->tx_packets += pkts; vsi_stats->tx_packets += pkts;
vsi_stats->tx_bytes += bytes; vsi_stats->tx_bytes += bytes;
vsi->tx_restart += ring->tx_stats.restart_q; vsi->tx_restart += ring->tx_stats.restart_q;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册