Commit 1bb3c548 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2024-08-28 (igb, ice)

This series contains updates to igb and ice drivers.

Daiwei Li restores writing the TSICR (TimeSync Interrupt Cause)
register on 82850 devices to workaround a hardware issue for igb.

Dawid detaches netdev device for reset to avoid ethtool accesses during
reset causing NULL pointer dereferences on ice.

* '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: Add netif_device_attach/detach into PF reset flow
  igb: Fix not clearing TimeSync interrupts for 82580
====================

Link: https://patch.msgid.link/20240828225444.645154-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents b57d643a d11a6763
...@@ -608,6 +608,9 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -608,6 +608,9 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
memset(&vsi->mqprio_qopt, 0, sizeof(vsi->mqprio_qopt)); memset(&vsi->mqprio_qopt, 0, sizeof(vsi->mqprio_qopt));
} }
} }
if (vsi->netdev)
netif_device_detach(vsi->netdev);
skip: skip:
/* clear SW filtering DB */ /* clear SW filtering DB */
...@@ -7589,6 +7592,7 @@ static void ice_update_pf_netdev_link(struct ice_pf *pf) ...@@ -7589,6 +7592,7 @@ static void ice_update_pf_netdev_link(struct ice_pf *pf)
*/ */
static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
{ {
struct ice_vsi *vsi = ice_get_main_vsi(pf);
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
bool dvm; bool dvm;
...@@ -7731,6 +7735,9 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -7731,6 +7735,9 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
ice_rebuild_arfs(pf); ice_rebuild_arfs(pf);
} }
if (vsi && vsi->netdev)
netif_device_attach(vsi->netdev);
ice_update_pf_netdev_link(pf); ice_update_pf_netdev_link(pf);
/* tell the firmware we are up */ /* tell the firmware we are up */
......
...@@ -6960,10 +6960,20 @@ static void igb_extts(struct igb_adapter *adapter, int tsintr_tt) ...@@ -6960,10 +6960,20 @@ static void igb_extts(struct igb_adapter *adapter, int tsintr_tt)
static void igb_tsync_interrupt(struct igb_adapter *adapter) static void igb_tsync_interrupt(struct igb_adapter *adapter)
{ {
const u32 mask = (TSINTR_SYS_WRAP | E1000_TSICR_TXTS |
TSINTR_TT0 | TSINTR_TT1 |
TSINTR_AUTT0 | TSINTR_AUTT1);
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
u32 tsicr = rd32(E1000_TSICR); u32 tsicr = rd32(E1000_TSICR);
struct ptp_clock_event event; struct ptp_clock_event event;
if (hw->mac.type == e1000_82580) {
/* 82580 has a hardware bug that requires an explicit
* write to clear the TimeSync interrupt cause.
*/
wr32(E1000_TSICR, tsicr & mask);
}
if (tsicr & TSINTR_SYS_WRAP) { if (tsicr & TSINTR_SYS_WRAP) {
event.type = PTP_CLOCK_PPS; event.type = PTP_CLOCK_PPS;
if (adapter->ptp_caps.pps) if (adapter->ptp_caps.pps)
......
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