Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Karol Kolacinski <karol.kolacinski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: netdev@vger.kernel.org,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	przemyslaw.kitszel@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 2/5] ice: Fix quad registers read on E825
Date: Wed, 2 Oct 2024 15:08:31 -0700	[thread overview]
Message-ID: <b27dd41b-04a4-1a33-84b8-c502a2157532@intel.com> (raw)
In-Reply-To: <20240930121022.671217-3-karol.kolacinski@intel.com>



On 9/30/2024 5:08 AM, Karol Kolacinski wrote:
> Quad registers are read/written incorrectly. E825 devices always use
> quad 0 address and differentiate between the PHYs by changing SBQ
> destination device (phy_0 or phy_0_peer).
> 
> Add helpers for reading/writing PTP registers shared per quad and use
> correct quad address and SBQ destination device based on port.
> 
> Rename rmn_0 to phy_0 and remove rmn_1 and rmn_2 as E82X HW does not
> support it. Rename eth56g_phy_1 to phy_0_peer.
> 
> 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>

There's a bunch of kdoc issues being reported.

Mostly missing 'Return:' but struct ice_phy_reg_info_eth56g also needs 
its kdoc updated.

...

> +/**
> + * ice_ptp_get_dest_dev_e825 - get destination PHY for given port number
> + * @hw: pointer to the HW struct
> + * @port: destination port
> + */
> +static enum ice_sbq_msg_dev ice_ptp_get_dest_dev_e825(struct ice_hw *hw,
> +						      u8 port)
> +{
> +	/* On a single complex E825C, PHY 0 is always destination device phy_0
> +	 * and PHY 1 is phy_0_peer.
> +	 */
> +	if (port / hw->ptp.ports_per_phy)
> +		return phy_0_peer;
> +	else
> +		return phy_0;

smatch reports:
drivers/net/ethernet/intel/ice/ice_ptp_hw.c:920 
ice_ptp_get_dest_dev_e825() warn: replace divide condition 'port / 
hw->ptp.ports_per_phy' with 'port >= hw->ptp.ports_per_phy'

Oddly on a different patch, but it was introduced here.

Thanks,
Tony

  reply	other threads:[~2024-10-02 22:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 12:08 [Intel-wired-lan] [PATCH iwl-net 0/5] Fix E825 initialization Karol Kolacinski
2024-09-30 12:08 ` [Intel-wired-lan] [PATCH iwl-net 1/5] ice: " Karol Kolacinski
2024-10-02 22:00   ` Tony Nguyen
2024-09-30 12:08 ` [Intel-wired-lan] [PATCH iwl-net 2/5] ice: Fix quad registers read on E825 Karol Kolacinski
2024-10-02 22:08   ` Tony Nguyen [this message]
2024-09-30 12:08 ` [Intel-wired-lan] [PATCH iwl-net 3/5] ice: Fix ETH56G FC-FEC Rx offset value Karol Kolacinski
2024-09-30 12:08 ` [Intel-wired-lan] [PATCH iwl-net 4/5] ice: Remove unnecessary offset calculation for PF scoped registers Karol Kolacinski
2024-10-02 22:12   ` Tony Nguyen
2024-09-30 12:08 ` [Intel-wired-lan] [PATCH iwl-net 5/5] ice: Add correct PHY lane assignment Karol Kolacinski

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=b27dd41b-04a4-1a33-84b8-c502a2157532@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=karol.kolacinski@intel.com \
    --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