From patchwork Wed Sep 3 20:34:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: y@shlinux1.ap.freescale.net X-Patchwork-Id: 385662 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A915F140216 for ; Thu, 4 Sep 2014 07:12:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756578AbaICVMW (ORCPT ); Wed, 3 Sep 2014 17:12:22 -0400 Received: from mail-bn1bon0098.outbound.protection.outlook.com ([157.56.111.98]:52710 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755923AbaICVMS (ORCPT ); Wed, 3 Sep 2014 17:12:18 -0400 X-Greylist: delayed 948 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Sep 2014 17:12:18 EDT Received: from DM2PR03MB367.namprd03.prod.outlook.com (10.141.55.21) by DM2PR03MB479.namprd03.prod.outlook.com (10.141.85.25) with Microsoft SMTP Server (TLS) id 15.0.1019.16; Wed, 3 Sep 2014 20:57:10 +0000 Received: from CH1PR03CA012.namprd03.prod.outlook.com (10.255.156.157) by DM2PR03MB367.namprd03.prod.outlook.com (10.141.55.21) with Microsoft SMTP Server (TLS) id 15.0.1019.16; Wed, 3 Sep 2014 20:56:29 +0000 Received: from BY2FFO11FD025.protection.gbl (10.255.156.132) by CH1PR03CA012.outlook.office365.com (10.255.156.157) with Microsoft SMTP Server (TLS) id 15.0.1019.16 via Frontend Transport; Wed, 3 Sep 2014 20:56:28 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD025.mail.protection.outlook.com (10.1.15.214) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Wed, 3 Sep 2014 20:56:28 +0000 Received: from shlinux1.ap.freescale.net (shlinux1.ap.freescale.net [10.192.225.216]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s83KuLWR027112; Wed, 3 Sep 2014 13:56:26 -0700 Received: by shlinux1.ap.freescale.net (Postfix, from userid 1013) id 7E3FB1AE1F8; Thu, 4 Sep 2014 04:34:52 +0800 (CST) From: To: , , , CC: , , , Fugang Duan , Frank Li Subject: [Patch net-next 09/11] net:fec: remove unnessary memory copy for address alignment in .xmit() Date: Thu, 4 Sep 2014 04:34:44 +0800 Message-ID: <1409776486-1403-10-git-send-email-y> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1409776486-1403-1-git-send-email-y> References: <1409776486-1403-1-git-send-email-y> X-EOPAttributedMessage: 0 X-Matching-Connectors: 130542513885544404; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009014)(6009001)(428002)(199003)(189002)(93916002)(85852003)(83072002)(2201001)(88136002)(92566001)(89996001)(92726001)(77982001)(85306004)(6806004)(107046002)(99396002)(19580395003)(4396001)(50226001)(52956003)(19580405001)(101416001)(90102001)(79102001)(62966002)(76482001)(46386002)(87936001)(103686003)(86152002)(11926002)(21056001)(74502001)(42186005)(31966008)(50986999)(77156001)(76176999)(77096002)(105586002)(95666004)(46102001)(81542001)(20776003)(104166001)(74662001)(81342001)(102836001)(106466001)(84676001)(64706001)(47776003)(229853001)(83322001)(44976005)(50466002)(16796002)(97736001)(87286001)(306002)(68736004)(26826002)(48376002)(80022001)(45336002)(142923001)(49092002)(90966001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR03MB367; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:0; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;UriScan:; X-Forefront-PRVS: 032334F434 Received-SPF: None (protection.outlook.com: shlinux1.ap.freescale.net does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 192.88.168.50) smtp.mailfrom=b20596@shlinux1.ap.freescale.net; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:; Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Fugang Duan i.MX6SX enet-avb IP support buffer address byte alignment for tx DMA transfer, so remove the unnessary memory copy for the enet avb IP. Signed-off-by: Fugang Duan Signed-off-by: Frank Li --- drivers/net/ethernet/freescale/fec_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index b388e29f..d09fe16 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -518,8 +518,9 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq, queue = skb_get_queue_mapping(skb); index = fec_enet_get_bd_index(txq->tx_bd_base, bdp, fep); - if (((unsigned long) bufaddr) & FEC_ALIGNMENT || - id_entry->driver_data & FEC_QUIRK_SWAP_FRAME) { + if (!(id_entry->driver_data & FEC_QUIRK_HAS_AVB) && + ((((unsigned long)bufaddr) & FEC_ALIGNMENT || + id_entry->driver_data & FEC_QUIRK_SWAP_FRAME))) { memcpy(txq->tx_bounce[index], skb->data, buflen); bufaddr = txq->tx_bounce[index];