Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp462567pxj; Tue, 18 May 2021 07:17:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDVuITV+Wb0BtryTwUNCBRhSEJv0uUj/FugN18T1h8v22qONaVFjdNtCA4mR+abJQzZ4AZ X-Received: by 2002:a17:907:78c5:: with SMTP id kv5mr6356303ejc.146.1621347453529; Tue, 18 May 2021 07:17:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621347453; cv=none; d=google.com; s=arc-20160816; b=V8LBW1o5ERpkJE9kEQOWc6fwsXEUIvDXdmtFWj24DnwjXFVj26TVg8Ve4TtaUXAgYY 7mgTb3RVMHAly0w+mPrdf+MVaCoI3yj+5y4Nj9LZmmjPaXCblfU2LXKrbYHXXZ4gY809 RO8gyGeNYHDYS8Mb9R58+nvIUY39rgf3WVjU7DD7ICmoD9x11ySVXTctCx139c7lFjp/ bughOL4fydZ+i4jHR4QocGAHpYCLqJBwT/eDus1nnkUg70bYQu7CAoj0W4Yl6wPJShrL i1v8qLEhJYCPtlDKTyr71XTGB6FARNi1+JuTosV6cLemSXigbELA0dGR+o2WxIEGUVMt KAcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RX/JkkFXEfn+Pb0+/Hj8izOabe6L8Po12ZgZ4hc+vZ0=; b=HvNZdH6vFmB5x9JaEYa1z8lZp1v+wIZHQeU0+jcmzVdqtJtrle1T/32RC48IvGQ6Bd uQ30k7LfS5U/8pwK+C5kabZ1dt3hHrc7NwAA0XrOo7L8rC5CqSiMjo/Y10WraBei1H6n ua8SilbpR+XShFtoMqvwCUz+3edDYaeuhPoe9QyN6+vrzuFAi3zZYvwVR0RbG2O+Iev0 mBL6h0kzHg0GEOlmjdgWHygo2iZQ3bFT5v9r94eGfmSzU3gprVfoJz5dP9CCL1UKvClq bpO7RPmbHmiLdzGoRln8plTrrXJd6wO2t4QW4IkRp5NrnhZOtpPUnMI7wPmTHFVR/eMb oGQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m8VugUCD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si18169091edo.74.2021.05.18.07.17.09; Tue, 18 May 2021 07:17:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m8VugUCD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344431AbhEQPoj (ORCPT + 99 others); Mon, 17 May 2021 11:44:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:51532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244895AbhEQP3C (ORCPT ); Mon, 17 May 2021 11:29:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1784A61CB7; Mon, 17 May 2021 14:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262247; bh=fbZsCzOi5Sbw90nfW0VZYKamOCE5mLGVigOqnw+p0Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m8VugUCDPJDYBhXbk/55Cx1e5TciV2nUF7PeEtAFNS0ADhZNNGcmWcYJjVizkUYWq xHRKoDZSQJZ51oWrr5ZJZbmT7EACtI1PXTzBK89dec8/FgULCRsBYvmWczyS+KL37B B4RtIksvBiqp1YkYN5uO1evroH1WDW1n8vhDFQMs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yufeng Mo , Huazhong Tan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 145/289] net: hns3: fix incorrect configuration for igu_egu_hw_err Date: Mon, 17 May 2021 16:01:10 +0200 Message-Id: <20210517140310.033989161@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo [ Upstream commit 2867298dd49ee84214b8721521dc7a5a6382520c ] According to the UM, the type and enable status of igu_egu_hw_err should be configured separately. Currently, the type field is incorrect when disable this error. So fix it by configuring these two fields separately. Fixes: bf1faf9415dd ("net: hns3: Add enable and process hw errors from IGU, EGU and NCSI") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index 9ee55ee0487d..3226ca176155 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c @@ -753,8 +753,9 @@ static int hclge_config_igu_egu_hw_err_int(struct hclge_dev *hdev, bool en) /* configure IGU,EGU error interrupts */ hclge_cmd_setup_basic_desc(&desc, HCLGE_IGU_COMMON_INT_EN, false); + desc.data[0] = cpu_to_le32(HCLGE_IGU_ERR_INT_TYPE); if (en) - desc.data[0] = cpu_to_le32(HCLGE_IGU_ERR_INT_EN); + desc.data[0] |= cpu_to_le32(HCLGE_IGU_ERR_INT_EN); desc.data[1] = cpu_to_le32(HCLGE_IGU_ERR_INT_EN_MASK); diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h index 608fe26fc3fe..d647f3c84134 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h @@ -32,7 +32,8 @@ #define HCLGE_TQP_ECC_ERR_INT_EN_MASK 0x0FFF #define HCLGE_MSIX_SRAM_ECC_ERR_INT_EN_MASK 0x0F000000 #define HCLGE_MSIX_SRAM_ECC_ERR_INT_EN 0x0F000000 -#define HCLGE_IGU_ERR_INT_EN 0x0000066F +#define HCLGE_IGU_ERR_INT_EN 0x0000000F +#define HCLGE_IGU_ERR_INT_TYPE 0x00000660 #define HCLGE_IGU_ERR_INT_EN_MASK 0x000F #define HCLGE_IGU_TNL_ERR_INT_EN 0x0002AABF #define HCLGE_IGU_TNL_ERR_INT_EN_MASK 0x003F -- 2.30.2