From patchwork Wed Aug 6 20:38:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 34993 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E885121137 for ; Wed, 6 Aug 2014 20:44:54 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 9sf9062572ykp.7 for ; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=03TjzJMjyf6gMKxVW325rZ58BvC12QjV7q1sQF/XgvE=; b=VNiZNxj12NT8zRnp4JWUUoNXn/iY7NuJihfCvQCIwc1vUSJd6NvriIifC0aWxeYXvm O2dQk0STgnRbzbzJA3fuuGY6JqT2FfEpI32zl1I4IKgxh+wOSTUAfXMR5FMUJ9mhJzer ixVqUfEdTQmE3sGJpMVen//smxyt7LJRpt+Ezp0e0EhU+iPWkpSOu96g2c13AXoPKxQC 2ovA2//gyP+cNVtVaVGMDw9Amh9fUDZrKF8WwG74Xg7XVwxv0+F6Wybsdz8j7X6D7uq7 aQBO3uAF3xV8wx8MTPBEKvi8Hn2I/2sETtOy7psAX6Zp7F5FLR2l9AsgPbjDafWrK1zr ny7A== X-Gm-Message-State: ALoCoQm1FSL43dpnecmO1rWFU96hXTNUOodXwU/+rf2LuLKpyIaO9umjNGAyhPu3s5JuVzaWeY2d X-Received: by 10.236.155.132 with SMTP id j4mr1404732yhk.56.1407357894735; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.198 with SMTP id 64ls353034qgn.8.gmail; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) X-Received: by 10.52.164.11 with SMTP id ym11mr2637935vdb.74.1407357894648; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id py3si937479vdb.107.2014.08.06.13.44.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Aug 2014 13:44:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so4976215vcb.3 for ; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr12847317vcb.2.1407357894572; Wed, 06 Aug 2014 13:44:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp55108vcb; Wed, 6 Aug 2014 13:44:54 -0700 (PDT) X-Received: by 10.140.17.81 with SMTP id 75mr6895145qgc.36.1407357893802; Wed, 06 Aug 2014 13:44:53 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e3si3468287qas.14.2014.08.06.13.44.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Aug 2014 13:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:40947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF84r-0002Ju-Dt for patch@linaro.org; Wed, 06 Aug 2014 16:44:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF81C-0005Ih-1K for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:41:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF80z-0003wN-3c for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:41:05 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:56765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF80y-0003w1-SC for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:40:53 -0400 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Aug 2014 14:40:52 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 6 Aug 2014 14:40:49 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 2DD193E4004C; Wed, 6 Aug 2014 14:40:49 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp07028.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s76Kd8jZ8847648; Wed, 6 Aug 2014 22:39:08 +0200 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s76Kemsw029411; Wed, 6 Aug 2014 14:40:48 -0600 Received: from localhost ([9.80.101.111]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s76KelSi029379; Wed, 6 Aug 2014 14:40:47 -0600 From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 6 Aug 2014 15:38:12 -0500 Message-Id: <1407357598-21541-3-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14080620-0928-0000-0000-000003EEBB0A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.97.110.150 Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 002/108] hw/net/stellaris_enet: Correct handling of packet padding X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mdroth@linux.vnet.ibm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell 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 Cc: qemu-stable@nongnu.org (cherry picked from commit 7fd5f064d1c1a827a95ffe678418b3d5b8d2f108) Signed-off-by: Michael Roth --- 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);