lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1260972281-20012-1-git-send-email-Sandeep.Kumar@freescale.com>
Date:	Wed, 16 Dec 2009 19:34:41 +0530
From:	Sandeep Gopalpet <Sandeep.Kumar@...escale.com>
To:	netdev@...r.kernel.org, avorontsov@...mvista.com
Cc:	davem@...emloft.net, Sandeep Gopalpet <Sandeep.Kumar@...escale.com>
Subject: [RFC PATCH] gianfar: update txq->trans_start rather than dev->trans_start

Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@...escale.com>
---

 *. Please let me know if updating txq->trans_start in gfar_start is
    alright, although updating txq->trans_start in gfar_start_xmit( )
    should be done.
 
 drivers/net/gianfar.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index e0620d0..f8bcc72 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1665,6 +1665,7 @@ void gfar_start(struct net_device *dev)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct gfar __iomem *regs = priv->gfargrp[0].regs;
+	struct netdev_queue *txq;
 	u32 tempval;
 	int i = 0;
 
@@ -1692,7 +1693,11 @@ void gfar_start(struct net_device *dev)
 		gfar_write(&regs->imask, IMASK_DEFAULT);
 	}
 
-	dev->trans_start = jiffies;
+	/* Update the trans_start for each queue */
+	for (i = 0; i < priv->num_tx_queues; i++) {
+		txq = netdev_get_tx_queue(dev, i);
+		txq->trans_start = jiffies;
+	}
 }
 
 void gfar_configure_coalescing(struct gfar_private *priv,
@@ -2069,7 +2074,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	/* reduce TxBD free count */
 	tx_queue->num_txbdfree -= (nr_frags + 1);
 
-	dev->trans_start = jiffies;
+	txq->trans_start = jiffies;
 
 	/* If the next BD still needs to be cleaned up, then the bds
 	   are full.  We need to tell the kernel to stop sending us stuff. */
-- 
1.6.5.6

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ