Commit 7d676851 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 50ab9c47
...@@ -2670,7 +2670,6 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi, ...@@ -2670,7 +2670,6 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
u64 data_len = 0; u64 data_len = 0;
enum dma_data_direction dir; enum dma_data_direction dir;
int attr = 0; int attr = 0;
int rc = 0;
nexus = vscsi->tport.ibmv_nexus; nexus = vscsi->tport.ibmv_nexus;
/* /*
...@@ -2725,17 +2724,9 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi, ...@@ -2725,17 +2724,9 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
srp->lun.scsi_lun[0] &= 0x3f; srp->lun.scsi_lun[0] &= 0x3f;
rc = target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb, target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb,
cmd->sense_buf, scsilun_to_int(&srp->lun), cmd->sense_buf, scsilun_to_int(&srp->lun),
data_len, attr, dir, 0); 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;
}
return; return;
fail: fail:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment