Lines Matching refs:scmd

148 static inline struct request *scsi_cmd_to_rq(struct scsi_cmnd *scmd)  in scsi_cmd_to_rq()  argument
150 return blk_mq_rq_from_pdu(scmd); in scsi_cmd_to_rq()
231 static inline sector_t scsi_get_sector(struct scsi_cmnd *scmd) in scsi_get_sector() argument
233 return blk_rq_pos(scsi_cmd_to_rq(scmd)); in scsi_get_sector()
236 static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) in scsi_get_lba() argument
238 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba()
240 return blk_rq_pos(scsi_cmd_to_rq(scmd)) >> shift; in scsi_get_lba()
243 static inline unsigned int scsi_logical_block_count(struct scsi_cmnd *scmd) in scsi_logical_block_count() argument
245 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_logical_block_count()
247 return blk_rq_bytes(scsi_cmd_to_rq(scmd)) >> shift; in scsi_logical_block_count()
271 static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) in scsi_set_prot_op() argument
273 scmd->prot_op = op; in scsi_set_prot_op()
276 static inline unsigned char scsi_get_prot_op(struct scsi_cmnd *scmd) in scsi_get_prot_op() argument
278 return scmd->prot_op; in scsi_get_prot_op()
302 static inline void scsi_set_prot_type(struct scsi_cmnd *scmd, unsigned char type) in scsi_set_prot_type() argument
304 scmd->prot_type = type; in scsi_set_prot_type()
307 static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) in scsi_get_prot_type() argument
309 return scmd->prot_type; in scsi_get_prot_type()
312 static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd) in scsi_prot_ref_tag() argument
314 struct request *rq = blk_mq_rq_from_pdu(scmd); in scsi_prot_ref_tag()
319 static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd) in scsi_prot_interval() argument
321 return scmd->device->sector_size; in scsi_prot_interval()
389 static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd) in scsi_transfer_length() argument
391 unsigned int xfer_len = scmd->sdb.length; in scsi_transfer_length()
392 unsigned int prot_interval = scsi_prot_interval(scmd); in scsi_transfer_length()
394 if (scmd->prot_flags & SCSI_PROT_TRANSFER_PI) in scsi_transfer_length()
400 extern void scsi_build_sense(struct scsi_cmnd *scmd, int desc,