• Home
  • Raw
  • Download

Lines Matching refs:cmd

163 static inline void *scsi_cmd_priv(struct scsi_cmnd *cmd)  in scsi_cmd_priv()  argument
165 return cmd + 1; in scsi_cmd_priv()
169 static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) in scsi_cmd_to_driver() argument
171 return *(struct scsi_driver **)cmd->request->rq_disk->private_data; in scsi_cmd_to_driver()
174 extern void scsi_finish_command(struct scsi_cmnd *cmd);
180 blk_status_t scsi_alloc_sgtables(struct scsi_cmnd *cmd);
181 void scsi_free_sgtables(struct scsi_cmnd *cmd);
184 extern int scsi_dma_map(struct scsi_cmnd *cmd);
185 extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
187 static inline int scsi_dma_map(struct scsi_cmnd *cmd) { return -ENOSYS; } in scsi_dma_map() argument
188 static inline void scsi_dma_unmap(struct scsi_cmnd *cmd) { } in scsi_dma_unmap() argument
191 static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) in scsi_sg_count() argument
193 return cmd->sdb.table.nents; in scsi_sg_count()
196 static inline struct scatterlist *scsi_sglist(struct scsi_cmnd *cmd) in scsi_sglist() argument
198 return cmd->sdb.table.sgl; in scsi_sglist()
201 static inline unsigned scsi_bufflen(struct scsi_cmnd *cmd) in scsi_bufflen() argument
203 return cmd->sdb.length; in scsi_bufflen()
206 static inline void scsi_set_resid(struct scsi_cmnd *cmd, unsigned int resid) in scsi_set_resid() argument
208 cmd->req.resid_len = resid; in scsi_set_resid()
211 static inline unsigned int scsi_get_resid(struct scsi_cmnd *cmd) in scsi_get_resid() argument
213 return cmd->req.resid_len; in scsi_get_resid()
216 #define scsi_for_each_sg(cmd, sg, nseg, __i) \ argument
217 for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
219 static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, in scsi_sg_copy_from_buffer() argument
222 return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), in scsi_sg_copy_from_buffer()
226 static inline int scsi_sg_copy_to_buffer(struct scsi_cmnd *cmd, in scsi_sg_copy_to_buffer() argument
229 return sg_copy_to_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), in scsi_sg_copy_to_buffer()
305 static inline unsigned scsi_prot_sg_count(struct scsi_cmnd *cmd) in scsi_prot_sg_count() argument
307 return cmd->prot_sdb ? cmd->prot_sdb->table.nents : 0; in scsi_prot_sg_count()
310 static inline struct scatterlist *scsi_prot_sglist(struct scsi_cmnd *cmd) in scsi_prot_sglist() argument
312 return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; in scsi_prot_sglist()
315 static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd) in scsi_prot() argument
317 return cmd->prot_sdb; in scsi_prot()
320 #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \ argument
321 for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
323 static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) in set_msg_byte() argument
325 cmd->result = (cmd->result & 0xffff00ff) | (status << 8); in set_msg_byte()
328 static inline void set_host_byte(struct scsi_cmnd *cmd, char status) in set_host_byte() argument
330 cmd->result = (cmd->result & 0xff00ffff) | (status << 16); in set_host_byte()
333 static inline void set_driver_byte(struct scsi_cmnd *cmd, char status) in set_driver_byte() argument
335 cmd->result = (cmd->result & 0x00ffffff) | (status << 24); in set_driver_byte()