ice: Reset procedure fixes
Subsystems (3)
v2 cover ice: Reset procedure fixes
Fixes preventing possible races between resets (CORER etc) and OICR ISR invocation / PTP hardware access
v1->v2: Patch rebase
Grzegorz Nitka (2):
ice: Fix reset handler
ice: Skip PTP HW writes during PTP reset procedure
drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++ 2 files changed, 6 insertions(+)
Signature · 1 line
2.43.0
PATCH v2 1/2 ice: Fix reset handler
From: Grzegorz Nitka <[email protected]>
Synchronize OICR IRQ when preparing for reset to avoid potential race conditions between the reset procedure and OICR
--- drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/ice/ice_main.c +2 -0
@@ -560,6 +560,8 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type)if (test_bit (ICE_PREPARED_FOR_RESET , pf->state))return ; +synchronize_irq (pf->oicr_irq.virq); +ice_unplug_aux_dev (pf);/* Notify VFs of impending reset */
Signature · 1 line
2.43.0
RE: [Intel-wired-lan] [PATCH iwl-net v2 1/2] ice: Fix reset handler
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Sergey Temerkhanov
Sent: Monday, July 15, 2024 9:09 PM
To: [email protected]
Cc: Temerkhanov, Sergey <[email protected]>; [email protected]; Kitszel, Przemyslaw <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2 1/2] ice: Fix reset handlerFrom: Grzegorz Nitka <[email protected]>
Synchronize OICR IRQ when preparing for reset to avoid potential race conditions between the reset procedure and OICR
Quoted 8 lines
Signed-off-by Grzegorz Nitka <[email protected]>Signed-off-by Sergey Temerkhanov <[email protected]>Fixes 4aad5335969f ("ice: add individual interrupt allocation")Reviewed-by Przemek Kitszel <[email protected]>--- drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ 1 file changed, 2 insertions(+)
PATCH v2 2/2 ice: Skip PTP HW writes during PTP reset procedure
In reply to Sergey TemerkhanovFrom: Grzegorz Nitka <[email protected]>
Block HW write access for the driver while the device is in reset to avoid potential race condition and access to the PTP HW in non-nominal state which could lead to undesired effects
--- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/ice/ice_ptp.c +4 -0
@@ -1408,6 +1408,10 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, bool linkup)/* Update cached link status for this port immediately */ ptp_port->link_up = linkup; +/* Skip HW writes if reset is in progress */ +if (pf->hw.reset_ongoing) +return ; +switch (hw->ptp.phy_model) {case ICE_PHY_E810 :/* Do not reconfigure E810 PHY */
Signature · 1 line
2.43.0
RE: [Intel-wired-lan] [PATCH iwl-net v2 2/2] ice: Skip PTP HW writes during PTP reset procedure
Quoted 17 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Sergey Temerkhanov
Sent: Monday, July 15, 2024 9:09 PM
To: [email protected]
Cc: Temerkhanov, Sergey <[email protected]>; [email protected]; Kolacinski, Karol <[email protected]>; Kitszel, Przemyslaw <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2 2/2] ice: Skip PTP HW writes during PTP reset procedureFrom: Grzegorz Nitka <[email protected]>
Block HW write access for the driver while the device is in reset to avoid potential race condition and access to the PTP HW in non-nominal state which could lead to undesired effects
Signed-off-by Grzegorz Nitka <[email protected]>Co-developed-by Karol Kolacinski <[email protected]>Signed-off-by Karol Kolacinski <[email protected]>Signed-off-by Sergey Temerkhanov <[email protected]>Fixes 4aad5335969f ("ice: add individual interrupt allocation")Reviewed-by Przemek Kitszel <[email protected]>
Quoted 4 lines
--- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++ 1 file changed, 4 insertions(+)