提交 7d81d2b8 编写于 作者: K Kevin Barnett 提交者: Martin K. Petersen

scsi: smartpqi: scsi queuecommand cleanup

minor cleanup of scsi queue command function
Reviewed-by: NScott Teel <scott.teel@microsemi.com>
Reviewed-by: NScott Benesh <scott.benesh@microsemi.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: NTomas Henzl <thenzl@redhat.com>
Signed-off-by: NKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 4fbebf1a
......@@ -4514,7 +4514,7 @@ static int pqi_aio_submit_io(struct pqi_ctrl_info *ctrl_info,
}
static int pqi_scsi_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
struct scsi_cmnd *scmd)
{
int rc;
struct pqi_ctrl_info *ctrl_info;
......@@ -4532,6 +4532,12 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost,
return 0;
}
/*
* This is necessary because the SML doesn't zero out this field during
* error recovery.
*/
scmd->result = 0;
hwq = blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(scmd->request));
if (hwq >= ctrl_info->num_queue_groups)
hwq = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册