From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Chaoyong He <chaoyong.he@corigine.com>, dev@dpdk.org
Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com,
James Hershaw <james.hershaw@corigine.com>
Subject: Re: [PATCH v2 2/2] net/nfp: write link speed to control BAR
Date: Fri, 10 Mar 2023 11:15:34 +0000 [thread overview]
Message-ID: <a9fa6bd3-3813-ab95-34ce-d1772c1d04f0@amd.com> (raw)
In-Reply-To: <20230310062542.817107-3-chaoyong.he@corigine.com>
On 3/10/2023 6:25 AM, Chaoyong He wrote:
> + /**
> + * Shift and mask nn_link_status so that it is effectively the value
> + * at offset NFP_NET_CFG_STS_NSP_LINK_RATE.
> + */
> + nn_link_status = (nn_link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) &
> + NFP_NET_CFG_STS_LINK_RATE_MASK;
Thanks for extensive commenting, perhaps this is the source of
confusion, I can't see how above logic makes effectively the value at
offset LINK_RATE.
NFP_NET_CFG_STS_LINK_RATE_SHIFT = 1
NFP_NET_CFG_STS_LINK_RATE_MASK = 0xF
NFP_NET_CFG_STS = 0x34
NFP_NET_CFG_STS_NSP_LINK_RATE = 0x36
nfp_net_notify_port_speed()
uint16_t speed;
*(0x36) = speed
nfp_net_link_update()
uint16_t val = *(0x34)
val = (val >> 1) & 0xF;
How come 'speed' and 'val' are same value?
Either there is a mistake or FW is making something in the background, I
am trying to clarify this in past few comments but not able to yet.
next prev parent reply other threads:[~2023-03-10 11:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 6:29 [PATCH] " Chaoyong He
2023-02-23 16:39 ` Ferruh Yigit
2023-03-06 7:06 ` Chaoyong He
2023-03-07 13:24 ` Ferruh Yigit
2023-03-10 6:07 ` Chaoyong He
2023-03-10 6:25 ` [PATCH v2 0/2] " Chaoyong He
2023-03-10 6:25 ` [PATCH v2 1/2] net/nfp: add helper functions for read/write 16b values Chaoyong He
2023-03-10 6:25 ` [PATCH v2 2/2] net/nfp: write link speed to control BAR Chaoyong He
2023-03-10 11:15 ` Ferruh Yigit [this message]
2023-03-13 3:03 ` Chaoyong He
2023-03-13 8:39 ` Ferruh Yigit
2023-03-13 10:18 ` [PATCH v2 0/2] " Ferruh Yigit
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=a9fa6bd3-3813-ab95-34ce-d1772c1d04f0@amd.com \
--to=ferruh.yigit@amd.com \
--cc=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=james.hershaw@corigine.com \
--cc=niklas.soderlund@corigine.com \
--cc=oss-drivers@corigine.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;
as well as URLs for NNTP newsgroup(s).