diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-09-25 10:05:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 18:57:17 -0400 |
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 89efd04be4e0..7346a8e26da1 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) | |||
603 | int i; | 603 | int i; |
604 | struct pci_dev *pdev = adapter->pdev; | 604 | struct pci_dev *pdev = adapter->pdev; |
605 | 605 | ||
606 | if (q->tx_reclaim_timer.function) | ||
607 | del_timer_sync(&q->tx_reclaim_timer); | ||
608 | |||
609 | for (i = 0; i < SGE_RXQ_PER_SET; ++i) | 606 | for (i = 0; i < SGE_RXQ_PER_SET; ++i) |
610 | if (q->fl[i].desc) { | 607 | if (q->fl[i].desc) { |
611 | spin_lock_irq(&adapter->sge.reg_lock); | 608 | spin_lock_irq(&adapter->sge.reg_lock); |
@@ -3009,6 +3006,24 @@ err: | |||
3009 | } | 3006 | } |
3010 | 3007 | ||
3011 | /** | 3008 | /** |
3009 | * t3_stop_sge_timers - stop SGE timer call backs | ||
3010 | * @adap: the adapter | ||
3011 | * | ||
3012 | * Stops each SGE queue set's timer call back | ||
3013 | */ | ||
3014 | void t3_stop_sge_timers(struct adapter *adap) | ||
3015 | { | ||
3016 | int i; | ||
3017 | |||
3018 | for (i = 0; i < SGE_QSETS; ++i) { | ||
3019 | struct sge_qset *q = &adap->sge.qs[i]; | ||
3020 | |||
3021 | if (q->tx_reclaim_timer.function) | ||
3022 | del_timer_sync(&q->tx_reclaim_timer); | ||
3023 | } | ||
3024 | } | ||
3025 | |||
3026 | /** | ||
3012 | * t3_free_sge_resources - free SGE resources | 3027 | * t3_free_sge_resources - free SGE resources |
3013 | * @adap: the adapter | 3028 | * @adap: the adapter |
3014 | * | 3029 | * |