net/cadence_gem: Set PHY autonegotiation restart status
commit6623d214451ec4f784d1c82c51c655a01fed1b06
authorLinus Ziegert <linus.ziegert+qemu@holoplot.com>
Tue, 19 Nov 2019 13:20:27 +0000 (19 13:20 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 19 Nov 2019 13:20:27 +0000 (19 13:20 +0000)
treefd0b4a2864a67440d4953789f60ce5052a67f621
parent3a6606c7aa1e6e687e435c1eae929a396bd866e3
net/cadence_gem: Set PHY autonegotiation restart status

The Linux kernel PHY driver sets AN_RESTART in the BMCR of the
PHY when autonegotiation is started.
Recently the kernel started to read back the PHY's AN_RESTART
bit and now checks whether the autonegotiation is complete and
the bit was cleared [1]. Otherwise the link status is down.

The emulated PHY needs to clear AN_RESTART immediately to inform
the kernel driver about the completion of autonegotiation phase.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c36757eb9dee

Signed-off-by: Linus Ziegert <linus.ziegert+qemu@holoplot.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20191104181604.21943-1-linus.ziegert+qemu@holoplot.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/net/cadence_gem.c