qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit


From: Roy Franz
Subject: [Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit
Date: Tue, 7 Jan 2014 20:19:50 -0800

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(-)

-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]