scsi: target: ibmvscsi_tgt: Convert to new submission API
target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). It will never return a failure, so we can remove that code from the driver. Link: https://lore.kernel.org/r/20210227170006.5077-7-michael.christie@oracle.com Cc: Michael Cyr <mikecyr@linux.ibm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
50ab9c47f5
commit
7d676851de
@ -2670,7 +2670,6 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
|
||||
u64 data_len = 0;
|
||||
enum dma_data_direction dir;
|
||||
int attr = 0;
|
||||
int rc = 0;
|
||||
|
||||
nexus = vscsi->tport.ibmv_nexus;
|
||||
/*
|
||||
@ -2725,17 +2724,9 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
|
||||
|
||||
srp->lun.scsi_lun[0] &= 0x3f;
|
||||
|
||||
rc = target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb,
|
||||
cmd->sense_buf, scsilun_to_int(&srp->lun),
|
||||
data_len, attr, dir, 0);
|
||||
if (rc) {
|
||||
dev_err(&vscsi->dev, "target_submit_cmd failed, rc %d\n", rc);
|
||||
spin_lock_bh(&vscsi->intr_lock);
|
||||
list_del(&cmd->list);
|
||||
ibmvscsis_free_cmd_resources(vscsi, cmd);
|
||||
spin_unlock_bh(&vscsi->intr_lock);
|
||||
goto fail;
|
||||
}
|
||||
target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb,
|
||||
cmd->sense_buf, scsilun_to_int(&srp->lun),
|
||||
data_len, attr, dir, 0);
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
Loading…
x
Reference in New Issue
Block a user