ice: Skip PTP HW writes during PTP reset procedure
authorGrzegorz Nitka <grzegorz.nitka@intel.com>
Mon, 15 Jul 2024 15:39:11 +0000 (17:39 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 7 Aug 2024 17:55:36 +0000 (10:55 -0700)
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

Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Co-developed-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c

index e2786cc1328611a4b2dae3b5ba88211d2e7e57bc..ef2e858f49bb0ed12302454177a2640b07ec7161 100644 (file)
@@ -1477,6 +1477,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 */