From: Michael Chan Date: Mon, 13 Feb 2017 00:18:15 +0000 (-0500) Subject: bnxt_en: Do not setup PHY unless driving a single PF. X-Git-Tag: v4.1.12-93~2^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0a464b201d90b59d82e2cdb7cc0168c65a2d5d0b;p=users%2Fjedix%2Flinux-maple.git bnxt_en: Do not setup PHY unless driving a single PF. Orabug: 25645429 If it is a VF or an NPAR function, the firmware call to setup the PHY will fail. Adding this check will prevent unnecessary firmware calls to setup the PHY unless calling from the PF. This will also eliminate many unnecessary warning messages when the call from a VF or NPAR fails. Signed-off-by: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit 33dac24abbd5a77eefca18fb7ebbd01a3cf1b343) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 53d7db3534210..d3530c27e478b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -5845,6 +5845,9 @@ static int bnxt_update_phy_setting(struct bnxt *bp) rc); return rc; } + if (!BNXT_SINGLE_PF(bp)) + return 0; + if ((link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL) && (link_info->auto_pause_setting & BNXT_LINK_PAUSE_BOTH) != link_info->req_flow_ctrl)