Lines Matching defs:bufs
454 struct dpti_ptbuf bufs[IOP_MAX_MSG_XFERS];
557 memset(bufs, 0, sizeof(bufs));
575 bufs[nbuf].db_out = (p[0] & I2O_SGL_DATA_OUT) != 0;
576 bufs[nbuf].db_ptr = NULL;
586 bufs[nbuf].db_ptr = (void *)(intptr_t)p[1];
587 bufs[nbuf].db_proc = proc;
588 bufs[nbuf].db_size = p[0] & 0x00ffffff;
609 bufs[nbuf].db_frags[nfrag].iov_len =
612 bufs[nbuf].db_frags[nfrag].iov_base =
630 bufs[nbuf].db_nfrag = nfrag;
644 bufs[nbuf].db_size = sz;
645 bufs[nbuf].db_ptr = kmem_zalloc(sz, KM_SLEEP);
647 for (i = 0, sz = 0; i < bufs[nbuf].db_nfrag; i++) {
648 rv = copyin(bufs[nbuf].db_frags[i].iov_base,
649 (char *)bufs[nbuf].db_ptr + sz,
650 bufs[nbuf].db_frags[i].iov_len);
656 sz += bufs[nbuf].db_frags[i].iov_len;
689 rv = iop_msg_map(iop, im, mbtmp, bufs[i].db_ptr,
690 bufs[i].db_size, bufs[i].db_out, bufs[i].db_proc);
724 if (bufs[i].db_proc != NULL)
727 if (!bufs[i].db_out && rv == 0) {
728 for (j = 0, sz = 0; j < bufs[i].db_nfrag; j++) {
729 rv = copyout((char *)bufs[i].db_ptr + sz,
730 bufs[i].db_frags[j].iov_base,
731 bufs[i].db_frags[j].iov_len);
734 sz += bufs[i].db_frags[j].iov_len;
738 if (bufs[i].db_ptr != NULL)
739 kmem_free(bufs[i].db_ptr, bufs[i].db_size);