From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DE4kb-0005xq-Og for qemu-devel@nongnu.org; Wed, 23 Mar 2005 07:14:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DE4kW-0005vf-Og for qemu-devel@nongnu.org; Wed, 23 Mar 2005 07:14:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE4kW-0005tz-6J for qemu-devel@nongnu.org; Wed, 23 Mar 2005 07:14:12 -0500 Received: from [195.238.2.102] (helo=outmx005.isp.belgacom.be) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DE4Tu-0003uO-Il for qemu-devel@nongnu.org; Wed, 23 Mar 2005 06:57:03 -0500 Received: from outmx005.isp.belgacom.be (localhost [127.0.0.1]) by outmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j2NBv0Td028981 for ; Wed, 23 Mar 2005 12:57:00 +0100 (envelope-from ) Received: from easynet.be (165.49-201-80.adsl.skynet.be [80.201.49.165]) by outmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j2NBuwRr028963 for ; Wed, 23 Mar 2005 12:56:59 +0100 (envelope-from ) Message-ID: <42415A89.9000903@easynet.be> Date: Wed, 23 Mar 2005 13:01:13 +0100 From: Mark Jonckheere MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] ne2000 and Netware 3.11 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I installed an old Netware 3.11 distribution in a qemu virtual machine and MSdos 5.0 and a Netware client in an other one. The network connection was tested with VDE using following commands: as user root: vde_switch -tap tap0 -hub -daemon chmod 766 /tmp/vde.ctl ethereal & as non-privileged user: vdeqemu novell.img -localtime -isa & vdeqemu msdos5.img -localtime -isa -macaddr 52:54:00:22:44:66 & Ethereal showed me that the IPX packets from Netware where malformed, and after a lot of tracing and debugging I found out that the netware ne2000 driver initializes the TPSR register with value 0xc0. This makes the transmitter point to memory offset 48K where there is only memory defined between offset 16K and 48K. Since the TPSR register can address 64K memory and the NIC has only 32K "physical" memory available, the most logical solution is to consider the most significant bit as a non-connected addressline and make the memory adresses wrap around. the following patch makes the ne2000 NIC work correctly under Netware 3.11 ++++++++++++++++++++++++ diff -wurb qemu/hw/ne2000.c qemu-patched/hw/ne2000.c --- qemu/hw/ne2000.c Sun Oct 3 15:56:00 2004 +++ qemu-patched/hw/ne2000.c Tue Mar 22 20:13:07 2005 @@ -268,6 +268,7 @@ /* signal end of transfert */ s->tsr = ENTSR_PTX; s->isr |= ENISR_TX; + s->cmd &= ~E8390_TRANS; ne2000_update_irq(s); } } @@ -289,7 +290,8 @@ ne2000_update_irq(s); break; case EN0_TPSR: - s->tpsr = val; + /* XXX: only 32K memory available, ignore bit 8 */ + s->tpsr = val & 0x7f; break; case EN0_TCNTLO: s->tcnt = (s->tcnt & 0xff00) | val; ++++++++++++++++++++++++ Note:this patch also includes the patch I proposed on 24-12-2004 with title: "[PATCH] ne2000: Reset TXP bit after sending packet." since it is also needed to make Netware recognise the ne2000 card. see also: http://lists.gnu.org/archive/html/qemu-devel/2004-12/msg00292.html groeten, Mark. -- :wq