Commit aa3cf240 authored by David S. Miller's avatar David S. Miller

Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/t

nguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2021-07-01

This series contains updates to igb, igc, ixgbe, e1000e, fm10k, and iavf
drivers.

Vinicius fixes a use-after-free issue present in igc and igb.

Tom Rix fixes the return value for igc_read_phy_reg() when the
operation is not supported for igc.

Christophe Jaillet fixes unrolling of PCIe error reporting for ixgbe,
igc, igb, fm10k, e10000e, and iavf.

Alex ensures that q_vector array is not accessed beyond its bounds for
igb.

Jedrzej moves ring assignment to occur after bounds have been checked in
igb.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6b28a86d 382a7c20
...@@ -7664,6 +7664,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7664,6 +7664,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
err_alloc_etherdev: err_alloc_etherdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev); pci_release_mem_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
......
...@@ -2227,6 +2227,7 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2227,6 +2227,7 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
err_alloc_netdev: err_alloc_netdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev); pci_release_mem_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
......
...@@ -3798,6 +3798,7 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3798,6 +3798,7 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
err_alloc_etherdev: err_alloc_etherdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_regions(pdev); pci_release_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
......
...@@ -931,6 +931,7 @@ static void igb_configure_msix(struct igb_adapter *adapter) ...@@ -931,6 +931,7 @@ static void igb_configure_msix(struct igb_adapter *adapter)
**/ **/
static int igb_request_msix(struct igb_adapter *adapter) static int igb_request_msix(struct igb_adapter *adapter)
{ {
unsigned int num_q_vectors = adapter->num_q_vectors;
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
int i, err = 0, vector = 0, free_vector = 0; int i, err = 0, vector = 0, free_vector = 0;
...@@ -939,7 +940,13 @@ static int igb_request_msix(struct igb_adapter *adapter) ...@@ -939,7 +940,13 @@ static int igb_request_msix(struct igb_adapter *adapter)
if (err) if (err)
goto err_out; goto err_out;
for (i = 0; i < adapter->num_q_vectors; i++) { if (num_q_vectors > MAX_Q_VECTORS) {
num_q_vectors = MAX_Q_VECTORS;
dev_warn(&adapter->pdev->dev,
"The number of queue vectors (%d) is higher than max allowed (%d)\n",
adapter->num_q_vectors, MAX_Q_VECTORS);
}
for (i = 0; i < num_q_vectors; i++) {
struct igb_q_vector *q_vector = adapter->q_vector[i]; struct igb_q_vector *q_vector = adapter->q_vector[i];
vector++; vector++;
...@@ -1678,14 +1685,15 @@ static bool is_any_txtime_enabled(struct igb_adapter *adapter) ...@@ -1678,14 +1685,15 @@ static bool is_any_txtime_enabled(struct igb_adapter *adapter)
**/ **/
static void igb_config_tx_modes(struct igb_adapter *adapter, int queue) static void igb_config_tx_modes(struct igb_adapter *adapter, int queue)
{ {
struct igb_ring *ring = adapter->tx_ring[queue];
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
struct igb_ring *ring;
u32 tqavcc, tqavctrl; u32 tqavcc, tqavctrl;
u16 value; u16 value;
WARN_ON(hw->mac.type != e1000_i210); WARN_ON(hw->mac.type != e1000_i210);
WARN_ON(queue < 0 || queue > 1); WARN_ON(queue < 0 || queue > 1);
ring = adapter->tx_ring[queue];
/* If any of the Qav features is enabled, configure queues as SR and /* If any of the Qav features is enabled, configure queues as SR and
* with HIGH PRIO. If none is, then configure them with LOW PRIO and * with HIGH PRIO. If none is, then configure them with LOW PRIO and
...@@ -3615,6 +3623,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3615,6 +3623,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
err_alloc_etherdev: err_alloc_etherdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev); pci_release_mem_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
...@@ -4835,6 +4844,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring) ...@@ -4835,6 +4844,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring)
DMA_TO_DEVICE); DMA_TO_DEVICE);
} }
tx_buffer->next_to_watch = NULL;
/* move us one more past the eop_desc for start of next pkt */ /* move us one more past the eop_desc for start of next pkt */
tx_buffer++; tx_buffer++;
i++; i++;
......
...@@ -578,7 +578,7 @@ static inline s32 igc_read_phy_reg(struct igc_hw *hw, u32 offset, u16 *data) ...@@ -578,7 +578,7 @@ static inline s32 igc_read_phy_reg(struct igc_hw *hw, u32 offset, u16 *data)
if (hw->phy.ops.read_reg) if (hw->phy.ops.read_reg)
return hw->phy.ops.read_reg(hw, offset, data); return hw->phy.ops.read_reg(hw, offset, data);
return 0; return -EOPNOTSUPP;
} }
void igc_reinit_locked(struct igc_adapter *); void igc_reinit_locked(struct igc_adapter *);
......
...@@ -232,6 +232,8 @@ static void igc_clean_tx_ring(struct igc_ring *tx_ring) ...@@ -232,6 +232,8 @@ static void igc_clean_tx_ring(struct igc_ring *tx_ring)
igc_unmap_tx_buffer(tx_ring->dev, tx_buffer); igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
} }
tx_buffer->next_to_watch = NULL;
/* move us one more past the eop_desc for start of next pkt */ /* move us one more past the eop_desc for start of next pkt */
tx_buffer++; tx_buffer++;
i++; i++;
...@@ -6054,6 +6056,7 @@ static int igc_probe(struct pci_dev *pdev, ...@@ -6054,6 +6056,7 @@ static int igc_probe(struct pci_dev *pdev,
err_ioremap: err_ioremap:
free_netdev(netdev); free_netdev(netdev);
err_alloc_etherdev: err_alloc_etherdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev); pci_release_mem_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
......
...@@ -11067,6 +11067,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -11067,6 +11067,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state); disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
free_netdev(netdev); free_netdev(netdev);
err_alloc_etherdev: err_alloc_etherdev:
pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev); pci_release_mem_regions(pdev);
err_pci_reg: err_pci_reg:
err_dma: err_dma:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment