Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3713479pxv; Mon, 26 Jul 2021 10:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTKlOPhCReFT5pPopEBfnh1e9Uby3231r/3rH8xF7/7mNsCm/WotHHu4ytAXA9EOcM3Fdp X-Received: by 2002:a05:6402:198:: with SMTP id r24mr22763263edv.93.1627318973569; Mon, 26 Jul 2021 10:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627318973; cv=none; d=google.com; s=arc-20160816; b=BIegAVSLEBowg5UsdeFuziuJcS/zFq0HEfPJDe7nHuy+XGjnGcEa3uODSsOHHeQ1ud 7+0nM1vAcctkfY7Yd9nMvYicWbpRdMBZX9rpNncJq3G6Nc5TZ4VsDerREqPkKRa31XUH BRVFS3WNlUQRLph6eeL1rHdNtvxPQhW8PFj7W0e+z6tfArDm4cCyqYwp10YP0DxI1roy KzqsV4WYxyV9OoKjO8P8Op+8GRKmHv8pPtrV5vK+zKQS2z8UP+0zKVTBpGxV+09IPno/ 4LdrGQ18J90GJf/DT6fM1fRnr/Cp0lXPm2dF/TuPcfIKRZuVX9XZsrr4Nj0FTiV2j8PL WFSQ== 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=htKfdGVO7XkzSpLan72/XMoaz4m6x0LBrRpOO5xssxg=; b=v3mQvr0+bKEg8OPJWDEtgClfh6BN0xdi1I3X9PWcOHmpjG32gi1hvRk9RjJ2xw7WC7 +yjofQu9TfejEJV5QWvMxVHK98ZVbIizKJF6UXAAJAcLu95WwvvpKPYIeHmU9HMndCHK MODyjbbu79uVpEg1bx6iIAf8s44ArXE84etJn6g5FqxoGFdPyvCSD8lR/1YDtdj2T77j 2qp41BhjsqOklJ1jF/zVwkoq3hUy9vwc+UY1yDPRVqjbo5caQQU9TuVBmjcnzzzhkG5V 2YkU6L69l/THRQel48koGjt1ex5oSRu51ByaQLUCA6e454YZbd+q0SO2GFnwqLI8QJE3 3XSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Mi5U3ZSI; 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 w11si503401ejc.453.2021.07.26.10.02.29; Mon, 26 Jul 2021 10:02:53 -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=Mi5U3ZSI; 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 S237583AbhGZPkF (ORCPT + 99 others); Mon, 26 Jul 2021 11:40:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:37546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237396AbhGZPWp (ORCPT ); Mon, 26 Jul 2021 11:22:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E6B4660EB2; Mon, 26 Jul 2021 16:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315394; bh=6If3F0eghDjTz18J2gn5939lQ3Tw+UTGUv95AWcWagk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mi5U3ZSI5DrLl6kmS+8Jl7YsdYB7+6cTTBd/nsJekTPxW9z4pws0N1Iy735N+sAu9 bZ+N3FfpL+Hf/69olnX9VTXjU9mHckZl9tE6KuL+Q1K4AfF63wXqIIj7cXP2PA/bnA /A1d4kyadJCoTMdPHLA8xnHVcUgNjC1ETbC+3vH8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Somnath Kotur , Edwin Peer , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 080/167] bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe() Date: Mon, 26 Jul 2021 17:38:33 +0200 Message-Id: <20210726153842.096527097@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153839.371771838@linuxfoundation.org> References: <20210726153839.371771838@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: Michael Chan [ Upstream commit 2c9f046bc377efd1f5e26e74817d5f96e9506c86 ] The capabilities can change after firmware upgrade/downgrade, so we should get the up-to-date RoCE capabilities everytime bnxt_ulp_probe() is called. Fixes: 2151fe0830fd ("bnxt_en: Handle RESET_NOTIFY async event from firmware.") Reviewed-by: Somnath Kotur Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c index 64dbbb04b043..abf169001bf3 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c @@ -479,15 +479,16 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev) if (!edev) return ERR_PTR(-ENOMEM); edev->en_ops = &bnxt_en_ops_tbl; - if (bp->flags & BNXT_FLAG_ROCEV1_CAP) - edev->flags |= BNXT_EN_FLAG_ROCEV1_CAP; - if (bp->flags & BNXT_FLAG_ROCEV2_CAP) - edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP; edev->net = dev; edev->pdev = bp->pdev; edev->l2_db_size = bp->db_size; edev->l2_db_size_nc = bp->db_size; bp->edev = edev; } + edev->flags &= ~BNXT_EN_FLAG_ROCE_CAP; + if (bp->flags & BNXT_FLAG_ROCEV1_CAP) + edev->flags |= BNXT_EN_FLAG_ROCEV1_CAP; + if (bp->flags & BNXT_FLAG_ROCEV2_CAP) + edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP; return bp->edev; } -- 2.30.2