diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-03-26 17:39:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 08:46:56 +0100 |
commit | 3156378993b0fc0f9f12f5f297f0a9b4c4fe0fc8 (patch) | |
tree | 006025c8420ac7603a7074ee7bc48ddcd6898c10 /drivers/net/cxgb3/sge.c | |
parent | netdev: convert eth16i to net_device_ops (diff) | |
download | linux-3156378993b0fc0f9f12f5f297f0a9b4c4fe0fc8.tar.xz linux-3156378993b0fc0f9f12f5f297f0a9b4c4fe0fc8.zip |
cxgb3: start qset timers when setup succeeded
Start queue set reclaim timers after the queue sets have been
allocated successfully.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/sge.c')
-rwxr-xr-x[-rw-r--r--] | drivers/net/cxgb3/sge.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index a7555cb3fa4a..fcd1a4f4f778 100644..100755 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -3044,9 +3044,6 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports, t3_write_reg(adapter, A_SG_GTS, V_RSPQ(q->rspq.cntxt_id) | V_NEWTIMER(q->rspq.holdoff_tmr)); - mod_timer(&q->tx_reclaim_timer, jiffies + TX_RECLAIM_PERIOD); - mod_timer(&q->rx_reclaim_timer, jiffies + RX_RECLAIM_PERIOD); - return 0; err_unlock: @@ -3057,6 +3054,27 @@ err: } /** + * t3_start_sge_timers - start SGE timer call backs + * @adap: the adapter + * + * Starts each SGE queue set's timer call back + */ +void t3_start_sge_timers(struct adapter *adap) +{ + int i; + + for (i = 0; i < SGE_QSETS; ++i) { + struct sge_qset *q = &adap->sge.qs[i]; + + if (q->tx_reclaim_timer.function) + mod_timer(&q->tx_reclaim_timer, jiffies + TX_RECLAIM_PERIOD); + + if (q->rx_reclaim_timer.function) + mod_timer(&q->rx_reclaim_timer, jiffies + RX_RECLAIM_PERIOD); + } +} + +/** * t3_stop_sge_timers - stop SGE timer call backs * @adap: the adapter * |