Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136096
b: refs/heads/master
c: 3156378
h: refs/heads/master
v: v3
  • Loading branch information
Divy Le Ray authored and David S. Miller committed Mar 27, 2009
1 parent dad818d commit 570cc21
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d1ec7812d6350409ecfe7f6dded3a6c801b89d3
refs/heads/master: 3156378993b0fc0f9f12f5f297f0a9b4c4fe0fc8
1 change: 1 addition & 0 deletions trunk/drivers/net/cxgb3/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ void t3_os_link_fault_handler(struct adapter *adapter, int port_id);

void t3_sge_start(struct adapter *adap);
void t3_sge_stop(struct adapter *adap);
void t3_start_sge_timers(struct adapter *adap);
void t3_stop_sge_timers(struct adapter *adap);
void t3_free_sge_resources(struct adapter *adap);
void t3_sge_err_intr_handler(struct adapter *adapter);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/cxgb3/cxgb3_main.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ static int setup_sge_qsets(struct adapter *adap)
&adap->params.sge.qset[qset_idx], ntxq, dev,
netdev_get_tx_queue(dev, j));
if (err) {
t3_stop_sge_timers(adap);
t3_free_sge_resources(adap);
return err;
}
Expand Down Expand Up @@ -1046,6 +1045,8 @@ static int cxgb_up(struct adapter *adap)
setup_rss(adap);
if (!(adap->flags & NAPI_INIT))
init_napi(adap);

t3_start_sge_timers(adap);
adap->flags |= FULL_INIT_DONE;
}

Expand Down
24 changes: 21 additions & 3 deletions trunk/drivers/net/cxgb3/sge.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -3056,6 +3053,27 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
return ret;
}

/**
* 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
Expand Down

0 comments on commit 570cc21

Please sign in to comment.