From: Ferruh Yigit <ferruh.yigit@xilinx.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: <stable@dpdk.org>, <dev@dpdk.org>
Subject: Re: [PATCH 3/7] net/txgbe: fix register polling
Date: Tue, 21 Jun 2022 13:19:27 +0100 [thread overview]
Message-ID: <8d89c0b2-f9cb-e3e5-72e1-736f655ab5c3@xilinx.com> (raw)
In-Reply-To: <20220620075512.588744-4-jiawenwu@trustnetic.com>
On 6/20/2022 8:55 AM, Jiawen Wu wrote:
> Fix to poll some specific registers, which expect bit 0.
>
> Fixes: 24a4c76aff4d ("net/txgbe: add error types and registers")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> ---
> drivers/net/txgbe/base/txgbe_regs.h | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
> index 3139796911..911bb6e04e 100644
> --- a/drivers/net/txgbe/base/txgbe_regs.h
> +++ b/drivers/net/txgbe/base/txgbe_regs.h
> @@ -1864,8 +1864,13 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
> }
>
> do {
> - all |= rd32(hw, reg);
> - value |= mask & all;
> + if (expect != 0) {
> + all |= rd32(hw, reg);
> + value |= mask & all;
> + } else {
> + all = rd32(hw, reg);
> + value = mask & all;
> + }
> if (value == expect)
> break;
>
> @@ -1898,7 +1903,7 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
>
> #define wr32w(hw, reg, val, mask, slice) do { \
> wr32((hw), reg, val); \
> - po32m((hw), reg, mask, mask, NULL, 5, slice); \
> + po32m((hw), reg, mask, 0, NULL, 5, slice); \
Just to double check, is this change intentional, to always expect
reading '0' from registers after writing to them?
Perhaps you can explain a little more about this polling after
read/write logic and what was wrong in the commit log.
> } while (0)
>
> #define TXGBE_XPCS_IDAADDR 0x13000
next prev parent reply other threads:[~2022-06-21 12:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 7:55 [PATCH 0/7] Fixes and supports for Wangxun NICs Jiawen Wu
2022-06-20 7:55 ` [PATCH 1/7] net/txgbe: support OEM subsystem vendor ID Jiawen Wu
2022-06-21 12:19 ` Ferruh Yigit
2022-06-20 7:55 ` [PATCH 2/7] net/ngbe: " Jiawen Wu
2022-06-21 12:19 ` Ferruh Yigit
2022-06-20 7:55 ` [PATCH 3/7] net/txgbe: fix register polling Jiawen Wu
2022-06-21 12:19 ` Ferruh Yigit [this message]
2022-06-22 2:44 ` Jiawen Wu
2022-06-20 7:55 ` [PATCH 4/7] net/ngbe: add more packet statistics Jiawen Wu
2022-06-20 7:55 ` [PATCH 5/7] net/ngbe: fix YT PHY UTP mode to link up Jiawen Wu
2022-06-20 7:55 ` [PATCH 6/7] net/ngbe: support autoneg on/off for external PHY SFI mode Jiawen Wu
2022-06-20 7:55 ` [PATCH 7/7] net/ngbe: support YT PHY SGMII to RGMII mode Jiawen Wu
2022-06-21 12:20 ` [PATCH 0/7] Fixes and supports for Wangxun NICs 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=8d89c0b2-f9cb-e3e5-72e1-736f655ab5c3@xilinx.com \
--to=ferruh.yigit@xilinx.com \
--cc=dev@dpdk.org \
--cc=jiawenwu@trustnetic.com \
--cc=stable@dpdk.org \
/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).