]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commit
e1000: Handle IO Port.
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 21 Oct 2010 16:59:20 +0000 (17:59 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 21 Oct 2010 16:59:20 +0000 (17:59 +0100)
commit1a13c2df0c5c93f06c0f2286628b9b0f4d80ff4d
treeb362588e3000c1ea39fd3e431d552b9491d6b446
parent706bc8c588cbda284a9579cdb7e494ad5c9d6383
e1000: Handle IO Port.

This patch introduces the two IOPorts on e1000, IOADDR and IODATA. The
IOADDR is used to specify which register we want to access when we read
or write on IODATA.

It also check the RDLEN register when a packet is received, if the value
is 0, the receive descriptor buffer is not set, so we don't accept any
network packets.

This patch fixes some weird behavior that I see when I use e1000 with
QEMU/Xen, the guest memory can be corrupted by this NIC because it will
write on memory that it doesn't own anymore after a reset. It's because
the kernel Linux use the IOPort to reset the network card instead of the
MMIO.

This patch also intruduces e1000_reset function.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
hw/e1000.c