]> 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:45:19 +0000 (18:45 +0200)
commit3a1de6d5562c1bf2776dadefa58d2cd56e12d48c
tree40de2295731e94ac5c13b6ba24c991062c25ff7b
parent83e1d9892ef51785cf0760b7681436760dda435a
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