netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: netdev@vger.kernel.org
Subject: Bug? xpcs-wx: read-modify-write to different registers?
Date: Mon, 23 Sep 2024 10:18:28 +0100	[thread overview]
Message-ID: <ZvEyZGKt5elazWfj@shell.armlinux.org.uk> (raw)

Hi,

While making some cleanups to the XPCS driver, I spotted the following
in pcs-xpcs-wx.c:

        val = txgbe_read_pma(xpcs, TXGBE_RX_GEN_CTL3);
        val = u16_replace_bits(val, 0x4, TXGBE_RX_GEN_CTL3_LOS_TRSHLD0);
        txgbe_write_pma(xpcs, TXGBE_RX_EQ_ATTN_CTL, val);

This reads from the TXGBE_RX_GEN_CTL3 register, changes a value in a
field, and then writes it back to a different register,
TXGBE_RX_EQ_ATTN_CTL. This doesn't look correct.

Please check whether this code is correct, if not please submit a fix.

Thanks.

Russell.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

             reply	other threads:[~2024-09-23  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23  9:18 Russell King (Oracle) [this message]
2024-09-23 10:12 ` Bug? xpcs-wx: read-modify-write to different registers? Jiawen Wu

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=ZvEyZGKt5elazWfj@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=jiawenwu@trustnetic.com \
    --cc=netdev@vger.kernel.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).