Lines Matching refs:acp

54 	struct aac_cmd acp;  member
188 aac_send_fib(struct aac_softstate *softs, struct aac_cmd *acp) in aac_send_fib() argument
192 acp->flags |= AAC_CMD_NO_CB | AAC_CMD_SYNC; in aac_send_fib()
193 acp->ac_comp = aac_ioctl_complete; in aac_send_fib()
201 rval = aac_do_io(softs, acp); in aac_send_fib()
220 struct aac_cmd *acp; in aac_ioctl_send_fib() local
232 if ((acp = kmem_zalloc(hbalen, KM_NOSLEEP)) == NULL) in aac_ioctl_send_fib()
235 fibp = (struct aac_fib *)(acp + 1); in aac_ioctl_send_fib()
236 acp->fibp = fibp; in aac_ioctl_send_fib()
262 acp->fib_size = fib_size; in aac_ioctl_send_fib()
281 acp->timeout = AAC_IOCTL_TIMEOUT; in aac_ioctl_send_fib()
282 acp->aac_cmd_fib = aac_cmd_fib_copy; in aac_ioctl_send_fib()
284 acp->fib_flags = AACDB_FLAGS_FIB_IOCTL; in aac_ioctl_send_fib()
286 if ((rval = aac_send_fib(softs, acp)) != 0) in aac_ioctl_send_fib()
290 if (acp->flags & AAC_CMD_ERR) { in aac_ioctl_send_fib()
296 if (ddi_copyout(fibp, (void *)arg, acp->fib_size, mode) != 0) { in aac_ioctl_send_fib()
304 kmem_free(acp, hbalen); in aac_ioctl_send_fib()
436 struct aac_cmd *acp; in aac_send_raw_srb() local
463 if ((acp = kmem_zalloc(sizeof (struct aac_cmd) + usr_fib_size + \ in aac_send_raw_srb()
467 acp->fibp = (struct aac_fib *)(acp + 1); in aac_send_raw_srb()
468 fibp = acp->fibp; in aac_send_raw_srb()
521 acp->bcount += usge->bcount; in aac_send_raw_srb()
527 if (acp->bcount > softs->buf_dma_attr.dma_attr_maxxfer) { in aac_send_raw_srb()
529 "large srb xfer size received %d\n", acp->bcount); in aac_send_raw_srb()
565 if (aac_cmd_dma_alloc(softs, &usge->acp, bp, 0, NULL_FUNC, in aac_send_raw_srb()
570 acp->left_cookien += usge->acp.left_cookien; in aac_send_raw_srb()
571 if (acp->left_cookien > softs->aac_sg_tablesize) { in aac_send_raw_srb()
573 acp->left_cookien); in aac_send_raw_srb()
580 if ((sge = kmem_zalloc(sizeof (struct aac_sge) * acp->left_cookien, in aac_send_raw_srb()
585 acp->sgt = sge; in aac_send_raw_srb()
587 for (sge0 = usge->acp.sgt; in aac_send_raw_srb()
588 sge0 < &usge->acp.sgt[usge->acp.left_cookien]; in aac_send_raw_srb()
594 acp->cmdlen = srb->cdb_size; in aac_send_raw_srb()
595 acp->timeout = srb->timeout; in aac_send_raw_srb()
598 acp->aac_cmd_fib = softs->aac_cmd_fib_scsi; in aac_send_raw_srb()
600 acp->fib_flags = AACDB_FLAGS_FIB_SRB; in aac_send_raw_srb()
602 if ((rval = aac_send_fib(softs, acp)) != 0) in aac_send_raw_srb()
615 if (acp->sgt) in aac_send_raw_srb()
616 kmem_free(acp->sgt, sizeof (struct aac_sge) * \ in aac_send_raw_srb()
617 acp->left_cookien); in aac_send_raw_srb()
620 if (usge->acp.sgt) in aac_send_raw_srb()
621 kmem_free(usge->acp.sgt, in aac_send_raw_srb()
623 usge->acp.left_cookien); in aac_send_raw_srb()
624 aac_free_dmamap(&usge->acp); in aac_send_raw_srb()
625 if (usge->acp.bp) in aac_send_raw_srb()
626 freerbuf(usge->acp.bp); in aac_send_raw_srb()
632 kmem_free(acp, sizeof (struct aac_cmd) + usr_fib_size + \ in aac_send_raw_srb()