[PATCH QEMU] tulip: Fix LXT970 PHY registers

~disean posted 1 patch 6 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/169675028663.32356.15668868212772607355-0@git.sr.ht
Maintainers: Sven Schnelle <svens@stackframe.org>, Jason Wang <jasowang@redhat.com>
hw/net/tulip.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
mode change 100644 => 100755 hw/net/tulip.c
[PATCH QEMU] tulip: Fix LXT970 PHY registers
Posted by ~disean 6 months, 4 weeks ago
From: Dmitry Borisov <di.sean@protonmail.com>

Fix incorrect MII status value (0xf02c).

Use default values from a 21143-based board:
https://www.beowulf.org/pipermail/tulip-bug/2000-February/000485.html

Signed-off-by: Dmitry Borisov <di.sean@protonmail.com>
---
 hw/net/tulip.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 hw/net/tulip.c

diff --git a/hw/net/tulip.c b/hw/net/tulip.c
old mode 100644
new mode 100755
index 915e5fb595..43e8f4bcb5
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -415,14 +415,15 @@ static void tulip_update_rs(TULIPState *s, int state)
     trace_tulip_rx_state(tulip_rx_state_name(state));
 }
 
+/* LEVEL1 LXT970 PHY registers */
 static uint16_t tulip_mdi_default[] = {
     /* MDI Registers 0 - 6, 7 */
-    0x3100, 0xf02c, 0x7810, 0x0000, 0x0501, 0x4181, 0x0000, 0x0000,
+    0x1000, 0x782d, 0x7810, 0x0001, 0x01e1, 0x41e1, 0x0001, 0x0000,
     /* MDI Registers 8 - 15 */
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
     /* MDI Registers 16 - 31 */
-    0x0003, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x4000, 0x0000, 0x38c8, 0x0010, 0x0000, 0x0002,
+    0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
 };
 
 /* Readonly mask for MDI (PHY) registers */
-- 
2.38.5