Lines Matching refs:fcdp

109 	struct	fc_data *fcdp;  in fc_create()  local
111 flcobjp = kmem_zalloc((sizeof (*flcobjp) + sizeof (*fcdp)), KM_NOSLEEP); in fc_create()
115 fcdp = (struct fc_data *)(flcobjp+1); in fc_create()
116 flcobjp->flc_data = (opaque_t)fcdp; in fc_create()
127 struct fc_data *fcdp = (struct fc_data *)queuep; in fc_init() local
129 mutex_init(&fcdp->ds_mutex, NULL, MUTEX_DRIVER, lkarg); in fc_init()
131 fcdp->ds_queobjp = que_objp; in fc_init()
132 fcdp->ds_tgcomobjp = tgcom_objp; in fc_init()
133 fcdp->ds_waitcnt = dmult_maxcnt; in fc_init()
143 struct fc_data *fcdp; in fc_free() local
145 fcdp = (struct fc_data *)flcobjp->flc_data; in fc_free()
146 if (fcdp->ds_queobjp) in fc_free()
147 QUE_FREE(fcdp->ds_queobjp); in fc_free()
148 if (fcdp->ds_tgcomobjp) { in fc_free()
149 TGCOM_FREE(fcdp->ds_tgcomobjp); in fc_free()
150 mutex_destroy(&fcdp->ds_mutex); in fc_free()
152 kmem_free(flcobjp, (sizeof (*flcobjp) + sizeof (*fcdp))); in fc_free()
160 struct fc_data *fcdp = (struct fc_data *)queuep; in fc_start_kstat() local
164 if (!fcdp->ds_kstat) { in fc_start_kstat()
165 if (fcdp->ds_kstat = kstat_create("cmdk", instance, NULL, in fc_start_kstat()
167 kstat_install(fcdp->ds_kstat); in fc_start_kstat()
176 struct fc_data *fcdp = (struct fc_data *)queuep; in fc_stop_kstat() local
178 if (fcdp->ds_kstat) { in fc_stop_kstat()
179 kstat_delete(fcdp->ds_kstat); in fc_stop_kstat()
180 fcdp->ds_kstat = NULL; in fc_stop_kstat()
483 struct duplx_data *fcdp; in duplx_create() local
485 flcobjp = kmem_zalloc((sizeof (*flcobjp) + sizeof (*fcdp)), KM_NOSLEEP); in duplx_create()
489 fcdp = (struct duplx_data *)(flcobjp+1); in duplx_create()
490 flcobjp->flc_data = (opaque_t)fcdp; in duplx_create()
493 fcdp->ds_writeq.fc_qobjp = qfifo_create(); in duplx_create()
494 if (!(fcdp->ds_writeq.fc_qobjp = qfifo_create())) { in duplx_create()
495 kmem_free(flcobjp, (sizeof (*flcobjp) + sizeof (*fcdp))); in duplx_create()
504 struct duplx_data *fcdp; in duplx_free() local
506 fcdp = (struct duplx_data *)flcobjp->flc_data; in duplx_free()
507 if (fcdp->ds_writeq.fc_qobjp) { in duplx_free()
508 QUE_FREE(fcdp->ds_writeq.fc_qobjp); in duplx_free()
510 if (fcdp->ds_readq.fc_qobjp) in duplx_free()
511 QUE_FREE(fcdp->ds_readq.fc_qobjp); in duplx_free()
512 if (fcdp->ds_tgcomobjp) { in duplx_free()
513 TGCOM_FREE(fcdp->ds_tgcomobjp); in duplx_free()
514 mutex_destroy(&fcdp->ds_mutex); in duplx_free()
516 kmem_free(flcobjp, (sizeof (*flcobjp) + sizeof (*fcdp))); in duplx_free()
523 struct duplx_data *fcdp = (struct duplx_data *)queuep; in duplx_init() local
524 fcdp->ds_tgcomobjp = tgcom_objp; in duplx_init()
525 fcdp->ds_readq.fc_qobjp = que_objp; in duplx_init()
528 QUE_INIT(fcdp->ds_writeq.fc_qobjp, lkarg); in duplx_init()
531 mutex_init(&fcdp->ds_mutex, NULL, MUTEX_DRIVER, lkarg); in duplx_init()
533 fcdp->ds_writeq.fc_maxcnt = DUPLX_MAXCNT; in duplx_init()
534 fcdp->ds_readq.fc_maxcnt = DUPLX_MAXCNT; in duplx_init()
537 fcdp->ds_readq.next = &fcdp->ds_writeq; in duplx_init()
538 fcdp->ds_writeq.next = &fcdp->ds_readq; in duplx_init()