Lines Matching refs:cmd
379 static sense_reason_t rd_do_prot_rw(struct se_cmd *cmd, bool is_read) in rd_do_prot_rw() argument
381 struct se_device *se_dev = cmd->se_dev; in rd_do_prot_rw()
385 u32 sectors = cmd->data_length / se_dev->dev_attrib.block_size; in rd_do_prot_rw()
391 tmp = cmd->t_task_lba * se_dev->prot_length; in rd_do_prot_rw()
404 rc = sbc_dif_verify(cmd, cmd->t_task_lba, sectors, 0, in rd_do_prot_rw()
407 rc = sbc_dif_verify(cmd, cmd->t_task_lba, sectors, 0, in rd_do_prot_rw()
408 cmd->t_prot_sg, 0); in rd_do_prot_rw()
411 sbc_dif_copy_prot(cmd, sectors, is_read, prot_sg, prot_offset); in rd_do_prot_rw()
417 rd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, in rd_execute_rw() argument
420 struct se_device *se_dev = cmd->se_dev; in rd_execute_rw()
433 target_complete_cmd(cmd, SAM_STAT_GOOD); in rd_execute_rw()
437 tmp = cmd->t_task_lba * se_dev->dev_attrib.block_size; in rd_execute_rw()
440 rd_size = cmd->data_length; in rd_execute_rw()
451 cmd->t_task_lba, rd_size, rd_page, rd_offset); in rd_execute_rw()
453 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw()
455 rc = rd_do_prot_rw(cmd, false); in rd_execute_rw()
521 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw()
523 rc = rd_do_prot_rw(cmd, true); in rd_execute_rw()
528 target_complete_cmd(cmd, SAM_STAT_GOOD); in rd_execute_rw()
651 rd_parse_cdb(struct se_cmd *cmd) in rd_parse_cdb() argument
653 return sbc_parse_cdb(cmd, &rd_exec_cmd_ops); in rd_parse_cdb()