]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xirc2ps_cs: fix register access when enabling FullDuplex
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Wed, 27 Aug 2025 19:26:43 +0000 (12:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:54:13 +0000 (18:54 +0200)
commite1bbdfc3d8270431c2a0c79d5753771ea14769e6
tree6402da7e04924f22cd0bb3b7da4fb6f33e37f94e
parent2ca99fc3512a8074de20ee52a87b492dfcc41a4d
xirc2ps_cs: fix register access when enabling FullDuplex

[ Upstream commit b79e498080b170fd94fc83bca2471f450811549b ]

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>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250827192645.658496-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xircom/xirc2ps_cs.c