diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-28 17:22:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-28 17:22:10 -0700 |
commit | d72cd4ad4174cfd2257c426ad51e4f53bcfde9c9 (patch) | |
tree | b291d1c28bbf6ce61edc3bdf022ea857414230f6 /drivers/xen | |
parent | 238da4d004856ac5f832899f6f3fa27c0102381f (diff) | |
parent | 7a3beeae289385f7be9f61a33a6e4f6c7e2400d3 (diff) | |
download | linux-d72cd4ad4174cfd2257c426ad51e4f53bcfde9c9.tar.bz2 |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"This consists of the usual driver updates (ufs, target, tcmu,
smartpqi, lpfc, zfcp, qla2xxx, mpt3sas, pm80xx).
The major core change is using a sbitmap instead of an atomic for
queue tracking"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (412 commits)
scsi: target: tcm_fc: Fix a kernel-doc header
scsi: target: Shorten ALUA error messages
scsi: target: Fix two format specifiers
scsi: target: Compare explicitly with SAM_STAT_GOOD
scsi: sd: Introduce a new local variable in sd_check_events()
scsi: dc395x: Open-code status_byte(u8) calls
scsi: 53c700: Open-code status_byte(u8) calls
scsi: smartpqi: Remove unused functions
scsi: qla4xxx: Remove an unused function
scsi: myrs: Remove unused functions
scsi: myrb: Remove unused functions
scsi: mpt3sas: Fix two kernel-doc headers
scsi: fcoe: Suppress a compiler warning
scsi: libfc: Fix a format specifier
scsi: aacraid: Remove an unused function
scsi: core: Introduce enum scsi_disposition
scsi: core: Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case
scsi: core: Rename scsi_softirq_done() into scsi_complete()
scsi: core: Remove an incorrect comment
scsi: core: Make the scsi_alloc_sgtables() documentation more accurate
...
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xen-scsiback.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index f3024942fbdf..55a4763da05e 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c @@ -360,21 +360,18 @@ static void scsiback_cmd_exec(struct vscsibk_pend *pending_req) { struct se_cmd *se_cmd = &pending_req->se_cmd; struct se_session *sess = pending_req->v2p->tpg->tpg_nexus->tvn_se_sess; - int rc; scsiback_get(pending_req->info); se_cmd->tag = pending_req->rqid; - rc = target_submit_cmd_map_sgls(se_cmd, sess, pending_req->cmnd, - pending_req->sense_buffer, pending_req->v2p->lun, - pending_req->data_len, 0, - pending_req->sc_data_direction, TARGET_SCF_ACK_KREF, - pending_req->sgl, pending_req->n_sg, - NULL, 0, NULL, 0); - if (rc < 0) { - transport_send_check_condition_and_sense(se_cmd, - TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); - transport_generic_free_cmd(se_cmd, 0); - } + target_init_cmd(se_cmd, sess, pending_req->sense_buffer, + pending_req->v2p->lun, pending_req->data_len, 0, + pending_req->sc_data_direction, TARGET_SCF_ACK_KREF); + + if (target_submit_prep(se_cmd, pending_req->cmnd, pending_req->sgl, + pending_req->n_sg, NULL, 0, NULL, 0, GFP_KERNEL)) + return; + + target_submit(se_cmd); } static int scsiback_gnttab_data_map_batch(struct gnttab_map_grant_ref *map, |