Lines Matching refs:fibctx
169 struct aac_fib_context * fibctx; in open_getadapter_fib() local
172 fibctx = kmalloc(sizeof(struct aac_fib_context), GFP_KERNEL); in open_getadapter_fib()
173 if (fibctx == NULL) { in open_getadapter_fib()
180 fibctx->type = FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT; in open_getadapter_fib()
181 fibctx->size = sizeof(struct aac_fib_context); in open_getadapter_fib()
188 fibctx->unique = (u32)((ulong)fibctx & 0xFFFFFFFF); in open_getadapter_fib()
192 init_completion(&fibctx->completion); in open_getadapter_fib()
193 fibctx->wait = 0; in open_getadapter_fib()
198 fibctx->count = 0; in open_getadapter_fib()
199 INIT_LIST_HEAD(&fibctx->fib_list); in open_getadapter_fib()
200 fibctx->jiffies = jiffies/HZ; in open_getadapter_fib()
210 if (context->unique == fibctx->unique) { in open_getadapter_fib()
212 fibctx->unique++; in open_getadapter_fib()
218 list_add_tail(&fibctx->next, &dev->fib_list); in open_getadapter_fib()
220 if (copy_to_user(arg, &fibctx->unique, in open_getadapter_fib()
221 sizeof(fibctx->unique))) { in open_getadapter_fib()
231 u32 fibctx; member
248 struct aac_fib_context *fibctx; in next_getadapter_fib() local
259 f.fibctx = cf.fibctx; in next_getadapter_fib()
274 fibctx = NULL; in next_getadapter_fib()
277 fibctx = list_entry(entry, struct aac_fib_context, next); in next_getadapter_fib()
281 if (fibctx->unique == f.fibctx) { /* We found a winner */ in next_getadapter_fib()
285 fibctx = NULL; in next_getadapter_fib()
287 if (!fibctx) { in next_getadapter_fib()
293 if((fibctx->type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) || in next_getadapter_fib()
294 (fibctx->size != sizeof(struct aac_fib_context))) { in next_getadapter_fib()
305 if (!list_empty(&fibctx->fib_list)) { in next_getadapter_fib()
309 entry = fibctx->fib_list.next; in next_getadapter_fib()
313 fibctx->count--; in next_getadapter_fib()
340 if (wait_for_completion_interruptible(&fibctx->completion) < 0) { in next_getadapter_fib()
351 fibctx->jiffies = jiffies/HZ; in next_getadapter_fib()
355 int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context * fibctx) in aac_close_fib_context() argument
362 while (!list_empty(&fibctx->fib_list)) { in aac_close_fib_context()
367 entry = fibctx->fib_list.next; in aac_close_fib_context()
370 fibctx->count--; in aac_close_fib_context()
380 list_del(&fibctx->next); in aac_close_fib_context()
384 fibctx->type = 0; in aac_close_fib_context()
388 kfree(fibctx); in aac_close_fib_context()
402 struct aac_fib_context *fibctx; in close_getadapter_fib() local
415 fibctx = NULL; in close_getadapter_fib()
418 fibctx = list_entry(entry, struct aac_fib_context, next); in close_getadapter_fib()
422 if (fibctx->unique == (u32)(uintptr_t)arg) /* We found a winner */ in close_getadapter_fib()
425 fibctx = NULL; in close_getadapter_fib()
428 if (!fibctx) in close_getadapter_fib()
431 if((fibctx->type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) || in close_getadapter_fib()
432 (fibctx->size != sizeof(struct aac_fib_context))) in close_getadapter_fib()
435 status = aac_close_fib_context(dev, fibctx); in close_getadapter_fib()