]> git.karo-electronics.de Git - linux-beck.git/commitdiff
hisi_sas: fix v1 hw check for slot error
authorJohn Garry <john.garry@huawei.com>
Tue, 26 Jan 2016 17:31:17 +0000 (01:31 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Jan 2016 02:19:08 +0000 (21:19 -0500)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

index d54381149c0d513b16cb355b5ec632636073321c..d04808ef6b2b67d7b08e63c4fecb0bf3b62e03af 100644 (file)
@@ -1293,13 +1293,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;
        }