From eda89374640dcebb705bd8188f9c16873bab736f Mon Sep 17 00:00:00 2001 From: Kevin Barnett Date: Wed, 31 Aug 2016 14:55:11 -0500 Subject: [PATCH] scsi: smartpqi: scsi queuecommand cleanup Orabug: 25144431 minor cleanup of scsi queue command function Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Johannes Thumshirn Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen (cherry picked from commit 7d81d2b8714ec72462a99875acbf2f976402f3f1) Signed-off-by: Brian Maly --- drivers/scsi/smartpqi/smartpqi_init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 088a8cb44854..b4d8842e9ac8 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -4526,7 +4526,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; @@ -4544,6 +4544,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; -- 2.50.1