From patchwork Thu Aug 10 16:09:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 109835 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp2567932obb; Thu, 10 Aug 2017 08:49:14 -0700 (PDT) X-Received: by 10.99.115.28 with SMTP id o28mr7692374pgc.183.1502380154611; Thu, 10 Aug 2017 08:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502380154; cv=none; d=google.com; s=arc-20160816; b=zGjiwtrPBgZ0dwfowinKX38AKCazgRnfFPTvxJ9tw9BtUGrw+brG7AQC0y1Icx+qED M2YoVLebdTmIYkKTlXSS6UV2+dbm0DoM/8KBWSHZBogFHBLDMdNpvs3uBzfEq0XBX7Em 2+PkMAc7a8/Gj/ll2fFOlZlH9ziZLGMbN6NT6Ft2fKsY82Cw3YKPcBmRuUuxVBJ5J17x z+GfS4B6rT5l7UYKjsewzDibTz1LrATiBlutjEWaNyu+eZK1JRN1leqO6UO3uCsCDdjC YkuSEM4GO9DCI+HS/J82TPAJz6uoztvb2apsJjPda/dXNrKPfmSGrJWkaDKCDg5XudjI oIgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Uh6Tao+8laHXJ0HQVqktJnhJZ19lrrI5fRVyWgxZBrE=; b=Gzku4ttRpay76qJsxy+QTXdLPtgTe561Fl0OUuzZ2NwlFphOuXs+0VCdy/5LnXsf3w x9uifhUBEYVSoEuFd/qlimugdNps5adZgSLtnOUO8h+iHd2xrBpbUGF9X1JSFp4su6ob vgCFxc8dwC8vTknjmOgHWLsXrfjHBpMM2e8Vuo3vKQMDFmCR42XedFs6IU03MAMeTAim N+wKlXYnlg9qa9UVD9xZfraLOu5HSk2EcJWfUh7eA2lxFPLUUcuNEUiQWuMD0RmnOX3g 42fLgfb2phOUhzovu0dfn//tP/ndvd95LNIlkOK5Km0I5FywF/gKLuG5aXjZ1srXPcMc P2zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g127si4089705pgc.537.2017.08.10.08.49.14; Thu, 10 Aug 2017 08:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbdHJPtM (ORCPT + 25 others); Thu, 10 Aug 2017 11:49:12 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3050 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752891AbdHJPmu (ORCPT ); Thu, 10 Aug 2017 11:42:50 -0400 Received: from 172.30.72.59 (EHLO DGGEMS402-HUB.china.huawei.com) ([172.30.72.59]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DEY38521; Thu, 10 Aug 2017 23:42:46 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.301.0; Thu, 10 Aug 2017 23:42:36 +0800 From: John Garry To: , CC: , , , , Xiang Chen , John Garry Subject: [PATCH 03/19] scsi: hisi_sas: fix v2 hw underflow residual value Date: Fri, 11 Aug 2017 00:09:28 +0800 Message-ID: <1502381384-219889-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502381384-219889-1-git-send-email-john.garry@huawei.com> References: <1502381384-219889-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.598C7EF7.002C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 06bfd8345bd6354c443294e6ed437730 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen 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 Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 8c504b4..a762b25 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; }