From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StEuN-0007oe-JK for qemu-devel@nongnu.org; Mon, 23 Jul 2012 05:26:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StEuJ-00085K-MU for qemu-devel@nongnu.org; Mon, 23 Jul 2012 05:26:31 -0400 From: initcrash@gmail.com Date: Mon, 23 Jul 2012 11:25:44 +0200 Message-Id: <1343035544-11101-1-git-send-email-initcrash@gmail.com> Subject: [Qemu-devel] [PATCH] eepro100: fix simplified mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Christian Schilling From: Christian Schilling A driver using simplified mode that works on real hardware did not work in qemu. Signed-off-by: Christian Schilling --- 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