Lines Matching refs:fcdp

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