]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
amd-xgbe: Don't overwrite SFP PHY mod_absent settings
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Tue, 28 Feb 2017 21:03:10 +0000 (15:03 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 22 Mar 2017 14:02:34 +0000 (08:02 -0600)
BugLink: http://bugs.launchpad.net/bugs/1675032
[ Upstream commit 2697ea5a859b83ca49511dcfd98daf42584eb3cf ]

If an SFP module is not present, xgbe_phy_sfp_phy_settings() should
return after applying the default settings. Currently there is no return
statement and the default settings are overwritten.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

index 04804cbb7dc1cd694567667074900e90ae3c6768..e707c49cc55a785f9950685f73c03932a1117541 100644 (file)
@@ -716,6 +716,8 @@ static void xgbe_phy_sfp_phy_settings(struct xgbe_prv_data *pdata)
                pdata->phy.duplex = DUPLEX_UNKNOWN;
                pdata->phy.autoneg = AUTONEG_ENABLE;
                pdata->phy.advertising = pdata->phy.supported;
+
+               return;
        }
 
        pdata->phy.advertising &= ~ADVERTISED_Autoneg;