Message ID | 20210329075605.915789514@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06028C433E9 for <stable@archiver.kernel.org>; Mon, 29 Mar 2021 08:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1C4561976 for <stable@archiver.kernel.org>; Mon, 29 Mar 2021 08:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231548AbhC2IAw (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 29 Mar 2021 04:00:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:42268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbhC2IAn (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 29 Mar 2021 04:00:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A10506196C; Mon, 29 Mar 2021 08:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617004843; bh=xNCKVcV/NhDrB/mLzxGObIO9yDOX00RUksFEPoS9loI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AHnp690ZYm3OUe5lSObCoyGCzRTQ8x4MLq9QEXnXSyzzWFkniYfIb1/AkcFBxxaya S1q6HGgFjWcgKn1ci+qImg+lyqPVaxv+U4XMRpYSS1iBIWWt1wdMs0pE9cnztQTWJa aqEduzVBUGUlG+M9f4kw3XsMuIrO/8Ta2m3YAyS4= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, "David S. Miller" <davem@davemloft.net>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.4 20/33] net: dsa: bcm_sf2: Qualify phydev->dev_flags based on port Date: Mon, 29 Mar 2021 09:58:05 +0200 Message-Id: <20210329075605.915789514@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075605.290845195@linuxfoundation.org> References: <20210329075605.290845195@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 0864f05633a2..a56f4f3a5872 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -1067,8 +1067,10 @@ static u32 bcm_sf2_sw_get_phy_flags(struct dsa_switch *ds, int port) * in bits 15:8 and the patch level in bits 7:0 which is exactly what * the REG_PHY_REVISION register layout is. */ - - return priv->hw_params.gphy_rev; + if (priv->int_phy_mask & BIT(port)) + return priv->hw_params.gphy_rev; + else + return 0; } static int bcm_sf2_sw_indir_rw(struct dsa_switch *ds, int op, int addr,