hw/net/tulip: add chip status register values
commit9b60a3ed5569a70bbdd29e3c9ec4c5d4685c6e2c
authorSven Schnelle <svens@stackframe.org>
Mon, 5 Feb 2024 19:47:17 +0000 (5 20:47 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 11 Feb 2024 12:20:23 +0000 (11 13:20 +0100)
tree68b27cc9e4de93d4064ec16c525715d01406440a
parent68e3e604d677b446eed095b5f99904483031f12d
hw/net/tulip: add chip status register values

Netbsd isn't able to detect a link on the emulated tulip card. That's
because netbsd reads the Chip Status Register of the Phy (address
0x14). The default phy data in the qemu tulip driver is all zero,
which means no link is established and autonegotation isn't complete.

Therefore set the register to 0x3b40, which means:

Link is up, Autonegotation complete, Full Duplex, 100MBit/s Link
speed.

Also clear the mask because this register is read only.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
hw/net/tulip.c