From patchwork Sun Apr 24 16:16:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 8920351 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 497AFBF29F for ; Sun, 24 Apr 2016 16:20:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63E1C2022D for ; Sun, 24 Apr 2016 16:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BB0820103 for ; Sun, 24 Apr 2016 16:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752691AbcDXQUH (ORCPT ); Sun, 24 Apr 2016 12:20:07 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35281 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695AbcDXQUG (ORCPT ); Sun, 24 Apr 2016 12:20:06 -0400 Received: by mail-pf0-f195.google.com with SMTP id r187so15480984pfr.2; Sun, 24 Apr 2016 09:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=nrZXO3W2qpG52FX/V+71/MSFxRshp22BqXwvsX8j130=; b=xE/lzhyTvMA12YkNXJm4mb+9Bqj+B9+XBeZZEKFdRLOqUfcRuVW9U0lZc5RVF9/2SA RRlTisMzj2m+kS92jL1qZvSDYllRuX3Y/HNcE2n5Wn2ZoNV61MIHrIpavDz40jmP9xDe clnJBoZjY5T2za+kXghgrjmF6KKOgdOs+hxLOIpZDqOTvOZc9+0AIN+nkOeNPv5B44u5 DzC/5CMhqr2LUlhGit3CsjwBazFijLc4iYIOmGdnTmc+kB11WLcAZo2uRvDhMdvvKgIM 1q2g6hTt7sJKdtt3Ri/DLm7y6V0baflj8w441OUl2BJ+gJn1FKiZ9oZHCnhXDVaFhDWj nmrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nrZXO3W2qpG52FX/V+71/MSFxRshp22BqXwvsX8j130=; b=NnelKl8d8HA2Et3S9Ez/MGJuyXO0NoVOcZyMnD6Gcltv2b1f0TiC1whesVbE3yN3QC K+H29E0gmmMY6BwJgYY+VvktuQ0xfbXTlC++7TH/wImYg9Dql7+DnnO5pDBgIzhosjjN ceKliB2aigbamxVQwLd0GRjJ+8V+2QvUpWKXOYZsO4tJlDfqCaUlLGE546e60UXz5cL1 YI1+wqS8hvXKWX+fwEl3XElW/lUWgqgAEJP+f2DHEwUqBVD2D5Q1ssVkKozeUNLNX/+j uVUhBUEi3lUJJaAsnDv9OhRumBzU5SWO+54frGO5/ZEf/7HBgJywiP9s0R916iK8rDMz CXmw== X-Gm-Message-State: AOPr4FXXzNUO+PxQ41up+AYCpEnVysZkTNMo9/MkgCOLNKoHR5tQLM8jUfdPMXLGgAyd9w== X-Received: by 10.98.69.75 with SMTP id s72mr42944783pfa.66.1461514805677; Sun, 24 Apr 2016 09:20:05 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id s64sm21931494pfi.77.2016.04.24.09.20.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 09:20:05 -0700 (PDT) From: Yoshihiro Kaneko To: netdev@vger.kernel.org Cc: "David S. Miller" , Sergei Shtylyov , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next] ravb: Remove rx buffer ALIGN Date: Mon, 25 Apr 2016 01:16:07 +0900 Message-Id: <1461514567-23444-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kazuya Mizuguchi Aligning the reception data size is not required. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman --- This patch is based on the master branch of David Miller's next networking tree. drivers/net/ethernet/renesas/ravb_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 238b56f..66ed80c 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -246,10 +246,10 @@ static void ravb_ring_format(struct net_device *ndev, int q) for (i = 0; i < priv->num_rx_ring[q]; i++) { /* RX descriptor */ rx_desc = &priv->rx_ring[q][i]; - /* The size of the buffer should be on 16-byte boundary. */ - rx_desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16)); - dma_addr = dma_map_single(ndev->dev.parent, priv->rx_skb[q][i]->data, - ALIGN(PKT_BUF_SZ, 16), + rx_desc->ds_cc = cpu_to_le16(PKT_BUF_SZ); + dma_addr = dma_map_single(ndev->dev.parent, + priv->rx_skb[q][i]->data, + PKT_BUF_SZ, DMA_FROM_DEVICE); /* We just set the data size to 0 for a failed mapping which * should prevent DMA from happening... @@ -557,8 +557,9 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q) skb = priv->rx_skb[q][entry]; priv->rx_skb[q][entry] = NULL; - dma_unmap_single(ndev->dev.parent, le32_to_cpu(desc->dptr), - ALIGN(PKT_BUF_SZ, 16), + dma_unmap_single(ndev->dev.parent, + le32_to_cpu(desc->dptr), + PKT_BUF_SZ, DMA_FROM_DEVICE); get_ts &= (q == RAVB_NC) ? RAVB_RXTSTAMP_TYPE_V2_L2_EVENT : @@ -588,8 +589,7 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q) for (; priv->cur_rx[q] - priv->dirty_rx[q] > 0; priv->dirty_rx[q]++) { entry = priv->dirty_rx[q] % priv->num_rx_ring[q]; desc = &priv->rx_ring[q][entry]; - /* The size of the buffer should be on 16-byte boundary. */ - desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16)); + desc->ds_cc = cpu_to_le16(PKT_BUF_SZ); if (!priv->rx_skb[q][entry]) { skb = netdev_alloc_skb(ndev,