rtl8139: Fix invalid IO access alignment
commit4abf12f4ea866779b493ecf4606bd0b6d35f8348
authorJulian Pidancet <julian.pidancet@gmail.com>
Wed, 23 Nov 2011 01:03:15 +0000 (23 01:03 +0000)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 23 Nov 2011 10:36:59 +0000 (23 10:36 +0000)
treea09261cf14241189edd0b5d9f7b0331fce9974ed
parente30e5eb6136aa3311dad4ca90f6546e05ae98f92
rtl8139: Fix invalid IO access alignment

This patch makes iPXE work with the rtl8139 emulation. The rtl8139
driver in iPXE issues a 16bit access on the ChipCmd register
(offset 0x37) to check the status of the rx buffer. The offset of the
ioport access was getting fixed up to 0x36 in qemu, causing the value
read in iPXE to be invalid.

This fixes an issue with iPXE reporting timeouts during TFTP transfers.

Reposting this here because it is trivial enough and the original post
on qemu-devel didn't attract much attention.

Also, the inw() which was causing the issue has been replaced with an
inb() in upstream iPXE:
https://git.ipxe.org/ipxe.git/commit/91dd64ad25baa27954a7518e73df4fca8a2d0c93

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/rtl8139.c