Lines Matching refs:io_hdr
137 struct sg_io_hdr io_hdr; in do_sgio_worker() local
143 memset(&io_hdr, 0, sizeof(io_hdr)); in do_sgio_worker()
144 io_hdr.interface_id = 'S'; in do_sgio_worker()
145 io_hdr.cmd_len = PR_HELPER_CDB_SIZE; in do_sgio_worker()
146 io_hdr.cmdp = (uint8_t *)data->cdb; in do_sgio_worker()
147 io_hdr.sbp = data->sense; in do_sgio_worker()
148 io_hdr.mx_sb_len = PR_HELPER_SENSE_SIZE; in do_sgio_worker()
149 io_hdr.timeout = 1; in do_sgio_worker()
150 io_hdr.dxfer_direction = data->dir; in do_sgio_worker()
151 io_hdr.dxferp = (char *)data->buf; in do_sgio_worker()
152 io_hdr.dxfer_len = data->sz; in do_sgio_worker()
153 ret = ioctl(data->fd, SG_IO, &io_hdr); in do_sgio_worker()
160 } else if (io_hdr.host_status != SCSI_HOST_OK) { in do_sgio_worker()
161 status = scsi_sense_from_host_status(io_hdr.host_status, &sense_code); in do_sgio_worker()
165 } else if (io_hdr.driver_status & SG_ERR_DRIVER_TIMEOUT) { in do_sgio_worker()
168 status = io_hdr.status; in do_sgio_worker()
172 data->sz -= io_hdr.resid; in do_sgio_worker()