From: Wei Dai Date: Wed, 21 Dec 2016 09:48:08 +0000 (+0800) Subject: net/ixgbe/base: add EEE support for some PHYs X-Git-Tag: spdx-start~4937 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3ab3671b0b3805344de2954dbbac147e59c940da;p=dpdk.git net/ixgbe/base: add EEE support for some PHYs This patch adds Energy Efficient Ethernet (EEE) support for some Marvell PHYs on some future platforms. Because EEE capability or status was not indicated previously, this patch simply assumes that it is supported. As soon as there is a PHY that does not support EEE, there will be defects in this area because the driver will not report the EEE status correctly. This also deletes some now-unused definitions from an earlier Marvell PHY implementation and combines a device ID check into a switch statement. Signed-off-by: Wei Dai --- diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 49b59e7912..2aaed6bab9 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -896,19 +896,18 @@ s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw) break; } - if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T) || - (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)) { + switch (hw->device_id) { + case IXGBE_DEV_ID_X550EM_A_1G_T: + case IXGBE_DEV_ID_X550EM_A_1G_T_L: mac->ops.fc_autoneg = ixgbe_fc_autoneg_sgmii_x550em_a; mac->ops.setup_fc = ixgbe_fc_autoneg_fw; - } - - switch (hw->device_id) { - case IXGBE_DEV_ID_X550EM_A_KR: - case IXGBE_DEV_ID_X550EM_A_KR_L: mac->ops.setup_eee = ixgbe_setup_eee_fw; + hw->phy.eee_speeds_supported = IXGBE_LINK_SPEED_100_FULL | + IXGBE_LINK_SPEED_1GB_FULL; + hw->phy.eee_speeds_advertised = hw->phy.eee_speeds_supported; break; default: - mac->ops.setup_eee = NULL; + break; } return ret_val;