Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3064995pxj; Mon, 17 May 2021 16:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuk55dKBdFt2WC5JerUffsAIbSYLOD5vgNNNgp/QEistLViEXef/htSdvBgK3U1w+f+py8 X-Received: by 2002:a05:6402:1256:: with SMTP id l22mr3268938edw.207.1621295583403; Mon, 17 May 2021 16:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621295583; cv=none; d=google.com; s=arc-20160816; b=wJ8R7T12sOQj9E292ONHL9P54YG4XoIcTMr2uW+2b+Kva9Iy8bKxyNRO7DHTC0W3fR gYWdQLx/sgEkv7Yprd5Z5hsYc4qzKkgt8K9099SHnnvOt5/Nj/LYLmFicXL4mU95L6PP t1KjbdkHp+SORFdB2yvEPehlqtAh6tognkCzKb+wdINgxrV3DqIzhEy8qiZ00SZzOKdI OttROHKmrwkkYy6X7WcWHhXG1TlfEbEdNctlLCcR1GMQZUXRCW8nuln0lNhD/6bI9O5F cUBc+rJMsgrbGzsAT1nV4BnjK6bqNizJzr8ZII3HUyx+tVRLrqV0iX6obz7VKynItGKQ /Lcw== 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=IQfcFOFrnSttwrptaryskpp8ZA1KZ4YgFQdzwSudOQ8=; b=XaQ5jqAOxvYgNIaLO6E5zZ3U4v7enzmOkO9NoEmiEPXq72Ravsln4Ryyyd9SkaYJrP Gqfb0RdtzPgcBVwdRa+xYuHgLVvwghSQaFm1C6/9/OSwKS215E+sXQCJmpR2yphODa8P PRMZZ0Klb9HvaXoOFFGMLoNY3NlKIs8VSpgmwd0kHo9V5oHNvMCJ7CiznRRmWUVAm022 p3eLTpRtJPkWlAQ8W9Pda75xKZ0I0XZ0o0FZ29rXw2YO9/6uLUrYRzukwkGB5O4mSzBM CPih6a/2JPOKza50w5E8G8XLRcg2R+MWNxgXwSk82mAzNHFW7SspIOYPCS03fMMLc3iH HcYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=14zxkNGA; 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 kg7si12778021ejc.458.2021.05.17.16.52.39; Mon, 17 May 2021 16:53:03 -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=14zxkNGA; 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 S239105AbhEQOYC (ORCPT + 99 others); Mon, 17 May 2021 10:24:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:36020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238829AbhEQOU1 (ORCPT ); Mon, 17 May 2021 10:20:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 774DA61453; Mon, 17 May 2021 14:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260679; bh=9JLHXc2pG/i5a1fkGbuikExIJXBcBSB3/Pq0AxWji3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=14zxkNGA/c2uHasTsb0JC2rhk/ZVXDPA8REHEG+HZFpXgbmsBSb8cPhXvWOUUo4qo zOnIv/gEqB/MSfug7ni1S+YfNVbkfKyqfCxlbUpjd83CAzEhjEpkLhYbQ2o8/fV3Ia QB594Cc2bdVIUZ9sjDOa+1/yuUKSJe6rWg/aAGe4= 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.12 192/363] net: hns3: fix incorrect configuration for igu_egu_hw_err Date: Mon, 17 May 2021 16:00:58 +0200 Message-Id: <20210517140309.080564572@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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 0ca7f1b984bf..78d3eb142df8 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