From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2aKb-0004t9-MZ for qemu-devel@nongnu.org; Mon, 13 Jan 2014 00:45:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2aKW-0006fC-BY for qemu-devel@nongnu.org; Mon, 13 Jan 2014 00:45:01 -0500 Received: from mail-ee0-x229.google.com ([2a00:1450:4013:c00::229]:34048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2aKW-0006f5-4G for qemu-devel@nongnu.org; Mon, 13 Jan 2014 00:44:56 -0500 Received: by mail-ee0-f41.google.com with SMTP id e49so1221992eek.14 for ; Sun, 12 Jan 2014 21:44:55 -0800 (PST) Date: Mon, 13 Jan 2014 13:44:41 +0800 From: Stefan Hajnoczi Message-ID: <20140113054441.GC14770@stefanha-thinkpad.redhat.com> References: <1389154792-6651-1-git-send-email-roy.franz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389154792-6651-1-git-send-email-roy.franz@linaro.org> Subject: Re: [Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roy Franz Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, patches@linaro.org, qemu-devel@nongnu.org, stefanha@redhat.com 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