* [PATCH] hisi_sas: fix v1 hw check for slot error
@ 2016-01-26 17:31 ` John Garry
0 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2016-01-26 17:31 UTC (permalink / raw)
To: JBottomley, martin.petersen
Cc: linuxarm, john.garry2, linux-scsi, linux-kernel, ricardo.salveti,
John Garry
Completion header bit CMPLT_HDR_RSPNS_XFRD flags
whether the response frame is received into host memory,
and not whether the response frame has an error.
As such, change the decision on whether a slot has
an error.
Also redundant check on CMPLT_HDR_CMD_CMPLT_MSK is
removed.
Fixes: 27a3f229 ("hisi_sas: Add cq interrupt handler")
Signed-off-by: John Garry <john.garry@huawei.com>
Tested-by: Ricardo Salveti <ricardo.salveti@linaro.org>
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 057fdeb..eea24d7 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1289,13 +1289,10 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
goto out;
}
- if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK) {
- if (!(cmplt_hdr_data & CMPLT_HDR_CMD_CMPLT_MSK) ||
- !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK))
- ts->stat = SAS_DATA_OVERRUN;
- else
- slot_err_v1_hw(hisi_hba, task, slot);
+ if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK &&
+ !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {
+ slot_err_v1_hw(hisi_hba, task, slot);
goto out;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] hisi_sas: fix v1 hw check for slot error
@ 2016-01-26 17:31 ` John Garry
0 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2016-01-26 17:31 UTC (permalink / raw)
To: JBottomley, martin.petersen
Cc: linuxarm, john.garry2, linux-scsi, linux-kernel, ricardo.salveti,
John Garry
Completion header bit CMPLT_HDR_RSPNS_XFRD flags
whether the response frame is received into host memory,
and not whether the response frame has an error.
As such, change the decision on whether a slot has
an error.
Also redundant check on CMPLT_HDR_CMD_CMPLT_MSK is
removed.
Fixes: 27a3f229 ("hisi_sas: Add cq interrupt handler")
Signed-off-by: John Garry <john.garry@huawei.com>
Tested-by: Ricardo Salveti <ricardo.salveti@linaro.org>
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 057fdeb..eea24d7 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1289,13 +1289,10 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
goto out;
}
- if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK) {
- if (!(cmplt_hdr_data & CMPLT_HDR_CMD_CMPLT_MSK) ||
- !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK))
- ts->stat = SAS_DATA_OVERRUN;
- else
- slot_err_v1_hw(hisi_hba, task, slot);
+ if (cmplt_hdr_data & CMPLT_HDR_ERR_RCRD_XFRD_MSK &&
+ !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {
+ slot_err_v1_hw(hisi_hba, task, slot);
goto out;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hisi_sas: fix v1 hw check for slot error
2016-01-26 17:31 ` John Garry
@ 2016-01-27 2:19 ` Martin K. Petersen
-1 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-01-27 2:19 UTC (permalink / raw)
To: John Garry
Cc: JBottomley, martin.petersen, linuxarm, john.garry2, linux-scsi,
linux-kernel, ricardo.salveti
>>>>> "John" == John Garry <john.garry@huawei.com> writes:
John> Completion header bit CMPLT_HDR_RSPNS_XFRD flags whether the
John> response frame is received into host memory, and not whether the
John> response frame has an error. As such, change the decision on
John> whether a slot has an error. Also redundant check on
John> CMPLT_HDR_CMD_CMPLT_MSK is removed.
Applied to 4.5/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hisi_sas: fix v1 hw check for slot error
@ 2016-01-27 2:19 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-01-27 2:19 UTC (permalink / raw)
To: John Garry
Cc: JBottomley, martin.petersen, linuxarm, john.garry2, linux-scsi,
linux-kernel, ricardo.salveti
>>>>> "John" == John Garry <john.garry@huawei.com> writes:
John> Completion header bit CMPLT_HDR_RSPNS_XFRD flags whether the
John> response frame is received into host memory, and not whether the
John> response frame has an error. As such, change the decision on
John> whether a slot has an error. Also redundant check on
John> CMPLT_HDR_CMD_CMPLT_MSK is removed.
Applied to 4.5/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-27 2:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 17:31 [PATCH] hisi_sas: fix v1 hw check for slot error John Garry
2016-01-26 17:31 ` John Garry
2016-01-27 2:19 ` Martin K. Petersen
2016-01-27 2:19 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.