Lines Matching refs:fcp
184 ndi_fmc_t *fcp; in i_ndi_fmc_create() local
186 fcp = kmem_zalloc(sizeof (ndi_fmc_t), KM_SLEEP); in i_ndi_fmc_create()
187 mutex_init(&fcp->fc_lock, NULL, MUTEX_DRIVER, ibc); in i_ndi_fmc_create()
189 *fcpp = fcp; in i_ndi_fmc_create()
196 i_ndi_fmc_destroy(ndi_fmc_t *fcp) in i_ndi_fmc_destroy() argument
200 if (fcp == NULL) in i_ndi_fmc_destroy()
204 mutex_enter(&fcp->fc_lock); in i_ndi_fmc_destroy()
205 for (fep = fcp->fc_head; fep != NULL; fep = pp) { in i_ndi_fmc_destroy()
209 mutex_exit(&fcp->fc_lock); in i_ndi_fmc_destroy()
210 mutex_destroy(&fcp->fc_lock); in i_ndi_fmc_destroy()
211 kmem_free(fcp, sizeof (ndi_fmc_t)); in i_ndi_fmc_destroy()
224 ndi_fmc_t *fcp; in ndi_fmc_insert() local
240 fcp = fmhdl->fh_dma_cache; in ndi_fmc_insert()
248 fcp = fmhdl->fh_acc_cache; in ndi_fmc_insert()
267 mutex_enter(&fcp->fc_lock); in ndi_fmc_insert()
270 fep->fce_prev = fcp->fc_tail; in ndi_fmc_insert()
271 if (fcp->fc_tail != NULL) in ndi_fmc_insert()
272 fcp->fc_tail->fce_next = fep; in ndi_fmc_insert()
274 fcp->fc_head = fep; in ndi_fmc_insert()
275 fcp->fc_tail = fep; in ndi_fmc_insert()
276 mutex_exit(&fcp->fc_lock); in ndi_fmc_insert()
287 ndi_fmc_t *fcp; in ndi_fmc_remove() local
305 fcp = fmhdl->fh_dma_cache; in ndi_fmc_remove()
307 ASSERT(fcp); in ndi_fmc_remove()
309 mutex_enter(&fcp->fc_lock); in ndi_fmc_remove()
318 fcp = fmhdl->fh_acc_cache; in ndi_fmc_remove()
320 ASSERT(fcp); in ndi_fmc_remove()
322 mutex_enter(&fcp->fc_lock); in ndi_fmc_remove()
333 mutex_exit(&fcp->fc_lock); in ndi_fmc_remove()
343 if (fep == fcp->fc_head) in ndi_fmc_remove()
344 fcp->fc_head = fep->fce_next; in ndi_fmc_remove()
347 if (fep == fcp->fc_tail) in ndi_fmc_remove()
348 fcp->fc_tail = fep->fce_prev; in ndi_fmc_remove()
351 mutex_exit(&fcp->fc_lock); in ndi_fmc_remove()
361 ndi_fmc_t *fcp = NULL; in ndi_fmc_entry_error() local
372 fcp = fmhdl->fh_dma_cache; in ndi_fmc_entry_error()
373 ASSERT(fcp); in ndi_fmc_entry_error()
375 fcp = fmhdl->fh_acc_cache; in ndi_fmc_entry_error()
376 ASSERT(fcp); in ndi_fmc_entry_error()
379 if (fcp != NULL) { in ndi_fmc_entry_error()
384 mutex_enter(&fcp->fc_lock); in ndi_fmc_entry_error()
385 for (fep = fcp->fc_head; fep != NULL; fep = fep->fce_next) { in ndi_fmc_entry_error()
430 mutex_exit(&fcp->fc_lock); in ndi_fmc_entry_error()
520 ndi_fmc_t *fcp = NULL; in ndi_fmc_entry_error_all() local
531 fcp = fmhdl->fh_dma_cache; in ndi_fmc_entry_error_all()
532 ASSERT(fcp); in ndi_fmc_entry_error_all()
534 fcp = fmhdl->fh_acc_cache; in ndi_fmc_entry_error_all()
535 ASSERT(fcp); in ndi_fmc_entry_error_all()
538 if (fcp != NULL) { in ndi_fmc_entry_error_all()
542 mutex_enter(&fcp->fc_lock); in ndi_fmc_entry_error_all()
543 for (fep = fcp->fc_head; fep != NULL; fep = fep->fce_next) { in ndi_fmc_entry_error_all()
574 mutex_exit(&fcp->fc_lock); in ndi_fmc_entry_error_all()