aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_catas.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:52 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:52 -0400
commit4522e08ced48baaf28990e2674e940aae9940310 (patch)
tree9c17d3aadb4adcd757c58331cc6a20e4a133cb50 /drivers/infiniband/hw/mthca/mthca_catas.c
parentbc3a290b51aaefc6a6af2d6e6d52ed32387c416c (diff)
IB/mthca: Remove "stop" flag for catastrophic error polling timer
Since we use del_timer_sync() anyway, there's no need for an additional flag to tell the timer not to rearm. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_catas.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_catas.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c
index 40573e48439c..50e2792e60c1 100644
--- a/drivers/infiniband/hw/mthca/mthca_catas.c
+++ b/drivers/infiniband/hw/mthca/mthca_catas.c
@@ -126,7 +126,6 @@ static void handle_catas(struct mthca_dev *dev)
126static void poll_catas(unsigned long dev_ptr) 126static void poll_catas(unsigned long dev_ptr)
127{ 127{
128 struct mthca_dev *dev = (struct mthca_dev *) dev_ptr; 128 struct mthca_dev *dev = (struct mthca_dev *) dev_ptr;
129 unsigned long flags;
130 int i; 129 int i;
131 130
132 for (i = 0; i < dev->catas_err.size; ++i) 131 for (i = 0; i < dev->catas_err.size; ++i)
@@ -135,13 +134,8 @@ static void poll_catas(unsigned long dev_ptr)
135 return; 134 return;
136 } 135 }
137 136
138 spin_lock_irqsave(&catas_lock, flags); 137 mod_timer(&dev->catas_err.timer,
139 if (!dev->catas_err.stop) 138 jiffies + MTHCA_CATAS_POLL_INTERVAL);
140 mod_timer(&dev->catas_err.timer,
141 jiffies + MTHCA_CATAS_POLL_INTERVAL);
142 spin_unlock_irqrestore(&catas_lock, flags);
143
144 return;
145} 139}
146 140
147void mthca_start_catas_poll(struct mthca_dev *dev) 141void mthca_start_catas_poll(struct mthca_dev *dev)
@@ -149,7 +143,6 @@ void mthca_start_catas_poll(struct mthca_dev *dev)
149 unsigned long addr; 143 unsigned long addr;
150 144
151 init_timer(&dev->catas_err.timer); 145 init_timer(&dev->catas_err.timer);
152 dev->catas_err.stop = 0;
153 dev->catas_err.map = NULL; 146 dev->catas_err.map = NULL;
154 147
155 addr = pci_resource_start(dev->pdev, 0) + 148 addr = pci_resource_start(dev->pdev, 0) +
@@ -180,10 +173,6 @@ void mthca_start_catas_poll(struct mthca_dev *dev)
180 173
181void mthca_stop_catas_poll(struct mthca_dev *dev) 174void mthca_stop_catas_poll(struct mthca_dev *dev)
182{ 175{
183 spin_lock_irq(&catas_lock);
184 dev->catas_err.stop = 1;
185 spin_unlock_irq(&catas_lock);
186
187 del_timer_sync(&dev->catas_err.timer); 176 del_timer_sync(&dev->catas_err.timer);
188 177
189 if (dev->catas_err.map) { 178 if (dev->catas_err.map) {