[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit |
Date: |
Mon, 13 Jan 2014 13:44:41 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jan 07, 2014 at 08:19:50PM -0800, Roy Franz wrote:
> This patchset fixes some bugs in the lan9118 emulation that were found
> while debugging UEFI network support on the emulated VExpress platform.
>
> The 9118 ethernet controller supports transmission of multi-buffer packets
> with arbitrary byte alignment of the start and end bytes of each buffer.
> All writes to the packet fifo are 32 bits, so the controller discards
> bytes at the beginning and end of each buffer based on the 'Data start
> offset' and 'Buffer size' of the TX command 'A' word.
>
> The UEFI network driver uses 1 buffer for the packet header, and one for
> the payload. The mishandling of the start offset and buffer length
> resulted in extra bytes being inserted in the packet.
>
> With these changes the UEFI network driver that works with the real 9118
> chip on the VExpress evaluation board works unmodified on QEMU. The Linux
> kernel driver continues to work on QEMU as well. Since the Linux driver
> was unaffected by these bugs I am inferring that it is using a single
> buffer for each packet.
>
> Changes since V1:
> * use extract32() instead of shift/mask for CMD A field extraction
> * compute number of valid bytes in word at beginning of block
>
> Roy Franz (2):
> Fix lan9118 TX "CMD A" handling
> Fix lan9118 buffer length handling
>
> hw/net/lan9118.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net
Stefan