scsi: hisi_sas: check IPTT is valid before using it for v3 hw
authorXiaofei Tan <tanxiaofei@huawei.com>
Fri, 23 Mar 2018 16:05:13 +0000 (00:05 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:32:51 +0000 (19:32 -0400)
commit327f242fa806c199a183c2197592e94d336c8266
treea13a113842286021dee72db6304b3ad895ad48bc
parent3ff0f0b657eb414c1f8f1f22b91d52b892d8a850
scsi: hisi_sas: check IPTT is valid before using it for v3 hw

There is a bug of v3 hw development version. When AXI error happen, hw
may return an abnormal CQ that IPTT value is 0xffff.  This will cause
IPTT out-of-bounds reference.

This patch adds a check of IPTT in cq_tasklet_v3_hw() and discards
invalid slot. This workaround scheme is just to enhance fault-tolerance
of the driver. So, we will apply this scheme for all version of v3 hw,
although release version has fixed this SoC bug.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c