Lines Matching refs:fib
44 struct fib * fib; in aac_response_normal() local
60 fib = &dev->fibs[index >> 2]; in aac_response_normal()
61 hwfib = fib->hw_fib_va; in aac_response_normal()
74 if (unlikely(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) { in aac_response_normal()
76 aac_fib_complete(fib); in aac_response_normal()
77 aac_fib_free(fib); in aac_response_normal()
89 fib->flags |= FIB_CONTEXT_FLAG_FASTRESP; in aac_response_normal()
111 fib->callback(fib->callback_data, fib); in aac_response_normal()
114 spin_lock_irqsave(&fib->event_lock, flagv); in aac_response_normal()
115 if (!fib->done) { in aac_response_normal()
116 fib->done = 1; in aac_response_normal()
117 complete(&fib->event_wait); in aac_response_normal()
119 spin_unlock_irqrestore(&fib->event_lock, flagv); in aac_response_normal()
126 if (fib->done == 2) { in aac_response_normal()
127 spin_lock_irqsave(&fib->event_lock, flagv); in aac_response_normal()
128 fib->done = 0; in aac_response_normal()
129 spin_unlock_irqrestore(&fib->event_lock, flagv); in aac_response_normal()
130 aac_fib_complete(fib); in aac_response_normal()
131 aac_fib_free(fib); in aac_response_normal()
173 struct fib fibctx; in aac_command_normal()
176 struct fib *fib = &fibctx; in aac_command_normal() local
187 if((fib = kmalloc(sizeof(struct fib), GFP_ATOMIC)) == NULL) in aac_command_normal()
188 fib = &fibctx; in aac_command_normal()
190 memset(fib, 0, sizeof(struct fib)); in aac_command_normal()
191 INIT_LIST_HEAD(&fib->fiblink); in aac_command_normal()
192 fib->type = FSAFS_NTC_FIB_CONTEXT; in aac_command_normal()
193 fib->size = sizeof(struct fib); in aac_command_normal()
194 fib->hw_fib_va = hw_fib; in aac_command_normal()
195 fib->data = hw_fib->data; in aac_command_normal()
196 fib->dev = dev; in aac_command_normal()
199 if (dev->aif_thread && fib != &fibctx) { in aac_command_normal()
200 list_add_tail(&fib->fiblink, &q->cmdq); in aac_command_normal()
210 aac_fib_adapter_complete(fib, sizeof(u32)); in aac_command_normal()
228 static void aac_aif_callback(void *context, struct fib * fibptr) in aac_aif_callback()
230 struct fib *fibctx; in aac_aif_callback()
234 fibctx = (struct fib *)context; in aac_aif_callback()
277 struct fib * fib; in aac_intr_normal() local
287 || (!(fib = kzalloc(sizeof(struct fib),GFP_ATOMIC)))) in aac_intr_normal()
290 kfree (fib); in aac_intr_normal()
294 fib->hbacmd_size = index; /* store event type */ in aac_intr_normal()
302 INIT_LIST_HEAD(&fib->fiblink); in aac_intr_normal()
303 fib->type = FSAFS_NTC_FIB_CONTEXT; in aac_intr_normal()
304 fib->size = sizeof(struct fib); in aac_intr_normal()
305 fib->hw_fib_va = hw_fib; in aac_intr_normal()
306 fib->data = hw_fib->data; in aac_intr_normal()
307 fib->dev = dev; in aac_intr_normal()
310 list_add_tail(&fib->fiblink, &q->cmdq); in aac_intr_normal()
315 struct fib *fibctx; in aac_intr_normal()
333 struct fib *fib = &dev->fibs[index]; in aac_intr_normal() local
346 if (unlikely(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) { in aac_intr_normal()
347 aac_fib_complete(fib); in aac_intr_normal()
348 aac_fib_free(fib); in aac_intr_normal()
354 if (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA) { in aac_intr_normal()
357 fib->flags |= FIB_CONTEXT_FLAG_FASTRESP; in aac_intr_normal()
359 if (fib->callback) { in aac_intr_normal()
366 spin_lock_irqsave(&fib->event_lock, flagv); in aac_intr_normal()
367 if (fib->done == 2) { in aac_intr_normal()
368 fib->done = 1; in aac_intr_normal()
371 fib->done = 1; in aac_intr_normal()
372 complete(&fib->event_wait); in aac_intr_normal()
374 spin_unlock_irqrestore(&fib->event_lock, flagv); in aac_intr_normal()
383 aac_fib_complete(fib); in aac_intr_normal()
386 struct hw_fib *hwfib = fib->hw_fib_va; in aac_intr_normal()
393 fib->flags |= FIB_CONTEXT_FLAG_FASTRESP; in aac_intr_normal()
419 spin_lock_irqsave(&fib->event_lock, flagv); in aac_intr_normal()
420 if (fib->done == 2) { in aac_intr_normal()
421 fib->done = 1; in aac_intr_normal()
424 fib->done = 1; in aac_intr_normal()
425 complete(&fib->event_wait); in aac_intr_normal()
427 spin_unlock_irqrestore(&fib->event_lock, flagv); in aac_intr_normal()
436 aac_fib_complete(fib); in aac_intr_normal()
446 if (likely(fib->callback && fib->callback_data)) { in aac_intr_normal()
447 fib->callback(fib->callback_data, fib); in aac_intr_normal()
449 aac_fib_complete(fib); in aac_intr_normal()
450 aac_fib_free(fib); in aac_intr_normal()