All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: <b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Fugang Duan <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: [Patch net-next 09/11] net:fec: remove unnessary memory copy for address alignment in .xmit()
Date: Thu, 4 Sep 2014 04:38:15 +0800	[thread overview]
Message-ID: <1409776697-1536-10-git-send-email-Frank.Li@freescale.com> (raw)
In-Reply-To: <1409776697-1536-1-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

From: Fugang Duan <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

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 <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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];
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Fugang Duan <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: [Patch net-next 09/11] net:fec: remove unnessary memory copy for address alignment in .xmit()
Date: Thu, 4 Sep 2014 04:38:15 +0800	[thread overview]
Message-ID: <1409776697-1536-10-git-send-email-Frank.Li@freescale.com> (raw)
In-Reply-To: <1409776697-1536-1-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

From: Fugang Duan <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

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 <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Frank Li <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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];
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-09-03 20:38 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 20:38 [Patch net-next 00/11] net: fec: imx6sx multiqueue support Frank Li
2014-09-03 20:38 ` Frank Li
2014-09-03 20:38 ` [Patch net-next 03/11] net:fec: use multiqueue interface to allocate Ethernet device Frank Li
2014-09-03 20:38   ` Frank Li
2014-09-03 21:20   ` Florian Fainelli
2014-09-03 21:20     ` Florian Fainelli
     [not found] ` <1409776697-1536-1-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-09-03 20:38   ` [Patch net-next 01/11] net:fec: add enet refrence clock for i.MX 6SX chip Frank Li
2014-09-03 20:38     ` Frank Li
2014-09-03 20:38   ` [Patch net-next 02/11] net:fec: add enet AVB feature macro define for imx6sx Frank Li
2014-09-03 20:38     ` Frank Li
2014-09-03 20:38   ` [Patch net-next 04/11] net:fec: add multiqueue support Frank Li
2014-09-03 20:38     ` Frank Li
2014-09-03 21:27     ` Florian Fainelli
2014-09-03 21:27       ` Florian Fainelli
     [not found]       ` <540787B9.8090504-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-04  3:41         ` Zhi Li
2014-09-04  3:41           ` Zhi Li
2014-09-04  4:09           ` Florian Fainelli
2014-09-04  4:09             ` Florian Fainelli
2014-09-04 14:02             ` Zhi Li
2014-09-04 14:02               ` Zhi Li
2014-09-03 20:38   ` [Patch net-next 08/11] net:fec: change FEC alignment to 64 bytes for ARM platform Frank Li
2014-09-03 20:38     ` Frank Li
2014-09-04  8:50     ` David Laight
2014-09-04  9:11       ` fugang.duan at freescale.com
2014-09-04  9:18         ` David Laight
2014-09-04 14:17           ` Zhi Li
2014-09-04 14:17             ` Zhi Li
2014-09-03 20:38   ` Frank Li [this message]
2014-09-03 20:38     ` [Patch net-next 09/11] net:fec: remove unnessary memory copy for address alignment in .xmit() Frank Li
2014-09-03 20:38   ` [Patch net-next 10/11] ARM: Documentation: Update fec dts binding doc Frank Li
2014-09-03 20:38     ` Frank Li
2014-09-03 20:38 ` [Patch net-next 05/11] net:fec: Disable enet-avb MAC instead of reset MAC Frank Li
2014-09-03 20:38   ` Frank Li
2014-09-03 20:38 ` [Patch net-next 06/11] net:fec: add enet-avb IP support Frank Li
2014-09-03 20:38   ` Frank Li
2014-09-03 20:38 ` [Patch net-next 07/11] net:fec: Add fsl,imx6sx-fec compatible strings Frank Li
2014-09-03 20:38   ` Frank Li
2014-09-03 20:38 ` [Patch net-next 11/11] ARM: dts: imx6sx: add multi-queue support enet Frank Li
2014-09-03 20:38   ` Frank Li
     [not found] <1409776486-1403-1-git-send-email-y>
2014-09-03 20:34 ` [Patch net-next 09/11] net:fec: remove unnessary memory copy for address alignment in .xmit() y
2014-09-03 20:34   ` y
2014-09-03 20:34 ` y
2014-09-03 20:34   ` y

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409776697-1536-10-git-send-email-Frank.Li@freescale.com \
    --to=frank.li-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.