Lines Matching refs:sg_io
140 struct sg_io_hdr sg_io;
148 cmd->sg_io.interface_id = 'S';
149 cmd->sg_io.mx_sb_len = sizeof(cmd->_sense);
150 cmd->sg_io.cmdp = cmd->cgc.cmd;
151 cmd->sg_io.sbp = cmd->_sense.u;
152 cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO;
157 cmd->sg_io.cmd_len = i + 1;
168 cmd->sg_io.dxferp = buf;
169 cmd->sg_io.dxfer_len = bufsize;
170 cmd->sg_io.dxfer_direction = SG_DXFER_FROM_DEV;
172 cmd->sg_io.dxfer_direction = SG_DXFER_NONE;
174 if (ioctl(fd, SG_IO, &cmd->sg_io))
177 if ((cmd->sg_io.info & SG_INFO_OK_MASK) != SG_INFO_OK) {
180 if (cmd->sg_io.masked_status & CHECK_CONDITION) {