Lines Matching refs:ctsio
336 ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio)
352 if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) {
354 ctsio->ext_data_filled += ctsio->kern_data_len;
355 ctsio->kern_data_resid = 0;
363 if (ctsio->ext_sg_entries > 0) {
366 ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist);
370 if (copyin(ctsio->ext_data_ptr, ext_sglist, ext_sglen) != 0) {
371 ctsio->io_hdr.port_status = 31343;
374 ext_sg_entries = ctsio->ext_sg_entries;
380 ctsio->ext_data_filled) {
382 ext_offset = ctsio->ext_data_filled - len_seen;
390 ext_sglist->addr = ctsio->ext_data_ptr;
391 ext_sglist->len = ctsio->ext_data_len;
394 ext_offset = ctsio->ext_data_filled;
397 if (ctsio->kern_sg_entries > 0) {
398 kern_sglist = (struct ctl_sg_entry *)ctsio->kern_data_ptr;
399 kern_sg_entries = ctsio->kern_sg_entries;
402 kern_sglist->addr = ctsio->kern_data_ptr;
403 kern_sglist->len = ctsio->kern_data_len;
418 if (ctsio->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
430 if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) ==
437 ctsio->io_hdr.port_status = 31344;
446 ctsio->io_hdr.port_status = 31345;
451 ctsio->ext_data_filled += len_to_copy;
452 ctsio->kern_data_resid -= len_to_copy;
471 "kern_data_len = %d\n", ctsio->ext_data_len,
472 ctsio->kern_data_len));