diff mbox

hisi_sas: fix v1 hw check for slot error

Message ID 1453829477-40725-1-git-send-email-john.garry@huawei.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

John Garry Jan. 26, 2016, 5:31 p.m. UTC
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>

Comments

Martin K. Petersen Jan. 27, 2016, 2:19 a.m. UTC | #1
>>>>> "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.
diff mbox

Patch

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;
 	}