]> git.baikalelectronics.ru Git - uboot.git/commit
net: gem: Fix setting PCS auto-negotiation state
authorRobert Hancock <robert.hancock@calian.com>
Thu, 11 Mar 2021 22:55:50 +0000 (16:55 -0600)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 30 Mar 2021 07:18:47 +0000 (09:18 +0200)
commitf766d6dca8ad45d0c08a251c27934d068afa044a
treefa417e1e5d527fa790b84a26c66ee1bdc97663ae
parent40196c44fe0c1d8cc4d0bae6f79978902aa85672
net: gem: Fix setting PCS auto-negotiation state

The code was trying to disable PCS auto-negotiation when a fixed-link node
is present and enable it otherwise. However, the PCS registers were being
written before the PCSSEL bit was set in the network configuration
register, and it appears that in this state, PCS register writes are
ignored. The result is that the intended change only took effect on the
second network operation that was performed, since at that time PCSSEL is
already enabled.

Fix the order of register writes so that PCS registers are only written to
after the PCS is enabled.

Fixes: 2c527b0171 ("net: gem: Disable PCS autonegotiation in case of fixed-link")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/zynq_gem.c