Lines Matching refs:softs

97 aac_do_ioctl(struct aac_softstate *softs, dev_t dev, int cmd, intptr_t arg,  in aac_do_ioctl()  argument
104 AACDB_PRINT_IOCTL(softs, "FSACTL_MINIPORT_REV_CHECK"); in aac_do_ioctl()
105 status = aac_check_revision(softs, arg, mode); in aac_do_ioctl()
108 AACDB_PRINT_IOCTL(softs, "FSACTL_SEND_LARGE_FIB"); in aac_do_ioctl()
111 AACDB_PRINT_IOCTL(softs, "FSACTL_SEND_LARGE_FIB"); in aac_do_ioctl()
113 status = aac_ioctl_send_fib(softs, arg, mode); in aac_do_ioctl()
116 AACDB_PRINT_IOCTL(softs, "FSACTL_OPEN_GET_ADAPTER_FIB"); in aac_do_ioctl()
117 status = aac_open_getadapter_fib(softs, arg, mode); in aac_do_ioctl()
120 AACDB_PRINT_IOCTL(softs, "FSACTL_GET_NEXT_ADAPTER_FIB"); in aac_do_ioctl()
121 status = aac_next_getadapter_fib(softs, arg, mode); in aac_do_ioctl()
124 AACDB_PRINT_IOCTL(softs, "FSACTL_CLOSE_GET_ADAPTER_FIB"); in aac_do_ioctl()
125 status = aac_close_getadapter_fib(softs, arg); in aac_do_ioctl()
128 AACDB_PRINT_IOCTL(softs, "FSACTL_SEND_RAW_SRB"); in aac_do_ioctl()
129 status = aac_send_raw_srb(softs, dev, arg, mode); in aac_do_ioctl()
132 AACDB_PRINT_IOCTL(softs, "FSACTL_GET_PCI_INFO"); in aac_do_ioctl()
133 status = aac_get_pci_info(softs, arg, mode); in aac_do_ioctl()
136 AACDB_PRINT_IOCTL(softs, "FSACTL_QUERY_DISK"); in aac_do_ioctl()
137 status = aac_query_disk(softs, arg, mode); in aac_do_ioctl()
140 AACDB_PRINT_IOCTL(softs, "FSACTL_DELETE_DISK"); in aac_do_ioctl()
141 status = aac_delete_disk(softs, arg, mode); in aac_do_ioctl()
144 AACDB_PRINT_IOCTL(softs, "FSACTL_GET_FEATURES"); in aac_do_ioctl()
145 status = aac_supported_features(softs, arg, mode); in aac_do_ioctl()
149 AACDB_PRINT(softs, CE_WARN, in aac_do_ioctl()
159 aac_check_revision(struct aac_softstate *softs, intptr_t arg, int mode) in aac_check_revision() argument
164 DBCALLED(softs, 2); in aac_check_revision()
188 aac_send_fib(struct aac_softstate *softs, struct aac_cmd *acp) in aac_send_fib() argument
195 mutex_enter(&softs->io_lock); in aac_send_fib()
196 if (softs->state & AAC_STATE_DEAD) { in aac_send_fib()
197 mutex_exit(&softs->io_lock); in aac_send_fib()
201 rval = aac_do_io(softs, acp); in aac_send_fib()
205 AACDB_PRINT(softs, CE_CONT, "User SendFib failed ENXIO"); in aac_send_fib()
208 AACDB_PRINT(softs, CE_CONT, "User SendFib failed EBUSY"); in aac_send_fib()
211 mutex_exit(&softs->io_lock); in aac_send_fib()
217 aac_ioctl_send_fib(struct aac_softstate *softs, intptr_t arg, int mode) in aac_ioctl_send_fib() argument
228 DBCALLED(softs, 2); in aac_ioctl_send_fib()
231 hbalen = sizeof (struct aac_cmd) + softs->aac_max_fib_size; in aac_ioctl_send_fib()
251 if (fib_size > softs->aac_max_fib_size) { in aac_ioctl_send_fib()
268 if (aac_dbflag_on(softs, AACDB_FLAGS_FIB) && in aac_ioctl_send_fib()
269 (softs->debug_fib_flags & AACDB_FLAGS_FIB_IOCTL)) in aac_ioctl_send_fib()
270 aac_printf(softs, CE_NOTE, "FIB> TakeABreakPt, sz=%d", in aac_ioctl_send_fib()
273 (void) aac_sync_mbcommand(softs, AAC_BREAKPOINT_REQ, in aac_ioctl_send_fib()
286 if ((rval = aac_send_fib(softs, acp)) != 0) in aac_ioctl_send_fib()
291 AACDB_PRINT(softs, CE_CONT, "FIB data corrupt"); in aac_ioctl_send_fib()
297 AACDB_PRINT(softs, CE_CONT, "FIB copyout failed"); in aac_ioctl_send_fib()
309 aac_open_getadapter_fib(struct aac_softstate *softs, intptr_t arg, int mode) in aac_open_getadapter_fib() argument
313 DBCALLED(softs, 2); in aac_open_getadapter_fib()
319 mutex_enter(&softs->aifq_mutex); in aac_open_getadapter_fib()
321 if (softs->fibctx_p == NULL) { in aac_open_getadapter_fib()
322 softs->fibctx_p = fibctx_p; in aac_open_getadapter_fib()
324 for (ctx_p = softs->fibctx_p; ctx_p->next; ctx_p = ctx_p->next) in aac_open_getadapter_fib()
332 ctx_p = softs->fibctx_p; in aac_open_getadapter_fib()
336 ctx_p = softs->fibctx_p; in aac_open_getadapter_fib()
343 if (softs->aifq_wrap) { in aac_open_getadapter_fib()
344 fibctx_p->ctx_idx = softs->aifq_idx; in aac_open_getadapter_fib()
347 mutex_exit(&softs->aifq_mutex); in aac_open_getadapter_fib()
357 aac_next_getadapter_fib(struct aac_softstate *softs, intptr_t arg, int mode) in aac_next_getadapter_fib() argument
365 DBCALLED(softs, 2); in aac_next_getadapter_fib()
370 mutex_enter(&softs->aifq_mutex); in aac_next_getadapter_fib()
371 for (ctx_p = softs->fibctx_p; ctx_p; ctx_p = ctx_p->next) { in aac_next_getadapter_fib()
375 mutex_exit(&softs->aifq_mutex); in aac_next_getadapter_fib()
379 rval = aac_return_aif_wait(softs, ctx_p, &fibp); in aac_next_getadapter_fib()
381 rval = aac_return_aif(softs, ctx_p, &fibp); in aac_next_getadapter_fib()
401 aac_close_getadapter_fib(struct aac_softstate *softs, intptr_t arg) in aac_close_getadapter_fib() argument
405 DBCALLED(softs, 2); in aac_close_getadapter_fib()
407 mutex_enter(&softs->aifq_mutex); in aac_close_getadapter_fib()
408 for (ctx_p = softs->fibctx_p; ctx_p; ctx_p = ctx_p->next) { in aac_close_getadapter_fib()
412 if (ctx_p == softs->fibctx_p) in aac_close_getadapter_fib()
413 softs->fibctx_p = ctx_p->next; in aac_close_getadapter_fib()
420 mutex_exit(&softs->aifq_mutex); in aac_close_getadapter_fib()
434 aac_send_raw_srb(struct aac_softstate *softs, dev_t dev, intptr_t arg, int mode) in aac_send_raw_srb() argument
453 DBCALLED(softs, 2); in aac_send_raw_srb()
459 if (usr_fib_size > (softs->aac_max_fib_size - \ in aac_send_raw_srb()
527 if (acp->bcount > softs->buf_dma_attr.dma_attr_maxxfer) { in aac_send_raw_srb()
528 AACDB_PRINT(softs, CE_NOTE, in aac_send_raw_srb()
547 AACDB_PRINT(softs, CE_NOTE, "ddi_umem_lock failed: %d", in aac_send_raw_srb()
561 AACDB_PRINT(softs, CE_NOTE, "ddi_umem_iosetup failed"); in aac_send_raw_srb()
565 if (aac_cmd_dma_alloc(softs, &usge->acp, bp, 0, NULL_FUNC, in aac_send_raw_srb()
571 if (acp->left_cookien > softs->aac_sg_tablesize) { in aac_send_raw_srb()
572 AACDB_PRINT(softs, CE_NOTE, "large cookiec received %d", in aac_send_raw_srb()
598 acp->aac_cmd_fib = softs->aac_cmd_fib_scsi; in aac_send_raw_srb()
602 if ((rval = aac_send_fib(softs, acp)) != 0) in aac_send_raw_srb()
639 aac_get_pci_info(struct aac_softstate *softs, intptr_t arg, int mode) in aac_get_pci_info() argument
646 DBCALLED(softs, 2); in aac_get_pci_info()
648 if (ddi_prop_lookup_int_array(DDI_DEV_T_ANY, softs->devinfo_p, in aac_get_pci_info()
668 aac_query_disk(struct aac_softstate *softs, intptr_t arg, int mode) in aac_query_disk() argument
674 DBCALLED(softs, 2); in aac_query_disk()
692 mutex_enter(&softs->io_lock); in aac_query_disk()
693 dvp = &softs->containers[qdisk->container_no]; in aac_query_disk()
697 mutex_exit(&softs->io_lock); in aac_query_disk()
705 aac_delete_disk(struct aac_softstate *softs, intptr_t arg, int mode) in aac_delete_disk() argument
712 DBCALLED(softs, 2); in aac_delete_disk()
720 mutex_enter(&softs->io_lock); in aac_delete_disk()
721 dvp = &softs->containers[ddisk->container_no]; in aac_delete_disk()
731 mutex_exit(&softs->io_lock); in aac_delete_disk()
741 aac_supported_features(struct aac_softstate *softs, intptr_t arg, int mode) in aac_supported_features() argument
746 DBCALLED(softs, 2); in aac_supported_features()
764 (softs->flags & AAC_FLAGS_LBA_64BIT) ? 1 : 0; in aac_supported_features()
766 (softs->flags & AAC_FLAGS_JBOD) ? 1 : 0; in aac_supported_features()
771 (softs->flags & AAC_FLAGS_LBA_64BIT) ? 1 : 0; in aac_supported_features()
774 (softs->flags & AAC_FLAGS_JBOD) ? 1 : 0; in aac_supported_features()