Lines Matching +full:os +full:- +full:code +full:- +full:offset
1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/dma-mapping.h>
7 #include <linux/t10-pi.h>
20 * The longest fixed-length SCSI CDB as per the SCSI standard.
21 * fixed-length means: commands that their size can be determined
27 * So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml
56 /* for scmd->flags */
64 /* for scmd->state */
118 * command (auto-sense). Length must be
121 /* Low-level done function - can be used by low-level driver to point
122 * to completion function. Not used by mid/upper level code. */
126 * The following fields can be written to by the host specific code.
139 int result; /* Status code from lower level driver */
143 unsigned char tag; /* SCSI-II queued command tag */
165 return *(struct scsi_driver **)cmd->request->rq_disk->private_data; in scsi_cmd_to_driver()
171 size_t *offset, size_t *len);
181 static inline int scsi_dma_map(struct scsi_cmnd *cmd) { return -ENOSYS; } in scsi_dma_map()
187 return cmd->sdb.table.nents; in scsi_sg_count()
192 return cmd->sdb.table.sgl; in scsi_sglist()
197 return cmd->sdb.length; in scsi_bufflen()
202 cmd->req.resid_len = resid; in scsi_set_resid()
207 return cmd->req.resid_len; in scsi_get_resid()
229 * to handle I/Os with DIF or similar types of protection information.
235 /* OS-HBA: Protected, HBA-Target: Unprotected */
239 /* OS-HBA: Unprotected, HBA-Target: Protected */
243 /* OS-HBA: Protected, HBA-Target: Protected */
250 scmd->prot_op = op; in scsi_set_prot_op()
255 return scmd->prot_op; in scsi_get_prot_op()
281 scmd->prot_type = type; in scsi_set_prot_type()
286 return scmd->prot_type; in scsi_get_prot_type()
291 return blk_rq_pos(scmd->request); in scsi_get_lba()
296 return scmd->device->sector_size; in scsi_prot_interval()
301 return cmd->prot_sdb ? cmd->prot_sdb->table.nents : 0; in scsi_prot_sg_count()
306 return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; in scsi_prot_sglist()
311 return cmd->prot_sdb; in scsi_prot()
319 cmd->result = (cmd->result & 0xffff00ff) | (status << 8); in set_msg_byte()
324 cmd->result = (cmd->result & 0xff00ffff) | (status << 16); in set_host_byte()
329 cmd->result = (cmd->result & 0x00ffffff) | (status << 24); in set_driver_byte()
334 unsigned int xfer_len = scmd->sdb.length; in scsi_transfer_length()
337 if (scmd->prot_flags & SCSI_PROT_TRANSFER_PI) in scsi_transfer_length()