Thread (5 messages) 5 messages, 4 authors, 2025-08-30

Re: [PATCH net] xirc2ps_cs: fix register access when enabling FullDuplex

From: Simon Horman <horms@kernel.org>
Date: 2025-08-28 17:21:27

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 <redacted>
---
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>

...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help