-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqemu_lan911x_tsfl_int.patch
34 lines (30 loc) · 1.25 KB
/
qemu_lan911x_tsfl_int.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From bbe2112d6c311142329f968576fbaaa91084525d Mon Sep 17 00:00:00 2001
From: Lucas Dietrich <[email protected]>
Date: Mon, 29 Aug 2022 22:00:46 +0200
Subject: [PATCH] Signal TSFL_INT flag for lan9118 device interrupt.
This flag is required for Micrium lan911x ethernet driver to work.
Signed-off-by: Lucas Dietrich <[email protected]>
---
hw/net/lan9118.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 6aff424cbe..a8364cc9bf 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -696,6 +696,14 @@ static void do_tx_packet(lan9118_state *s)
n = (s->tx_status_fifo_head + s->tx_status_fifo_used) & 511;
s->tx_status_fifo[n] = status;
s->tx_status_fifo_used++;
+
+ /* TX Status Level. The value in this field sets the level, in number of
+ * DWORDs, at which the TX Status FIFO Level interrupt (TSFL) will be
+ * generated. When the TX Status FIFO used space is greater than this value
+ * an TX Status FIFO Level interrupt (TSFL) will be generated. */
+ if (s->tx_status_fifo_used > ((s->fifo_int >> 16) & 0xff)) {
+ s->int_sts |= TSFL_INT;
+ }
if (s->tx_status_fifo_used == 512) {
s->int_sts |= TSFF_INT;
/* TODO: Stop transmission. */
--
2.37.1