Lines Matching defs:ldep
193 static int vdc_populate_mem_hdl(vdc_t *vdcp, vdc_local_desc_t *ldep);
2775 vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */
2790 ldep = &vdc->local_dring[i];
2791 mhdl = ldep->desc_mhdl;
2806 ldep->desc_mhdl = NULL;
2816 ldep->desc_mhdl = NULL;
2872 vdc_local_desc_t *ldep;
2876 ldep = &(vdcp->local_dring[idx]);
2879 if (ldep->nbytes > 0) {
2880 rv = vdc_populate_mem_hdl(vdcp, ldep);
2891 dep = ldep->dep;
2895 dep->payload.operation = ldep->operation;
2896 dep->payload.addr = ldep->offset;
2897 dep->payload.nbytes = ldep->nbytes;
2899 dep->payload.slice = ldep->slice;
3436 vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */
3501 ldep = &vdc->local_dring[idx];
3502 if (ldep->dep->hdr.dstate != VIO_DESC_DONE) {
3504 vdc->instance, idx, ldep->dep->hdr.dstate);
3508 mbuf = ldep->buf;
3510 mbuf->b_resid = mbuf->b_bcount - ldep->dep->payload.nbytes;
3511 bioerror(mbuf, ack ? ldep->dep->payload.status : EIO);
3557 vdc_local_desc_t *ldep = NULL; /* Local Dring Entry Pointer */
3563 ldep = &vdc->local_dring[idx];
3564 ASSERT(ldep != NULL);
3567 DTRACE_PROBE2(depopulate, int, vdc->instance, vdc_local_desc_t *, ldep);
3570 dep = ldep->dep;
3577 ldep->is_free = B_TRUE;
3579 DMSG(vdc, 2, ": is_free = %d : status = %d\n", ldep->is_free, status);
3586 if (ldep->nbytes == 0) {
3596 if (ldep->align_addr) {
3597 ASSERT(ldep->addr != NULL);
3600 bcopy(ldep->align_addr, ldep->addr,
3602 kmem_free(ldep->align_addr,
3603 sizeof (caddr_t) * P2ROUNDUP(ldep->nbytes, 8));
3604 ldep->align_addr = NULL;
3607 rv = ldc_mem_unbind_handle(ldep->desc_mhdl);
3610 vdc->instance, ldep->desc_mhdl, idx, rv);
3643 vdc_populate_mem_hdl(vdc_t *vdcp, vdc_local_desc_t *ldep)
3656 dep = ldep->dep;
3657 mhdl = ldep->desc_mhdl;
3659 switch (ldep->dir) {
3682 vaddr = ldep->addr;
3683 nbytes = ldep->nbytes;
3685 ASSERT(ldep->align_addr == NULL);
3686 ldep->align_addr =
3691 vdcp->instance, (void *)vaddr, (void *)ldep->align_addr,
3692 nbytes, ldep->operation);
3694 bcopy(vaddr, ldep->align_addr, nbytes);
3695 vaddr = ldep->align_addr;
3707 if (ldep->align_addr) {
3708 kmem_free(ldep->align_addr,
3710 ldep->align_addr = NULL;
3725 if (ldep->align_addr) {
3726 kmem_free(ldep->align_addr,
3727 sizeof (caddr_t) * ldep->nbytes);
3728 ldep->align_addr = NULL;
4032 vdc_local_desc_t *ldep;
4057 ldep = &(vdcp->local_dring_backup[b_idx]);
4060 if (!ldep->is_free) {
4072 bufp = ldep->buf;
4075 if (ldep->operation == VD_OP_BREAD ||
4076 ldep->operation == VD_OP_BWRITE) {
4950 vdc_local_desc_t *ldep = NULL;
5028 ldep = &vdcp->local_dring[idx];
5030 DMSG(vdcp, 1, ": state 0x%x\n", ldep->dep->hdr.dstate);
5032 if (ldep->dep->hdr.dstate == VIO_DESC_DONE) {
5035 status = ldep->dep->payload.status;
5037 bufp = ldep->buf;
5040 bufp->b_resid = bufp->b_bcount - ldep->dep->payload.nbytes;
5049 bufp->b_bcount, ldep->dep->payload.nbytes);
5060 (ldep->flags & VDC_OP_ERRCHK_BACKEND)) ||
5062 (ldep->flags & VDC_OP_ERRCHK_CONFLICT)))) {
5068 op = ldep->operation;
5072 ldep->dep->payload.nbytes);