• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/message/i2o/

Lines Matching defs:wait

46 /* global wait list for POST WAIT */
57 struct list_head list; /* node in global wait list */
77 * Allocate the i2o_exec_wait struct and initialize the wait.
84 struct i2o_exec_wait *wait;
86 wait = kzalloc(sizeof(*wait), GFP_KERNEL);
87 if (!wait)
90 INIT_LIST_HEAD(&wait->list);
91 spin_lock_init(&wait->lock);
93 return wait;
98 * @wait: I2O wait data which should be cleaned up
100 static void i2o_exec_wait_free(struct i2o_exec_wait *wait)
102 kfree(wait);
106 * i2o_msg_post_wait_mem - Post and wait a message with DMA buffers
109 * @timeout: time in seconds to wait
128 struct i2o_exec_wait *wait;
133 wait = i2o_exec_wait_alloc();
134 if (!wait)
141 wait->dma = *dma;
149 wait->tcntxt = tcntxt++;
150 msg->u.s.tcntxt = cpu_to_le32(wait->tcntxt);
152 wait->wq = &wq;
157 list_add(&wait->list, &i2o_exec_wait_list);
165 wait_event_interruptible_timeout(wq, wait->complete, timeout * HZ);
167 spin_lock_irqsave(&wait->lock, flags);
169 wait->wq = NULL;
171 if (wait->complete)
172 rc = le32_to_cpu(wait->msg->body[0]) >> 24;
180 spin_unlock_irqrestore(&wait->lock, flags);
183 i2o_flush_reply(c, wait->m);
184 i2o_exec_wait_free(wait);
212 struct i2o_exec_wait *wait, *tmp;
223 list_for_each_entry_safe(wait, tmp, &i2o_exec_wait_list, list) {
224 if (wait->tcntxt == context) {
225 spin_lock_irqsave(&wait->lock, flags);
227 list_del(&wait->list);
229 wait->m = m;
230 wait->msg = msg;
231 wait->complete = 1;
233 if (wait->wq)
238 spin_unlock_irqrestore(&wait->lock, flags);
247 i2o_dma_free(dev, &wait->dma);
248 i2o_exec_wait_free(wait);
250 wake_up_interruptible(wait->wq);
478 * Send a LCT NOTIFY request to the controller, and wait