From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Russell King \(Oracle\)'" <linux@armlinux.org.uk>
Cc: <netdev@vger.kernel.org>
Subject: RE: Bug? xpcs-wx: read-modify-write to different registers?
Date: Mon, 23 Sep 2024 18:12:44 +0800 [thread overview]
Message-ID: <01ee01db0da1$2196ac60$64c40520$@trustnetic.com> (raw)
In-Reply-To: <ZvEyZGKt5elazWfj@shell.armlinux.org.uk>
> -----Original Message-----
> From: Russell King (Oracle) <linux@armlinux.org.uk>
> Sent: Monday, September 23, 2024 5:18 PM
> To: Jiawen Wu <jiawenwu@trustnetic.com>
> Cc: netdev@vger.kernel.org
> Subject: Bug? xpcs-wx: read-modify-write to different registers?
>
> 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.
OMG, it's a real bug. Register TXGBE_RX_GEN_CTL3 should be written back.
Thanks Russell, I'll send a patch to fix it.
prev parent reply other threads:[~2024-09-23 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 9:18 Bug? xpcs-wx: read-modify-write to different registers? Russell King (Oracle)
2024-09-23 10:12 ` Jiawen Wu [this message]
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='01ee01db0da1$2196ac60$64c40520$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=linux@armlinux.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.