Commit f7b0b97c authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'intel-wired-lan-driver-updates-2025-08-15-ice-ixgbe-igc'

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2025-08-15 (ice, ixgbe, igc)

For ixgbe:
Jason Xing corrects a condition in which improper decrement can cause
improper budget value.

Maciej extends down states in which XDP cannot transmit and excludes XDP
rings from Tx hang checks.

For igc:
VladikSS moves setting of hardware device information to allow for proper
check of device ID.

v1: https://lore.kernel.org/20250815204205.1407768-1-anthony.l.nguyen@intel.com
====================

Link: https://patch.msgid.link/20250819222000.3504873-1-anthony.l.nguyen@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 51f27bee 1468c1f9
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -7149,6 +7149,13 @@ static int igc_probe(struct pci_dev *pdev,
	adapter->port_num = hw->bus.func;
	adapter->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE);

	/* PCI config space info */
	hw->vendor_id = pdev->vendor;
	hw->device_id = pdev->device;
	hw->revision_id = pdev->revision;
	hw->subsystem_vendor_id = pdev->subsystem_vendor;
	hw->subsystem_device_id = pdev->subsystem_device;

	/* Disable ASPM L1.2 on I226 devices to avoid packet loss */
	if (igc_is_device_id_i226(hw))
		pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
@@ -7175,13 +7182,6 @@ static int igc_probe(struct pci_dev *pdev,
	netdev->mem_start = pci_resource_start(pdev, 0);
	netdev->mem_end = pci_resource_end(pdev, 0);

	/* PCI config space info */
	hw->vendor_id = pdev->vendor;
	hw->device_id = pdev->device;
	hw->revision_id = pdev->revision;
	hw->subsystem_vendor_id = pdev->subsystem_vendor;
	hw->subsystem_device_id = pdev->subsystem_device;

	/* Copy the default MAC and PHY function pointers */
	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
	memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));
+11 −23
Original line number Diff line number Diff line
@@ -968,10 +968,6 @@ static void ixgbe_update_xoff_rx_lfc(struct ixgbe_adapter *adapter)
	for (i = 0; i < adapter->num_tx_queues; i++)
		clear_bit(__IXGBE_HANG_CHECK_ARMED,
			  &adapter->tx_ring[i]->state);

	for (i = 0; i < adapter->num_xdp_queues; i++)
		clear_bit(__IXGBE_HANG_CHECK_ARMED,
			  &adapter->xdp_ring[i]->state);
}

static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
@@ -1214,7 +1210,7 @@ static void ixgbe_pf_handle_tx_hang(struct ixgbe_ring *tx_ring,
	struct ixgbe_adapter *adapter = netdev_priv(tx_ring->netdev);
	struct ixgbe_hw *hw = &adapter->hw;

	e_err(drv, "Detected Tx Unit Hang%s\n"
	e_err(drv, "Detected Tx Unit Hang\n"
		   "  Tx Queue             <%d>\n"
		   "  TDH, TDT             <%x>, <%x>\n"
		   "  next_to_use          <%x>\n"
@@ -1222,14 +1218,12 @@ static void ixgbe_pf_handle_tx_hang(struct ixgbe_ring *tx_ring,
		   "tx_buffer_info[next_to_clean]\n"
		   "  time_stamp           <%lx>\n"
		   "  jiffies              <%lx>\n",
	      ring_is_xdp(tx_ring) ? " (XDP)" : "",
	      tx_ring->queue_index,
	      IXGBE_READ_REG(hw, IXGBE_TDH(tx_ring->reg_idx)),
	      IXGBE_READ_REG(hw, IXGBE_TDT(tx_ring->reg_idx)),
	      tx_ring->next_to_use, next,
	      tx_ring->tx_buffer_info[next].time_stamp, jiffies);

	if (!ring_is_xdp(tx_ring))
	netif_stop_subqueue(tx_ring->netdev,
			    tx_ring->queue_index);
}
@@ -1451,6 +1445,9 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
				   total_bytes);
	adapter->tx_ipsec += total_ipsec;

	if (ring_is_xdp(tx_ring))
		return !!budget;

	if (check_for_tx_hang(tx_ring) && ixgbe_check_tx_hang(tx_ring)) {
		if (adapter->hw.mac.type == ixgbe_mac_e610)
			ixgbe_handle_mdd_event(adapter, tx_ring);
@@ -1468,9 +1465,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
		return true;
	}

	if (ring_is_xdp(tx_ring))
		return !!budget;

#define TX_WAKE_THRESHOLD (DESC_NEEDED * 2)
	txq = netdev_get_tx_queue(tx_ring->netdev, tx_ring->queue_index);
	if (!__netif_txq_completed_wake(txq, total_packets, total_bytes,
@@ -7974,12 +7968,9 @@ static void ixgbe_check_hang_subtask(struct ixgbe_adapter *adapter)
		return;

	/* Force detection of hung controller */
	if (netif_carrier_ok(adapter->netdev)) {
	if (netif_carrier_ok(adapter->netdev))
		for (i = 0; i < adapter->num_tx_queues; i++)
			set_check_for_tx_hang(adapter->tx_ring[i]);
		for (i = 0; i < adapter->num_xdp_queues; i++)
			set_check_for_tx_hang(adapter->xdp_ring[i]);
	}

	if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {
		/*
@@ -8199,13 +8190,6 @@ static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter)
			return true;
	}

	for (i = 0; i < adapter->num_xdp_queues; i++) {
		struct ixgbe_ring *ring = adapter->xdp_ring[i];

		if (ring->next_to_use != ring->next_to_clean)
			return true;
	}

	return false;
}

@@ -11005,6 +10989,10 @@ static int ixgbe_xdp_xmit(struct net_device *dev, int n,
	if (unlikely(test_bit(__IXGBE_DOWN, &adapter->state)))
		return -ENETDOWN;

	if (!netif_carrier_ok(adapter->netdev) ||
	    !netif_running(adapter->netdev))
		return -ENETDOWN;

	if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
		return -EINVAL;

+3 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
	dma_addr_t dma;
	u32 cmd_type;

	while (budget-- > 0) {
	while (likely(budget)) {
		if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
			work_done = false;
			break;
@@ -433,6 +433,8 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
		xdp_ring->next_to_use++;
		if (xdp_ring->next_to_use == xdp_ring->count)
			xdp_ring->next_to_use = 0;

		budget--;
	}

	if (tx_desc) {