diff options
author | Hannes Reinecke <hare@suse.de> | 2018-01-04 04:57:07 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-10 23:25:02 -0500 |
commit | b0cd285eb57cd3cb18d882565c22d39bccffe7f0 (patch) | |
tree | 464b392c4b4281f86768fcdb2f159d2167820f8a /drivers/scsi/mpt3sas/mpt3sas_ctl.c | |
parent | 9961c9bbf2b43acaaf030a0fbabc9954d937ad8c (diff) | |
download | talos-obmc-linux-b0cd285eb57cd3cb18d882565c22d39bccffe7f0.tar.gz talos-obmc-linux-b0cd285eb57cd3cb18d882565c22d39bccffe7f0.zip |
scsi: mpt3sas: always use first reserved smid for ioctl passthrough
ioctl passthrough commands require a SCSIIO smid, but cannot easily
integrate with the block layer. But the driver already has reserved some
SCSIIO smids and we're only ever allowing one ioctl command at a time we
can use the first reserved smid for ioctl commands.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_ctl.c')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b4c374b08e5e..4f23498946ee 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -724,14 +724,8 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, goto out; } } else { - - smid = mpt3sas_base_get_smid_scsiio(ioc, ioc->ctl_cb_idx, NULL); - if (!smid) { - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", - ioc->name, __func__); - ret = -EAGAIN; - goto out; - } + /* Use first reserved smid for passthrough ioctls */ + smid = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT + 1; } ret = 0; |