[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/12] hw/net/tulip: add chip status register values
From: |
deller |
Subject: |
[PATCH v2 10/12] hw/net/tulip: add chip status register values |
Date: |
Fri, 9 Feb 2024 12:56:31 +0100 |
From: Sven Schnelle <svens@stackframe.org>
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 6d4fb06dad..1f2ef20977 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -421,7 +421,7 @@ static uint16_t tulip_mdi_default[] = {
/* MDI Registers 8 - 15 */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
/* MDI Registers 16 - 31 */
- 0x0003, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0003, 0x0000, 0x0001, 0x0000, 0x3b40, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};
@@ -429,7 +429,7 @@ static uint16_t tulip_mdi_default[] = {
static const uint16_t tulip_mdi_mask[] = {
0x0000, 0xffff, 0xffff, 0xffff, 0xc01f, 0xffff, 0xffff, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0fff, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x0fff, 0x0000, 0xffff, 0xffff, 0x0000, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};
--
2.43.0
- Re: [PATCH v2 02/12] target/hppa: Add "diag 0x101" for console output support, (continued)
- [PATCH v2 03/12] hw/pci-host/astro: Avoid aborting on access failure, deller, 2024/02/09
- [PATCH v2 07/12] lasi: Add reset I/O ports for LASI audio and FDC, deller, 2024/02/09
- [PATCH v2 06/12] target/hppa: Implement do_transaction_failed handler for I/O errors, deller, 2024/02/09
- [PATCH v2 01/12] disas/hppa: Add disassembly for qemu specific instructions, deller, 2024/02/09
- [PATCH v2 08/12] target/hppa: Allow read-access to PSW with rsm 0, reg instruction, deller, 2024/02/09
- [PATCH v2 12/12] hw/hppa/machine: Load 64-bit firmware on 64-bit machines, deller, 2024/02/09
- [PATCH v2 09/12] target/hppa: PDC_BTLB_INFO uses 32-bit ints, deller, 2024/02/09
- [PATCH v2 11/12] target/hppa: Update SeaBIOS-hppa to version 16, deller, 2024/02/09
- [PATCH v2 10/12] hw/net/tulip: add chip status register values,
deller <=