[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250828172123.GD31759@horms.kernel.org>
Date: Thu, 28 Aug 2025 18:21:23 +0100
From: Simon Horman <horms@...nel.org>
To: Alok Tiwari <alok.a.tiwari@...cle.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] xirc2ps_cs: fix register access when enabling
FullDuplex
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@...cle.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@...nel.org>
...
Powered by blists - more mailing lists