diff mbox series

[net] net: pcs: xpcs: fix the wrong register that was written back

Message ID 20240924022857.865422-1-jiawenwu@trustnetic.com (mailing list archive)
State Accepted
Commit 93ef6ee5c20e9330477930ec6347672c9e0cf5a6
Delegated to: Netdev Maintainers
Headers show
Series [net] net: pcs: xpcs: fix the wrong register that was written back | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-26--21-00 (tests: 768)

Commit Message

Jiawen Wu Sept. 24, 2024, 2:28 a.m. UTC
The value is read from the register TXGBE_RX_GEN_CTL3, and it should be
written back to TXGBE_RX_GEN_CTL3 when it changes some fields.

Cc: stable@vger.kernel.org
Fixes: f629acc6f210 ("net: pcs: xpcs: support to switch mode for Wangxun NICs")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/pcs/pcs-xpcs-wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell King (Oracle) Sept. 24, 2024, 8:28 a.m. UTC | #1
On Tue, Sep 24, 2024 at 10:28:57AM +0800, Jiawen Wu wrote:
> The value is read from the register TXGBE_RX_GEN_CTL3, and it should be
> written back to TXGBE_RX_GEN_CTL3 when it changes some fields.
> 
> Cc: stable@vger.kernel.org

Reported-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

> Fixes: f629acc6f210 ("net: pcs: xpcs: support to switch mode for Wangxun NICs")
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!
patchwork-bot+netdevbpf@kernel.org Oct. 1, 2024, 9:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 24 Sep 2024 10:28:57 +0800 you wrote:
> The value is read from the register TXGBE_RX_GEN_CTL3, and it should be
> written back to TXGBE_RX_GEN_CTL3 when it changes some fields.
> 
> Cc: stable@vger.kernel.org
> Fixes: f629acc6f210 ("net: pcs: xpcs: support to switch mode for Wangxun NICs")
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> 
> [...]

Here is the summary with links:
  - [net] net: pcs: xpcs: fix the wrong register that was written back
    https://git.kernel.org/netdev/net/c/93ef6ee5c20e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/pcs/pcs-xpcs-wx.c b/drivers/net/pcs/pcs-xpcs-wx.c
index 19c75886f070..5f5cd3596cb8 100644
--- a/drivers/net/pcs/pcs-xpcs-wx.c
+++ b/drivers/net/pcs/pcs-xpcs-wx.c
@@ -109,7 +109,7 @@  static void txgbe_pma_config_1g(struct dw_xpcs *xpcs)
 	txgbe_write_pma(xpcs, TXGBE_DFE_TAP_CTL0, 0);
 	val = txgbe_read_pma(xpcs, TXGBE_RX_GEN_CTL3);
 	val = u16_replace_bits(val, 0x4, TXGBE_RX_GEN_CTL3_LOS_TRSHLD0);
-	txgbe_write_pma(xpcs, TXGBE_RX_EQ_ATTN_CTL, val);
+	txgbe_write_pma(xpcs, TXGBE_RX_GEN_CTL3, val);
 
 	txgbe_write_pma(xpcs, TXGBE_MPLLA_CTL0, 0x20);
 	txgbe_write_pma(xpcs, TXGBE_MPLLA_CTL3, 0x46);