gianfar: update txq->trans_start rather than dev->trans_start
Subsystems (2)
RFC PATCH 1/1 gianfar: update txq->trans_start rather than dev->trans_start
---
*. 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(-)
drivers/net/gianfar.c +7 -2
@@ -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 (®s->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. */
Signature · 1 line
1.6.5.6
David Miller
maintainerFrom: Sandeep Gopalpet <[email protected]>
Date: Wed, 16 Dec 2009 19:34:41 +0530
Quoted 6 lines
Signed-off-by Sandeep Gopalpet <[email protected]>---
*. Please let me know if updating
txq->trans_startingfar_startis
alright, although updatingtxq->trans_startingfar_start_xmit( )should be done.
See commit 08baf561083bc27a953aa087dd8a664bb2b88e8e, you don't have to update *->trans_start at all, the generic code will do it for you.
For example, this is why you won't be able to find any trans_start references in drivers such as ixgbe
Quoted 16 lines
-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Saturday, December 26, 2009 8:15 AM
To: Kumar Gopalpet-B05799
Cc: [email protected]; [email protected]
Subject: Re: [RFC PATCH] gianfar: updatetxq->trans_startrather thandev->trans_startFrom: Sandeep Gopalpet <[email protected]>
Date: Wed, 16 Dec 2009 19:34:41 +0530Quoted 3 lines
Signed-off-by Sandeep Gopalpet <[email protected]>---
Quoted 8 lines
Quoted 3 lines
*. Please let me know if updating
txq->trans_startingfar_startis
alright, although updatingtxq->trans_startingfar_start_xmit( )should be done.See commit
08baf561083bc27a953aa087dd8a664bb2b88e8e, you don't have to update *->trans_start at all, the generic code will do it for you.
OK. Thanks David.
Quoted 3 lines
For example, this is why you won't be able to find any
trans_startreferences in drivers such as ixgbe