From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV248-0004PA-Mm for qemu-devel@nongnu.org; Tue, 01 Apr 2014 13:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WV243-0004Qi-U3 for qemu-devel@nongnu.org; Tue, 01 Apr 2014 13:01:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV243-0004QW-MD for qemu-devel@nongnu.org; Tue, 01 Apr 2014 13:01:31 -0400 Date: Tue, 1 Apr 2014 18:01:24 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20140401170123.GR2411@work-vm> References: <1396371187-8567-1-git-send-email-peter.maydell@linaro.org> <1396371187-8567-3-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1396371187-8567-3-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH 2/5] hw/net/stellaris_enet: Correct handling of packet padding List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Michael S. Tsirkin" , qemu-devel@nongnu.org, patches@linaro.org * Peter Maydell (peter.maydell@linaro.org) wrote: > The PADEN bit in the transmit control register enables padding of short > data packets out to the required minimum length. However a typo here > meant we were adjusting tx_fifo_len rather than tx_frame_len, so the > padding didn't actually happen. Fix this bug. > > Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert > --- > hw/net/stellaris_enet.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c > index bd844cd..d0da819 100644 > --- a/hw/net/stellaris_enet.c > +++ b/hw/net/stellaris_enet.c > @@ -265,7 +265,7 @@ static void stellaris_enet_write(void *opaque, hwaddr offset, > s->tx_frame_len -= 4; > if ((s->tctl & SE_TCTL_PADEN) && s->tx_frame_len < 60) { > memset(&s->tx_fifo[s->tx_frame_len], 0, 60 - s->tx_frame_len); > - s->tx_fifo_len = 60; > + s->tx_frame_len = 60; > } > qemu_send_packet(qemu_get_queue(s->nic), s->tx_fifo, > s->tx_frame_len); > -- > 1.9.0 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK