From: Karol Kolacinski <karol.kolacinski@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org,
Karol Kolacinski <karol.kolacinski@intel.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com
Subject: [Intel-wired-lan] [PATCH v2 iwl-net 1/4] ice: Fix E825 initialization
Date: Thu, 10 Oct 2024 16:21:14 +0200 [thread overview]
Message-ID: <20241010142254.2047150-2-karol.kolacinski@intel.com> (raw)
In-Reply-To: <20241010142254.2047150-1-karol.kolacinski@intel.com>
Current implementation checks revision of all PHYs on all PFs, which is
incorrect and may result in initialization failure. Check only the
revision of the current PHY.
Fixes: 7cab44f1c35f ("ice: Introduce ETH56G PHY model for E825C products")
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
---
V1 -> V2: Removed net-next hunks
drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 22 ++++++++-------------
drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 3 ++-
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
index 3a33e6b9b313..d9a3c7de0342 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
@@ -2665,14 +2665,15 @@ static bool ice_is_muxed_topo(struct ice_hw *hw)
}
/**
- * ice_ptp_init_phy_e825c - initialize PHY parameters
+ * ice_ptp_init_phy_e825 - initialize PHY parameters
* @hw: pointer to the HW struct
*/
-static void ice_ptp_init_phy_e825c(struct ice_hw *hw)
+static void ice_ptp_init_phy_e825(struct ice_hw *hw)
{
struct ice_ptp_hw *ptp = &hw->ptp;
struct ice_eth56g_params *params;
- u8 phy;
+ u32 phy_rev;
+ int err;
ptp->phy_model = ICE_PHY_ETH56G;
params = &ptp->phy.eth56g;
@@ -2686,16 +2687,9 @@ static void ice_ptp_init_phy_e825c(struct ice_hw *hw)
ptp->num_lports = params->num_phys * ptp->ports_per_phy;
ice_sb_access_ena_eth56g(hw, true);
- for (phy = 0; phy < params->num_phys; phy++) {
- u32 phy_rev;
- int err;
-
- err = ice_read_phy_eth56g(hw, phy, PHY_REG_REVISION, &phy_rev);
- if (err || phy_rev != PHY_REVISION_ETH56G) {
- ptp->phy_model = ICE_PHY_UNSUP;
- return;
- }
- }
+ err = ice_read_phy_eth56g(hw, hw->pf_id, PHY_REG_REVISION, &phy_rev);
+ if (err || phy_rev != PHY_REVISION_ETH56G)
+ ptp->phy_model = ICE_PHY_UNSUP;
ptp->is_2x50g_muxed_topo = ice_is_muxed_topo(hw);
}
@@ -5396,7 +5390,7 @@ void ice_ptp_init_hw(struct ice_hw *hw)
else if (ice_is_e810(hw))
ice_ptp_init_phy_e810(ptp);
else if (ice_is_e825c(hw))
- ice_ptp_init_phy_e825c(hw);
+ ice_ptp_init_phy_e825(hw);
else
ptp->phy_model = ICE_PHY_UNSUP;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
index 0852a34ade91..35141198f261 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
@@ -326,7 +326,8 @@ extern const struct ice_vernier_info_e82x e822_vernier[NUM_ICE_PTP_LNK_SPD];
*/
#define ICE_E810_PLL_FREQ 812500000
#define ICE_PTP_NOMINAL_INCVAL_E810 0x13b13b13bULL
-#define E810_OUT_PROP_DELAY_NS 1
+#define ICE_E810_OUT_PROP_DELAY_NS 1
+#define ICE_E825_SYNC_DELAY 6
/* Device agnostic functions */
u8 ice_get_ptp_src_clock_index(struct ice_hw *hw);
--
2.46.2
next prev parent reply other threads:[~2024-10-10 14:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 14:21 [Intel-wired-lan] [PATCH v2 iwl-net 0/4] Fix E825 initialization Karol Kolacinski
2024-10-10 14:21 ` Karol Kolacinski [this message]
2024-10-16 23:24 ` [Intel-wired-lan] [PATCH v2 iwl-net 1/4] ice: " Jacob Keller
2024-10-26 17:16 ` Nitka, Grzegorz
2024-10-10 14:21 ` [Intel-wired-lan] [PATCH v2 iwl-net 2/4] ice: Fix quad registers read on E825 Karol Kolacinski
2024-10-28 9:15 ` Nitka, Grzegorz
2024-10-10 14:21 ` [Intel-wired-lan] [PATCH v2 iwl-net 3/4] ice: Fix ETH56G FC-FEC Rx offset value Karol Kolacinski
2024-10-10 14:21 ` [Intel-wired-lan] [PATCH v2 iwl-net 4/4] ice: Add correct PHY lane assignment Karol Kolacinski
2024-10-16 23:29 ` Jacob Keller
2024-10-26 17:29 ` Nitka, Grzegorz
2024-10-16 23:27 ` [Intel-wired-lan] [PATCH v2 iwl-net 0/4] Fix E825 initialization Jacob Keller
2024-10-28 19:42 ` Nitka, Grzegorz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241010142254.2047150-2-karol.kolacinski@intel.com \
--to=karol.kolacinski@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox