From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DJcyh-000163-UK for qemu-devel@nongnu.org; Thu, 07 Apr 2005 15:47:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJcyY-0000wc-RW for qemu-devel@nongnu.org; Thu, 07 Apr 2005 15:47:38 -0400 Received: from [129.104.30.34] (helo=mx1.polytechnique.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DJdOu-00030w-3k for qemu-devel@nongnu.org; Thu, 07 Apr 2005 16:14:52 -0400 Message-ID: <425594EF.5090801@bellard.org> Date: Thu, 07 Apr 2005 22:15:43 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] ne2000 and Netware 3.11 References: <42415A89.9000903@easynet.be> In-Reply-To: <42415A89.9000903@easynet.be> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mark.jonckheere@easynet.be Cc: qemu-devel@nongnu.org Mark Jonckheere wrote: > ++++++++++++++++++++++++ > 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 > @@ -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; This patch is not correct: it limits the memory to 16K, not 32K because the memory starts at a 16K offset. A possible solution could be to wrap to 16K only if (tpsr << 8) >= 48K. Moreover, it should be done in the packet transmit code. > 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. OK for this one. Fabrice.