From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Keith Monahan <keith@techtravels.org>,
Richard Henderson <richard.henderson@linaro.org>,
Helge Deller <deller@gmx.de>
Subject: [PULL v2 5/8] i82596: Initialize variables at chip reset
Date: Thu, 5 Nov 2026 23:31:19 +0100 [thread overview]
Message-ID: <20261105223122.8729-6-deller@kernel.org> (raw)
In-Reply-To: <20261105223122.8729-1-deller@kernel.org>
From: Helge Deller <deller@gmx.de>
Do proper initialization of various pointers and register values at chip
reset and add a timer to trigger delivery retry when the RX ring is
full.
Noticed-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/net/i82596.c | 7 +++++++
hw/net/i82596.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/hw/net/i82596.c b/hw/net/i82596.c
index a518aa7696..35e0b58330 100644
--- a/hw/net/i82596.c
+++ b/hw/net/i82596.c
@@ -359,6 +359,13 @@ static void i82596_s_reset(I82596State *s)
s->last_tx_len = 0;
s->last_good_rfa = 0;
+ s->rbd_p = I596_NULL;
+ s->rx_take_el = false;
+ s->rfd_p = I596_NULL;
+ s->rx_hold_start = 0;
+ if (s->rx_retry_timer) {
+ timer_del(s->rx_retry_timer);
+ }
s->queue_head = 0;
s->queue_tail = 0;
s->queue_count = 0;
diff --git a/hw/net/i82596.h b/hw/net/i82596.h
index ec0b6a75ba..15370837cd 100644
--- a/hw/net/i82596.h
+++ b/hw/net/i82596.h
@@ -25,6 +25,7 @@ struct I82596State_st {
NICState *nic;
NICConf conf;
QEMUTimer *flush_queue_timer;
+ QEMUTimer *rx_retry_timer; /* retries delivery while the RX ring is full */
uint8_t mode;
QEMUTimer *throttle_timer;
@@ -78,6 +79,7 @@ struct I82596State_st {
uint32_t rbd_p; /* next free RBD, loaded from the first RFD at RU start */
bool rx_take_el; /* hold timed out: fill the EL RBD like the chip does */
uint32_t rfd_p; /* next RFD, loaded from the SCB at RU start */
+ int64_t rx_hold_start; /* frames held since (virtual ns), 0 if not */
uint8_t packet_queue[PACKET_QUEUE_SIZE][PKT_BUF_SZ];
size_t packet_queue_len[PACKET_QUEUE_SIZE];
int queue_head;
--
2.54.0
next prev parent reply other threads:[~2026-11-05 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 22:31 [PULL v2 0/8] Hppa 715 cpu nic patches Helge Deller
2026-11-05 22:31 ` [PULL v2 1/8] target/hppa: Move emulated power button into CPU I/O region Helge Deller
2026-11-05 22:31 ` [PULL v2 2/8] target/hppa: Add special blr instruction for HP-UX 9.05 Helge Deller
2026-11-05 22:31 ` [PULL v2 3/8] lasi_i82596: Decode the PORT command from bits 3:0, not 7:0 Helge Deller
2026-11-05 22:31 ` [PULL v2 4/8] i82596: Implement 82596CA big-endian mode (SYSBUS bit 7) Helge Deller
2026-11-05 22:31 ` Helge Deller [this message]
2026-11-05 22:31 ` [PULL v2 6/8] i82596: Drop crc calculation Helge Deller
2026-11-05 22:31 ` [PULL v2 7/8] i82596: Fix source address inserting Helge Deller
2026-11-05 22:31 ` [PULL v2 8/8] i82596: Various send- and transmit fixes for 715 Helge Deller
2026-11-06 16:46 ` [PULL v2 0/8] Hppa 715 cpu nic patches Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105223122.8729-6-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=keith@techtravels.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.