/freebsd/sys/cam/ctl/ |
H A D | ctl_util.c | 106 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_tur() 112 io->io_hdr.flags = CTL_FLAG_DATA_NONE; in ctl_scsi_tur() 132 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_inquiry() 141 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_inquiry() 142 io->io_hdr.flags = CTL_FLAG_DATA_IN; in ctl_scsi_inquiry() 162 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_request_sense() 170 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_request_sense() 171 io->io_hdr.flags = CTL_FLAG_DATA_IN; in ctl_scsi_request_sense() 191 io->io_hdr.io_type = CTL_IO_SCSI; in ctl_scsi_report_luns() 199 io->io_hdr in ctl_scsi_report_luns() [all...] |
H A D | ctl.c | 537 switch (io->io_hdr.io_type) { in ctl_be_move_done() 553 switch (io->io_hdr.io_type) { in ctl_continue_io() 627 msg.hdr.original_sc = io->io_hdr.remote_io; in ctl_ha_datamove() 629 msg.hdr.nexus = io->io_hdr.nexus; in ctl_ha_datamove() 630 msg.hdr.status = io->io_hdr.status; in ctl_ha_datamove() 631 msg.dt.flags = io->io_hdr.flags; in ctl_ha_datamove() 644 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { in ctl_ha_datamove() 652 KASSERT((io->io_hdr.flags & CTL_FLAG_BUS_ADDR) == 0, in ctl_ha_datamove() 684 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { in ctl_ha_datamove() 692 KASSERT((io->io_hdr.flags & in ctl_ha_datamove() [all …]
|
H A D | ctl_frontend_cam_sim.c | 292 ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfcs_datamove() 362 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { in cfcs_datamove() 374 if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == in cfcs_datamove() 405 if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { in cfcs_datamove() 406 io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; in cfcs_datamove() 407 io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; in cfcs_datamove() 423 ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfcs_done() 432 KASSERT(((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE), in cfcs_done() 433 ("invalid CTL status %#x", io->io_hdr.status)); in cfcs_done() 443 switch (io->io_hdr.status & CTL_STATUS_MASK) { in cfcs_done() [all …]
|
H A D | scsi_ctl.c | 170 #define PRIV_CCB(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0]) 171 #define PRIV_INFO(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1]) 685 if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) in ctlfedata() 710 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) in ctlfedata() 754 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) in ctlfedata() 797 if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) { in ctlfestart() 807 if ((io->io_hdr.flags & CTL_FLAG_ABORT) && in ctlfestart() 808 (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { in ctlfestart() 809 io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; in ctlfestart() 832 if ((io->io_hdr in ctlfestart() [all...] |
H A D | ctl_frontend_ioctl.c | 349 if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { in ctl_ioctl_do_datamove() 368 ctsio->io_hdr.port_status = 31343; in ctl_ioctl_do_datamove() 415 if (ctsio->io_hdr.flags & CTL_FLAG_BUS_ADDR) { in ctl_ioctl_do_datamove() 427 if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == in ctl_ioctl_do_datamove() 434 ctsio->io_hdr.port_status = 31344; in ctl_ioctl_do_datamove() 443 ctsio->io_hdr.port_status = 31345; in ctl_ioctl_do_datamove() 484 io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfi_datamove() 498 io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfi_done() 519 io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ¶ms; in cfi_submit_wait() 615 pool_tmp = io->io_hdr.pool; in ctl_ioctl_io() [all …]
|
H A D | ctl_io.h | 170 #define CTL_LUN(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LUN].ptrs[0]) 171 #define CTL_SOFTC(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LUN].ptrs[1]) 172 #define CTL_BACKEND_LUN(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND_LUN].ptrs[0]) 174 ctl_ports[(io)->io_hdr.nexus.targ_port]) 180 #define CTL_RSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[0]) 181 #define CTL_LSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[1]) 279 * Note: Make sure the io_hdr is *always* the first element in this 283 struct ctl_io_hdr io_hdr; /* common to all I/O types */ 377 * Note: Make sure the io_hdr is *always* the first element in this 381 struct ctl_io_hdr io_hdr; /* commo 277 struct ctl_io_hdr io_hdr; /* common to all I/O types */ global() member 375 struct ctl_io_hdr io_hdr; /* common to all I/O types */ global() member 583 struct ctl_io_hdr io_hdr; global() member 588 struct ctl_io_hdr io_hdr; /* common to all I/O types */ global() member [all...] |
H A D | ctl_tpc.c | 443 ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_inquiry_evpd_tpc() 495 ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_receive_copy_operating_parameters() 536 ctl_get_initindex(&ctsio->io_hdr.nexus)); in ctl_receive_copy_status_lid1() 580 ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_receive_copy_status_lid1() 606 ctl_get_initindex(&ctsio->io_hdr.nexus)); in ctl_receive_copy_failure_details() 640 ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_receive_copy_failure_details() 666 ctl_get_initindex(&ctsio->io_hdr.nexus)); in ctl_receive_copy_status_lid4() 714 ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_receive_copy_status_lid4() 737 ctl_get_initindex(&ctsio->io_hdr.nexus)); in ctl_copy_operation_abort() 927 tior->io->io_hdr.retries = 3; in tpc_process_b2b() [all …]
|
H A D | ctl_scsi_all.c | 133 ctl_scsi_path_string(&ctsio->io_hdr, path_str, sizeof(path_str)); in ctl_scsi_sense_sbuf()
|
H A D | ctl_tpc_local.c | 205 if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { in tpcl_datamove() 217 if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == in tpcl_datamove() 322 io->io_hdr.nexus.initid = 0; in tpcl_queue() 323 io->io_hdr.nexus.targ_port = tsoftc->port.targ_port; in tpcl_queue() 324 io->io_hdr.nexus.targ_lun = lun; in tpcl_queue()
|
H A D | ctl_frontend_iscsi.c | 150 ((struct cfiscsi_priv *)&(io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND]) 526 io->io_hdr.io_type = CTL_IO_SCSI; in cfiscsi_pdu_handle_scsi_command() 527 io->io_hdr.nexus.initid = cs->cs_ctl_initid; in cfiscsi_pdu_handle_scsi_command() 528 io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; in cfiscsi_pdu_handle_scsi_command() 529 io->io_hdr.nexus.targ_lun = ctl_decode_lun(be64toh(bhssc->bhssc_lun)); in cfiscsi_pdu_handle_scsi_command() 584 io->io_hdr.io_type = CTL_IO_TASK; in cfiscsi_pdu_handle_task_request() 585 io->io_hdr.nexus.initid = cs->cs_ctl_initid; in cfiscsi_pdu_handle_task_request() 586 io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; in cfiscsi_pdu_handle_task_request() 587 io->io_hdr.nexus.targ_lun = ctl_decode_lun(be64toh(bhstmr->bhstmr_lun)); in cfiscsi_pdu_handle_task_request() 715 KASSERT((io->io_hdr.flags & CTL_FLAG_DATA_MASK) != CTL_FLAG_DATA_IN, in cfiscsi_handle_data_segment() [all …]
|
H A D | ctl_backend_block.c | 119 ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) 121 ((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]) 122 #define DSM_RANGE(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].integer) 395 switch (io->io_hdr.io_type) { in ctl_be_block_io_error() 475 if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && in ctl_be_block_move_done() 476 (io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) { in ctl_be_block_move_done() 490 || ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0) in ctl_be_block_move_done() 491 || ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)) { in ctl_be_block_move_done() 510 STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links); in ctl_be_block_move_done() 903 &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; in ctl_be_block_unmap_file() [all …]
|
H A D | ctl_error.c | 153 ctsio->io_hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE; in ctl_set_sense() 931 ctsio->io_hdr.status = CTL_SCSI_ERROR; in ctl_set_reservation_conflict() 940 ctsio->io_hdr.status = CTL_SCSI_ERROR; in ctl_set_queue_full() 949 ctsio->io_hdr.status = CTL_SCSI_ERROR; in ctl_set_busy() 958 ctsio->io_hdr.status = CTL_CMD_ABORTED; in ctl_set_task_aborted() 991 ctsio->io_hdr.status = CTL_SUCCESS; in ctl_set_success() 1004 ctnio->io_hdr.status = CTL_NVME_ERROR; 1111 ctnio->io_hdr.status = CTL_SUCCESS; 1117 switch (io->io_hdr.io_type) { 1132 switch (io->io_hdr [all...] |
H A D | ctl_backend_ramdisk.c | 78 ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) 80 ((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]) 403 if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && in ctl_backend_ramdisk_move_done() 404 (io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) { in ctl_backend_ramdisk_move_done() 413 &io->io_hdr, links); in ctl_backend_ramdisk_move_done() 440 io->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_backend_ramdisk_compare() 495 io->io_hdr.flags |= CTL_FLAG_ALLOCATED; in ctl_backend_ramdisk_rw() 681 switch (io->io_hdr.io_type) { in ctl_backend_ramdisk_config_read() 980 switch (io->io_hdr.io_type) { in ctl_backend_ramdisk_config_write()
|
/freebsd/sys/contrib/openzfs/cmd/zpool/os/linux/ |
H A D | zpool_vdev_os.c | 223 sg_io_hdr_t io_hdr; in check_sector_size_database() local 229 memset(&io_hdr, 0, sizeof (sg_io_hdr_t)); in check_sector_size_database() 230 io_hdr.interface_id = 'S'; in check_sector_size_database() 231 io_hdr.cmd_len = sizeof (inq_cmd_blk); in check_sector_size_database() 232 io_hdr.mx_sb_len = sizeof (sense_buffer); in check_sector_size_database() 233 io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; in check_sector_size_database() 234 io_hdr.dxfer_len = INQ_REPLY_LEN; in check_sector_size_database() 235 io_hdr.dxferp = inq_buff; in check_sector_size_database() 236 io_hdr.cmdp = inq_cmd_blk; in check_sector_size_database() 237 io_hdr in check_sector_size_database() [all...] |
/freebsd/sys/dev/usb/storage/ |
H A D | cfumass.c | 663 io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = sc; in cfumass_t_command_callback() 664 io->io_hdr.io_type = CTL_IO_SCSI; in cfumass_t_command_callback() 665 io->io_hdr.nexus.initid = sc->sc_ctl_initid; in cfumass_t_command_callback() 666 io->io_hdr.nexus.targ_port = cfumass_port.targ_port; in cfumass_t_command_callback() 667 io->io_hdr.nexus.targ_lun = ctl_decode_lun(sc->sc_cbw->bCBWLUN); in cfumass_t_command_callback() 848 sc = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfumass_datamove() 858 if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { in cfumass_datamove() 894 sc = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfumass_done() 898 KASSERT(((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE), in cfumass_done() 899 ("invalid CTL status %#x", io->io_hdr.status)); in cfumass_done() [all …]
|
/freebsd/sys/dev/nvmf/controller/ |
H A D | ctl_frontend_nvmf.c | 45 #define NVMFT_NC(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0]) 46 #define NVMFT_QP(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1]) 270 io->io_hdr.io_type = admin ? CTL_IO_NVME_ADMIN : CTL_IO_NVME; in nvmft_dispatch_command() 271 io->io_hdr.nexus.initid = ctrlr->cntlid; in nvmft_dispatch_command() 272 io->io_hdr.nexus.targ_port = np->port.targ_port; in nvmft_dispatch_command() 273 io->io_hdr.nexus.targ_lun = le32toh(cmd->nsid) - 1; in nvmft_dispatch_command() 302 io->io_hdr.io_type = CTL_IO_TASK; in nvmft_terminate_commands() 303 io->io_hdr.nexus.initid = ctrlr->cntlid; in nvmft_terminate_commands() 304 io->io_hdr.nexus.targ_port = np->port.targ_port; in nvmft_terminate_commands() 305 io->io_hdr.nexus.targ_lun = 0; in nvmft_terminate_commands() [all …]
|
H A D | nvmft_qpair.c | 389 STAILQ_INSERT_TAIL(&qp->datamove_queue, &io->io_hdr, links); in nvmft_qpair_datamove()
|
/freebsd/usr.sbin/ctladm/ |
H A D | ctladm.c | 720 } while (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) in cctl_do_io() 1212 io->io_hdr.nexus.targ_lun = lun; in cctl_sync_cache() 1213 io->io_hdr.nexus.initid = iid; in cctl_sync_cache() 1220 if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { in cctl_sync_cache() 1272 io->io_hdr.nexus.targ_lun = lun; in cctl_start_stop() 1273 io->io_hdr.nexus.initid = iid; in cctl_start_stop() 1280 ctl_scsi_path_string(&io->io_hdr, scsi_path, sizeof(scsi_path)); in cctl_start_stop() 1281 if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { in cctl_start_stop() 1437 io->io_hdr.nexus.targ_lun = lun; in cctl_mode_sense() 1438 io->io_hdr.nexus.initid = iid; in cctl_mode_sense() [all …]
|
/freebsd/usr.sbin/bhyve/ |
H A D | pci_virtio_scsi.c | 401 io->io_hdr.io_type = CTL_IO_TASK; in pci_vtscsi_tmf_handle() 402 io->io_hdr.nexus.initid = sc->vss_iid; in pci_vtscsi_tmf_handle() 403 io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(tmf->lun); in pci_vtscsi_tmf_handle() 406 io->io_hdr.flags |= CTL_FLAG_USER_TAG; in pci_vtscsi_tmf_handle() 502 io->io_hdr.nexus.initid = sc->vss_iid; in pci_vtscsi_request_handle() 503 io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(cmd_rd->lun); in pci_vtscsi_request_handle() 505 io->io_hdr.io_type = CTL_IO_SCSI; in pci_vtscsi_request_handle() 511 io->io_hdr.flags |= CTL_FLAG_DATA_OUT; in pci_vtscsi_request_handle() 516 io->io_hdr.flags |= CTL_FLAG_DATA_IN; in pci_vtscsi_request_handle() 521 io->io_hdr.flags |= CTL_FLAG_USER_TAG; in pci_vtscsi_request_handle()
|
/freebsd/sys/cam/scsi/ |
H A D | scsi_sg.c | 91 struct sg_io_hdr io_hdr; member
|
/freebsd/sys/dev/cxgbe/cxgbei/ |
H A D | icl_cxgbei.c | 1565 #define io_to_ddp_state(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr)
|