net/ixgbe/base: use fast MDIO for non-10G devices
authorWei Dai <wei.dai@intel.com>
Wed, 21 Dec 2016 09:47:47 +0000 (17:47 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:40:51 +0000 (19:40 +0100)
Devices that cannot go 10G speeds can safely select a faster
Management Data Input/Output (MDIO) speed.
Select fast MDIO clock speed for for those devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
drivers/net/ixgbe/base/ixgbe_x550.c

index acb8140..c1fac1a 100644 (file)
@@ -2549,8 +2549,6 @@ STATIC void ixgbe_set_mdio_speed(struct ixgbe_hw *hw)
        case IXGBE_DEV_ID_X550EM_X_10G_T:
        case IXGBE_DEV_ID_X550EM_A_SGMII:
        case IXGBE_DEV_ID_X550EM_A_SGMII_L:
-       case IXGBE_DEV_ID_X550EM_A_1G_T:
-       case IXGBE_DEV_ID_X550EM_A_1G_T_L:
        case IXGBE_DEV_ID_X550EM_A_10G_T:
        case IXGBE_DEV_ID_X550EM_A_SFP:
        case IXGBE_DEV_ID_X550EM_A_QSFP:
@@ -2559,6 +2557,13 @@ STATIC void ixgbe_set_mdio_speed(struct ixgbe_hw *hw)
                hlreg0 &= ~IXGBE_HLREG0_MDCSPD;
                IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
                break;
+       case IXGBE_DEV_ID_X550EM_A_1G_T:
+       case IXGBE_DEV_ID_X550EM_A_1G_T_L:
+               /* Select fast MDIO clock speed for these devices */
+               hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
+               hlreg0 |= IXGBE_HLREG0_MDCSPD;
+               IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
+               break;
        default:
                break;
        }