From patchwork Tue Apr 6 11:48:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 415894 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4490539jai; Tue, 6 Apr 2021 04:52:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEjBZTIzIWsT6LJI2TFRC+GpSJuTF4ac20Y/sJbAWSgM/mV9SkfgK85wxAx89sJyfHHjHU X-Received: by 2002:a17:906:7f8c:: with SMTP id f12mr4427460ejr.550.1617709974717; Tue, 06 Apr 2021 04:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617709974; cv=none; d=google.com; s=arc-20160816; b=bRXSbvxxmj/S+X+DMR1jyJhD9zZA1i2jev134QnMEmIHbEnWY4MYChWyjbrFYtJohg 7AbUbIRmLoYmycmu/Vun3PyPSW5Jm5wQoSUXZvtxSkS3+ufvynsT1GUt2oHv4v1qC9F4 T14x1m8Mp8z5gVDbbigVOwm2zwkkZuVFl0DiIHTsVUT183+k5J6TEYuMFtfi/3CgFF/U SeIVIiBXDeHPFU2cp1KprnlZqAa66eHaMSfIdoGLbxm7ymMm5kTeCBZQg4SqrDiS+nTB h6N4nZkDBYstsZfeFxf2K/E+9nqrn6Asrf8qcHZBun++jJJlHLktH/y8Qzb7R7WAD2mB Yfow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=kkRLeAl278WU4HbiWYUB7MyYJC/Nwo0faNY481e3bKo=; b=UFcJKbWY0SYTOwifGL7CtvmhTIV+2mCzLugoxAlRKxZadSEKeylMpjO/QqGuUGHh1J bQO3wpnAyn3p5FQpOctKgdoQt7nVIfZPuE7YeePA7VxtVjllisf6fkwbqFMvbcZnDOAd iuXllN10DNOXqanhXLTWTMVJSztfmshVUE7SbWVSBFDlJpDAYxbEzBaKm5HNomH14Srm sqx8icyXW0hboftIA7y292C002L5ExpN7H6JJ9zVtvmuVZfFMxpmL7RevYA+S1/QzdiA /w8GB4MoIreCM/vC1PtzTurARK9YsDBfu3ArV1SO1whdyZ6iZ/nTXj3N09jmlgCo/axd CrRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si17443705edw.487.2021.04.06.04.52.54 for ; Tue, 06 Apr 2021 04:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343543AbhDFLxA (ORCPT ); Tue, 6 Apr 2021 07:53:00 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16363 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343530AbhDFLw5 (ORCPT ); Tue, 6 Apr 2021 07:52:57 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FF5SY3sbYz94Cp; Tue, 6 Apr 2021 19:50:37 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 19:52:38 +0800 From: John Garry To: , CC: , , , Luo Jiaxing , Yihang Li , John Garry Subject: [PATCH 5/6] scsi: hisi_sas: Warn in v3 hw channel interrupt handler when status reg cleared Date: Tue, 6 Apr 2021 19:48:30 +0800 Message-ID: <1617709711-195853-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1617709711-195853-1-git-send-email-john.garry@huawei.com> References: <1617709711-195853-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Luo Jiaxing If a channel interrupt occurs without any status bit set, the handler will return directly. However, if such redundant interrupts are received, it's better to check what happen, so add logs for this. Signed-off-by: Yihang Li Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 0927b0b30b29..499c770d405c 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -1718,8 +1718,11 @@ static void handle_chl_int1_v3_hw(struct hisi_hba *hisi_hba, int phy_no) int i; irq_value &= ~irq_msk; - if (!irq_value) + if (!irq_value) { + dev_warn(dev, "phy%d channel int 1 received with status bits cleared\n", + phy_no); return; + } for (i = 0; i < ARRAY_SIZE(port_axi_error); i++) { const struct hisi_sas_hw_error *error = &port_axi_error[i]; @@ -1780,8 +1783,11 @@ static void handle_chl_int2_v3_hw(struct hisi_hba *hisi_hba, int phy_no) BIT(CHL_INT2_RX_INVLD_DW_OFF); irq_value &= ~irq_msk; - if (!irq_value) + if (!irq_value) { + dev_warn(dev, "phy%d channel int 2 received with status bits cleared\n", + phy_no); return; + } if (irq_value & BIT(CHL_INT2_SL_IDAF_TOUT_CONF_OFF)) { dev_warn(dev, "phy%d identify timeout\n", phy_no);