From: Christian Schilling <initcr...@gmail.com>

A driver using simplified mode that works on real hardware
did not work in qemu.

Signed-off-by: Christian Schilling <initcr...@gmail.com>
---
 hw/eepro100.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index 6279ae3..4a48372 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -774,6 +774,13 @@ static void tx_command(EEPRO100State *s)
 #if 0
         uint16_t tx_buffer_el = lduw_le_pci_dma(&s->dev, tbd_address + 6);
 #endif
+        if (tbd_array == 0xffffffff) {
+            /* In simpliyfied mode there is no tbd_array. Instead the packet 
data
+             * starts right after the tcb_bytes field, and the packet size is
+             * equal to tcb_bytes */
+            tx_buffer_size = tcb_bytes;
+            tx_buffer_address = tbd_address;
+        }
         tbd_address += 8;
         TRACE(RXTX, logout
             ("TBD (simplified mode): buffer address 0x%08x, size 0x%04x\n",
-- 
1.7.7.6


Reply via email to