amd-xgbe: Advertise FEC support with the KR re-driver
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 23 May 2018 16:39:31 +0000 (11:39 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 May 2018 20:33:01 +0000 (16:33 -0400)
When a KR re-driver is present, indicate the FEC support is available
during auto-negotiation.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

index 141bb13..dd747f6 100644 (file)
@@ -1720,6 +1720,10 @@ static void xgbe_phy_an_advertising(struct xgbe_prv_data *pdata,
        XGBE_CLR_ADV(dlks, 1000baseKX_Full);
        XGBE_CLR_ADV(dlks, 10000baseKR_Full);
 
+       /* Advertise FEC support is present */
+       if (pdata->fec_ability & MDIO_PMA_10GBR_FECABLE_ABLE)
+               XGBE_SET_ADV(dlks, 10000baseR_FEC);
+
        switch (phy_data->port_mode) {
        case XGBE_PORT_MODE_BACKPLANE:
                XGBE_SET_ADV(dlks, 10000baseKR_Full);