diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-09-25 14:05:28 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 15:57:17 -0700 |
commit | 0ca41c0413a4d9ca58767d53d23accea9aa1cdef (patch) | |
tree | c94c8bc0ffbe971cddcb894df984c315b62f7fde /drivers/net/cxgb3/sge.c | |
parent | 822f1a57d2ad957ae16b987115251539876aef26 (diff) |
[2.6.28,1/1] cxgb3 - fix race in EEH
A SGE queue set timer might access registers while in EEH recovery,
triggering an EEH error loop. Stop all timers early in EEH process.
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')
-rw-r--r-- | drivers/net/cxgb3/sge.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 89efd04be4e..7346a8e26da 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -603,9 +603,6 @@ static void t3_free_qset(struct adapter *adapter, struct sge_qset *q) int i; struct pci_dev *pdev = adapter->pdev; - if (q->tx_reclaim_timer.function) - del_timer_sync(&q->tx_reclaim_timer); - for (i = 0; i < SGE_RXQ_PER_SET; ++i) if (q->fl[i].desc) { spin_lock_irq(&adapter->sge.reg_lock); @@ -3009,6 +3006,24 @@ err: } /** + * t3_stop_sge_timers - stop SGE timer call backs + * @adap: the adapter + * + * Stops each SGE queue set's timer call back + */ +void t3_stop_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) + del_timer_sync(&q->tx_reclaim_timer); + } +} + +/** * t3_free_sge_resources - free SGE resources * @adap: the adapter * |