mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
Merge branch 'intel-wired-lan-driver-updates-2026-06-09-idpf-ice-i40e-iavf-ixgbe-igc-igb-e1000e-e1000'
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2026-06-09 (idpf, ice, i40e, iavf, ixgbe, igc, igb, e1000e, e1000) Marco Crivellari replaces obsolete use of system_unbound_wq to system_dfl_wq for idpf. Natalia removes redundant PTP checks on ice. Corinna Vinschen removes redundant MAC address check on iavf. Jakub Raczynski replaces open-coded array size calculation to use ARRAY_SIZE for i40e and iavf drivers. Piotr removes a couple redundant assignments on ixgbe. Alex utilizes ktime_get_* helpers for igb and e1000e. Daiki Harada replaces napi_schedule() to, more appropriate, napi_schedule_irqoff() call in igb and igc. Matt Vollrath does the same on e1000e. Agalakov Daniil skips unnecessary endian conversions on e1000e and e1000. Maximilian Pezzullo fixes some typos on igb and igc. ==================== Link: https://patch.msgid.link/20260609213559.178657-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
c3e4669ca9
|
|
@ -499,6 +499,9 @@ static int e1000_set_eeprom(struct net_device *netdev,
|
|||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
le16_to_cpus(&eeprom_buff[0]);
|
||||
|
||||
ptr++;
|
||||
}
|
||||
if ((eeprom->offset + eeprom->len) & 1) {
|
||||
|
|
@ -509,11 +512,10 @@ static int e1000_set_eeprom(struct net_device *netdev,
|
|||
&eeprom_buff[last_word - first_word]);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
for (i = 0; i < last_word - first_word + 1; i++)
|
||||
le16_to_cpus(&eeprom_buff[i]);
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
le16_to_cpus(&eeprom_buff[last_word - first_word]);
|
||||
}
|
||||
|
||||
memcpy(ptr, bytes, eeprom->len);
|
||||
|
||||
|
|
|
|||
|
|
@ -583,20 +583,25 @@ static int e1000_set_eeprom(struct net_device *netdev,
|
|||
/* need read/modify/write of first changed EEPROM word */
|
||||
/* only the second byte of the word is being modified */
|
||||
ret_val = e1000_read_nvm(hw, first_word, 1, &eeprom_buff[0]);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
le16_to_cpus(&eeprom_buff[0]);
|
||||
|
||||
ptr++;
|
||||
}
|
||||
if (((eeprom->offset + eeprom->len) & 1) && (!ret_val))
|
||||
if ((eeprom->offset + eeprom->len) & 1) {
|
||||
/* need read/modify/write of last changed EEPROM word */
|
||||
/* only the first byte of the word is being modified */
|
||||
ret_val = e1000_read_nvm(hw, last_word, 1,
|
||||
&eeprom_buff[last_word - first_word]);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
for (i = 0; i < last_word - first_word + 1; i++)
|
||||
le16_to_cpus(&eeprom_buff[i]);
|
||||
/* Device's eeprom is always little-endian, word addressable */
|
||||
le16_to_cpus(&eeprom_buff[last_word - first_word]);
|
||||
}
|
||||
|
||||
memcpy(ptr, bytes, eeprom->len);
|
||||
|
||||
|
|
|
|||
|
|
@ -1803,7 +1803,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data)
|
|||
adapter->total_tx_packets = 0;
|
||||
adapter->total_rx_bytes = 0;
|
||||
adapter->total_rx_packets = 0;
|
||||
__napi_schedule(&adapter->napi);
|
||||
__napi_schedule_irqoff(&adapter->napi);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
|
@ -1882,7 +1882,7 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data)
|
|||
adapter->total_tx_packets = 0;
|
||||
adapter->total_rx_bytes = 0;
|
||||
adapter->total_rx_packets = 0;
|
||||
__napi_schedule(&adapter->napi);
|
||||
__napi_schedule_irqoff(&adapter->napi);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
|
@ -1951,7 +1951,7 @@ static irqreturn_t e1000_intr_msix_rx(int __always_unused irq, void *data)
|
|||
if (napi_schedule_prep(&adapter->napi)) {
|
||||
adapter->total_rx_bytes = 0;
|
||||
adapter->total_rx_packets = 0;
|
||||
__napi_schedule(&adapter->napi);
|
||||
__napi_schedule_irqoff(&adapter->napi);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -3943,7 +3943,7 @@ static void e1000e_systim_reset(struct e1000_adapter *adapter)
|
|||
/* reset the systim ns time counter */
|
||||
spin_lock_irqsave(&adapter->systim_lock, flags);
|
||||
timecounter_init(&adapter->tc, &adapter->cc,
|
||||
ktime_to_ns(ktime_get_real()));
|
||||
ktime_get_real_ns());
|
||||
spin_unlock_irqrestore(&adapter->systim_lock, flags);
|
||||
|
||||
/* restore the previous hwtstamp configuration settings */
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
|
|||
-EFBIG, /* I40E_AQ_RC_EFBIG */
|
||||
};
|
||||
|
||||
if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]))))
|
||||
if (aq_rc >= ARRAY_SIZE(aq_to_posix))
|
||||
return -ERANGE;
|
||||
|
||||
return aq_to_posix[aq_rc];
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ static inline int iavf_aq_rc_to_posix(int aq_ret, int aq_rc)
|
|||
if (aq_ret == IAVF_ERR_ADMIN_QUEUE_TIMEOUT)
|
||||
return -EAGAIN;
|
||||
|
||||
if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]))))
|
||||
if (aq_rc >= ARRAY_SIZE(aq_to_posix))
|
||||
return -ERANGE;
|
||||
|
||||
return aq_to_posix[aq_rc];
|
||||
|
|
|
|||
|
|
@ -2550,13 +2550,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
|
|||
case VIRTCHNL_OP_ADD_ETH_ADDR:
|
||||
if (!v_retval)
|
||||
iavf_mac_add_ok(adapter);
|
||||
if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr))
|
||||
if (!ether_addr_equal(netdev->dev_addr,
|
||||
adapter->hw.mac.addr)) {
|
||||
netif_addr_lock_bh(netdev);
|
||||
eth_hw_addr_set(netdev, adapter->hw.mac.addr);
|
||||
netif_addr_unlock_bh(netdev);
|
||||
}
|
||||
if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) {
|
||||
netif_addr_lock_bh(netdev);
|
||||
eth_hw_addr_set(netdev, adapter->hw.mac.addr);
|
||||
netif_addr_unlock_bh(netdev);
|
||||
}
|
||||
wake_up(&adapter->vc_waitqueue);
|
||||
break;
|
||||
case VIRTCHNL_OP_GET_STATS: {
|
||||
|
|
|
|||
|
|
@ -3058,14 +3058,9 @@ void ice_ptp_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
|
|||
dev_err(ice_pf_to_dev(pf), "PTP reset failed %d\n", err);
|
||||
}
|
||||
|
||||
static int ice_ptp_setup_adapter(struct ice_pf *pf)
|
||||
static void ice_ptp_setup_adapter(struct ice_pf *pf)
|
||||
{
|
||||
if (!ice_pf_src_tmr_owned(pf) || !ice_is_primary(&pf->hw))
|
||||
return -EPERM;
|
||||
|
||||
pf->adapter->ctrl_pf = pf;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ice_ptp_setup_pf(struct ice_pf *pf)
|
||||
|
|
@ -3323,10 +3318,9 @@ void ice_ptp_init(struct ice_pf *pf)
|
|||
/* If this function owns the clock hardware, it must allocate and
|
||||
* configure the PTP clock device to represent it.
|
||||
*/
|
||||
if (ice_pf_src_tmr_owned(pf) && ice_is_primary(hw)) {
|
||||
err = ice_ptp_setup_adapter(pf);
|
||||
if (err)
|
||||
goto err_exit;
|
||||
if (ice_pf_src_tmr_owned(pf)) {
|
||||
ice_ptp_setup_adapter(pf);
|
||||
|
||||
err = ice_ptp_init_owner(pf);
|
||||
if (err)
|
||||
goto err_exit;
|
||||
|
|
|
|||
|
|
@ -2022,7 +2022,7 @@ static void idpf_tx_read_tstamp(struct idpf_tx_queue *txq, struct sk_buff *skb)
|
|||
/* Fetch timestamp from completion descriptor through
|
||||
* virtchnl msg to report to stack.
|
||||
*/
|
||||
queue_work(system_unbound_wq, txq->tstamp_task);
|
||||
queue_work(system_dfl_wq, txq->tstamp_task);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@
|
|||
/* Interrupt Cause Set */
|
||||
#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */
|
||||
#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */
|
||||
#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Aserted */
|
||||
#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Asserted */
|
||||
|
||||
/* Extended Interrupt Cause Set */
|
||||
/* E1000_EITR_CNT_IGNR is only for 82576 and newer */
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ s32 igb_disable_pcie_master(struct e1000_hw *hw)
|
|||
* igb_validate_mdi_setting - Verify MDI/MDIx settings
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
* Verify that when not using auto-negotitation that MDI/MDIx is correctly
|
||||
* Verify that when not using auto-negotiation that MDI/MDIx is correctly
|
||||
* set, which is forced to MDI mode only.
|
||||
**/
|
||||
s32 igb_validate_mdi_setting(struct e1000_hw *hw)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
/* Indicates that VF is still clear to send requests */
|
||||
#define E1000_VT_MSGTYPE_CTS 0x20000000
|
||||
#define E1000_VT_MSGINFO_SHIFT 16
|
||||
/* bits 23:16 are used for exra info for certain messages */
|
||||
/* bits 23:16 are used for extra info for certain messages */
|
||||
#define E1000_VT_MSGINFO_MASK (0xFF << E1000_VT_MSGINFO_SHIFT)
|
||||
|
||||
#define E1000_VF_RESET 0x01 /* VF requests reset */
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ s32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
|
|||
* Writes data to EEPROM at offset using SPI interface.
|
||||
*
|
||||
* If e1000_update_nvm_checksum is not called after this function , the
|
||||
* EEPROM will most likley contain an invalid checksum.
|
||||
* EEPROM will most likely contain an invalid checksum.
|
||||
**/
|
||||
s32 igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7157,7 +7157,7 @@ static irqreturn_t igb_msix_ring(int irq, void *data)
|
|||
/* Write the ITR value calculated from the previous interrupt. */
|
||||
igb_write_itr(q_vector);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -8198,7 +8198,7 @@ static irqreturn_t igb_intr_msi(int irq, void *data)
|
|||
if (icr & E1000_ICR_TS)
|
||||
igb_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -8244,7 +8244,7 @@ static irqreturn_t igb_intr(int irq, void *data)
|
|||
if (icr & E1000_ICR_TS)
|
||||
igb_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1500,12 +1500,13 @@ void igb_ptp_reset(struct igb_adapter *adapter)
|
|||
|
||||
/* Re-initialize the timer. */
|
||||
if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
|
||||
struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
|
||||
struct timespec64 ts;
|
||||
|
||||
ktime_get_real_ts64(&ts);
|
||||
igb_ptp_write_i210(adapter, &ts);
|
||||
} else {
|
||||
timecounter_init(&adapter->tc, &adapter->cc,
|
||||
ktime_to_ns(ktime_get_real()));
|
||||
ktime_get_real_ns());
|
||||
}
|
||||
out:
|
||||
spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ bool igc_link_test(struct igc_adapter *adapter, u64 *data)
|
|||
|
||||
*data = 0;
|
||||
|
||||
/* add delay to give enough time for autonegotioation to finish */
|
||||
/* add delay to give enough time for autonegotiation to finish */
|
||||
ssleep(5);
|
||||
|
||||
link_up = igc_has_link(adapter);
|
||||
|
|
|
|||
|
|
@ -1797,7 +1797,7 @@ static const enum pkt_hash_types igc_rss_type_table[IGC_RSS_TYPE_MAX_TABLE] = {
|
|||
[IGC_RSS_TYPE_HASH_UDP_IPV6_EX] = PKT_HASH_TYPE_L4,
|
||||
[10] = PKT_HASH_TYPE_NONE, /* RSS Type above 9 "Reserved" by HW */
|
||||
[11] = PKT_HASH_TYPE_NONE, /* keep array sized for SW bit-mask */
|
||||
[12] = PKT_HASH_TYPE_NONE, /* to handle future HW revisons */
|
||||
[12] = PKT_HASH_TYPE_NONE, /* to handle future HW revisions */
|
||||
[13] = PKT_HASH_TYPE_NONE,
|
||||
[14] = PKT_HASH_TYPE_NONE,
|
||||
[15] = PKT_HASH_TYPE_NONE,
|
||||
|
|
@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)
|
|||
/* Write the ITR value calculated from the previous interrupt. */
|
||||
igc_write_itr(q_vector);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data)
|
|||
if (icr & IGC_ICR_TS)
|
||||
igc_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data)
|
|||
if (icr & IGC_ICR_TS)
|
||||
igc_tsync_interrupt(adapter);
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -7039,7 +7039,7 @@ static enum xdp_rss_hash_type igc_xdp_rss_type[IGC_RSS_TYPE_MAX_TABLE] = {
|
|||
[IGC_RSS_TYPE_HASH_UDP_IPV6_EX] = XDP_RSS_TYPE_L4_IPV6_UDP_EX,
|
||||
[10] = XDP_RSS_TYPE_NONE, /* RSS Type above 9 "Reserved" by HW */
|
||||
[11] = XDP_RSS_TYPE_NONE, /* keep array sized for SW bit-mask */
|
||||
[12] = XDP_RSS_TYPE_NONE, /* to handle future HW revisons */
|
||||
[12] = XDP_RSS_TYPE_NONE, /* to handle future HW revisions */
|
||||
[13] = XDP_RSS_TYPE_NONE,
|
||||
[14] = XDP_RSS_TYPE_NONE,
|
||||
[15] = XDP_RSS_TYPE_NONE,
|
||||
|
|
|
|||
|
|
@ -142,20 +142,14 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
|
|||
IXGBE_PF_HICR);
|
||||
|
||||
/* Read sync Admin Command response */
|
||||
if ((hicr & IXGBE_PF_HICR_SV)) {
|
||||
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
|
||||
if ((hicr & IXGBE_PF_HICR_SV))
|
||||
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
|
||||
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
|
||||
raw_desc[i] = raw_desc[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* Read async Admin Command response */
|
||||
if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C)) {
|
||||
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
|
||||
if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C))
|
||||
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
|
||||
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
|
||||
raw_desc[i] = raw_desc[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle timeout and invalid state of HICR register */
|
||||
if (hicr & IXGBE_PF_HICR_C)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user