diff options
author | Kevin Barnett <kevin.barnett@microsemi.com> | 2016-08-31 15:55:11 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-09-02 06:21:38 -0400 |
commit | 7d81d2b8714ec72462a99875acbf2f976402f3f1 (patch) | |
tree | 7588a3b5ecbf09c1e44c84929b59c33c3e6d3f25 | |
parent | 4fbebf1a779d9f6890ddc1df90c497b161dfb34c (diff) |
scsi: smartpqi: scsi queuecommand cleanup
minor cleanup of scsi queue command function
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index db248c15adaf..f0672ed416cb 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c | |||
@@ -4514,7 +4514,7 @@ static int pqi_aio_submit_io(struct pqi_ctrl_info *ctrl_info, | |||
4514 | } | 4514 | } |
4515 | 4515 | ||
4516 | static int pqi_scsi_queue_command(struct Scsi_Host *shost, | 4516 | static int pqi_scsi_queue_command(struct Scsi_Host *shost, |
4517 | struct scsi_cmnd *scmd) | 4517 | struct scsi_cmnd *scmd) |
4518 | { | 4518 | { |
4519 | int rc; | 4519 | int rc; |
4520 | struct pqi_ctrl_info *ctrl_info; | 4520 | struct pqi_ctrl_info *ctrl_info; |
@@ -4532,6 +4532,12 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, | |||
4532 | return 0; | 4532 | return 0; |
4533 | } | 4533 | } |
4534 | 4534 | ||
4535 | /* | ||
4536 | * This is necessary because the SML doesn't zero out this field during | ||
4537 | * error recovery. | ||
4538 | */ | ||
4539 | scmd->result = 0; | ||
4540 | |||
4535 | hwq = blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(scmd->request)); | 4541 | hwq = blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(scmd->request)); |
4536 | if (hwq >= ctrl_info->num_queue_groups) | 4542 | if (hwq >= ctrl_info->num_queue_groups) |
4537 | hwq = 0; | 4543 | hwq = 0; |