[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240715104845.51419-3-sergey.temerkhanov@intel.com>
Date: Mon, 15 Jul 2024 12:48:45 +0200
From: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org,
Grzegorz Nitka <grzegorz.nitka@...el.com>,
Karol Kolacinski <karol.kolacinski@...el.com>,
Sergey Temerkhanov <sergey.temerkhanov@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: [PATCH iwl-net v1 2/2] ice: Skip PTP HW writes during PTP reset procedure
From: Grzegorz Nitka <grzegorz.nitka@...el.com>
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 <grzegorz.nitka@...el.com>
Co-developed-by: Karol Kolacinski <karol.kolacinski@...el.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@...el.com>
Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
---
drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 85b19e94e2ed..1f365bd6f525 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -1420,6 +1420,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 (ice_get_phy_model(hw)) {
case ICE_PHY_E810:
/* Do not reconfigure E810 PHY */
--
2.43.0
Powered by blists - more mailing lists