From: Simon Horman <horms@kernel.org>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] xirc2ps_cs: fix register access when enabling FullDuplex
Date: Thu, 28 Aug 2025 18:21:23 +0100 [thread overview]
Message-ID: <20250828172123.GD31759@horms.kernel.org> (raw)
In-Reply-To: <20250827192645.658496-1-alok.a.tiwari@oracle.com>
On Wed, Aug 27, 2025 at 12:26:43PM -0700, Alok Tiwari wrote:
> The current code incorrectly passes (XIRCREG1_ECR | FullDuplex) as
> the register address to GetByte(), instead of fetching the register
> value and OR-ing it with FullDuplex. This results in an invalid
> register access.
>
> Fix it by reading XIRCREG1_ECR first, then or-ing with FullDuplex
> before writing it back.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> This patch is untested due to hardware limitations.
> If the Fixes tag is not required, it can be removed.
Interesting.
It seems that XIRCREG1_ECR is 14, and FullDuplex is 0x4.
And 14 | 0x4 = 14. So the right register is read. But
clearly the bit isn't set as intended when the register is written
(unless, somehow it's already set in the value read from the register).
So I guess this never worked as intended.
But I guess so long as the code exists it should
do what it intended to do.
Reviewed-by: Simon Horman <horms@kernel.org>
...
next prev parent reply other threads:[~2025-08-28 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 19:26 [PATCH net] xirc2ps_cs: fix register access when enabling FullDuplex Alok Tiwari
2025-08-28 17:21 ` Simon Horman [this message]
2025-08-28 18:49 ` [External] : " ALOK TIWARI
2025-08-28 21:36 ` Jacob Keller
2025-08-30 2:20 ` patchwork-bot+netdevbpf
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=20250828172123.GD31759@horms.kernel.org \
--to=horms@kernel.org \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).