Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3673952pxv; Mon, 26 Jul 2021 09:09:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3sRozkJVmOc9M9jcXLSqedX1fWg+hQsQQwjB7KrslOGLQP07iKpLW0WuLvKpQsDmKVPrF X-Received: by 2002:a92:d346:: with SMTP id a6mr13530687ilh.249.1627315764308; Mon, 26 Jul 2021 09:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627315764; cv=none; d=google.com; s=arc-20160816; b=yP+ay5Qh4fCbLYCva0vy9bfUYwqET5tsttNJ3z3O16b5hUDN8f1cfjY97fMF3au9Ft +Ih9nxnK+K7qOG81DDGDXEmwEErLX77HIT5PsMlypdNQ1wu6zq2z4sqk6XpmPIK+KrbD VoKeenEOvUchnKAtnhlDEYPJved8E2kvH3uvXYmb/YLJvd18qna+jR09/0Si+qE2NBYX uITDfWdb6eg1BXDh+pr46mwQ3ojNqIpkICLC4g74dv+s8mOkL0oQkBCEJRKNj4k5z0PB wqoZ7e5yd8UtAvsIVoiis13Jk9zHfbjYy/OMTmFcUdhMNrDBKp5yI2K8KJ3Ui+DiOH7f MmWA== 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=YShoyjgJ62qq9keQciYuiU/JnthZ5xzSm85h+fEHKis=; b=NnApz40AdrAKJBL8DDfcLzEMueOtd2BT0+mUa/AYff9YOHlt3dq+e1M3QXRD7TY2J3 XmAn/NikR3rgkS/r9MwrdAI9XxHNoirYqsNEBA8Nb6OsUdf544Yxc0I6IvEYolFyx/y+ i7g2e7daJBcJtLW1o9U87z756VU32jnMOGi8SnvN7vSpyGCt1bjKPrMVFqRMvsUDoFSz xXzThRV2pGMJ0JUCZvbVpIYC24h1FpgKg8Y/E3Lx5VXceYGos5GV36Yol2HCmMNouVpT tL7u0Wq4koFvGEmYXNBK9EF6oqIk9kq0qmWlwh4MHv+HXyE1RZZ9hpM2J5almcuPj/Fp P/3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EcLviIaa; 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 u6si244832ioc.42.2021.07.26.09.09.11; Mon, 26 Jul 2021 09:09:24 -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=EcLviIaa; 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 S238244AbhGZPZO (ORCPT + 99 others); Mon, 26 Jul 2021 11:25:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237778AbhGZPQ0 (ORCPT ); Mon, 26 Jul 2021 11:16:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BEE4A60F02; Mon, 26 Jul 2021 15:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315014; bh=s/WFr6LbuGVWNAD3q7+VmLZH3Ws/5MvNUpJnSNF/M0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EcLviIaa3WZfdP4i0q/HXtkLeteijPTP3WVCnKbEEV3FAcfHRRSaX8hyEji9yUaPc KwbVbOBbqBV1a0mlSOUv02BbjQyWeEZ4xBGatlI1wZ9lZJ1XAC0vgTP4hJNTn1e+tz 5GFX7KkPR3RhK7Wvzs+K9kpqmrmGeqhP6jwzv6Ok= 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.4 052/108] bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe() Date: Mon, 26 Jul 2021 17:38:53 +0200 Message-Id: <20210726153833.354657459@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153831.696295003@linuxfoundation.org> References: <20210726153831.696295003@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 85bacaed763e..b0ae180df4e6 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c @@ -473,13 +473,14 @@ 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; 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