From: Mark Jonckheere <mark.jonckheere@easynet.be>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ne2000 and Netware 3.11
Date: Wed, 23 Mar 2005 13:01:13 +0100 [thread overview]
Message-ID: <42415A89.9000903@easynet.be> (raw)
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
next reply other threads:[~2005-03-23 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-23 12:01 Mark Jonckheere [this message]
2005-04-07 20:15 ` [Qemu-devel] [PATCH] ne2000 and Netware 3.11 Fabrice Bellard
2005-04-08 13:56 ` [Qemu-devel] Re: [PATCH] ne2000 and Netware 3.11 (Revised patch) Mark Jonckheere
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=42415A89.9000903@easynet.be \
--to=mark.jonckheere@easynet.be \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).