summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas
diff options
context:
space:
mode:
authorXiang Chen2017-08-10 18:09:28 +0200
committerMartin K. Petersen2017-08-11 02:15:01 +0200
commit01b361fc900dd8ef7f8537c20e3a1986ab63f4d1 (patch)
tree9bd6fa82cbe8532aa629384ba20a64f5939bdeea /drivers/scsi/hisi_sas
parentscsi: hisi_sas: avoid potential v2 hw interrupt issue (diff)
downloadkernel-qcow2-linux-01b361fc900dd8ef7f8537c20e3a1986ab63f4d1.tar.gz
kernel-qcow2-linux-01b361fc900dd8ef7f8537c20e3a1986ab63f4d1.tar.xz
kernel-qcow2-linux-01b361fc900dd8ef7f8537c20e3a1986ab63f4d1.zip
scsi: hisi_sas: fix v2 hw underflow residual value
The value dw0 is the residual bytes when UNDERFLOW error happens, but we filled the residual with the value of dw3 before. So change the residual from dw3 to dw0. Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_v2_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index 8c504b437567..a762b259f68f 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -1972,7 +1972,7 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
}
case DMA_RX_DATA_LEN_UNDERFLOW:
{
- ts->residual = dma_rx_err_type;
+ ts->residual = trans_tx_fail_type;
ts->stat = SAS_DATA_UNDERRUN;
break;
}
@@ -2098,7 +2098,7 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
}
case DMA_RX_DATA_LEN_UNDERFLOW:
{
- ts->residual = dma_rx_err_type;
+ ts->residual = trans_tx_fail_type;
ts->stat = SAS_DATA_UNDERRUN;
break;
}