From 9c7b19c17b838775e5d38ba0b2eb0e422847deab Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Fri, 5 Jun 2015 13:21:53 +0800 Subject: [PATCH] ixgbe/base: add X550em autoneg flow control This patch adds x550em Auto neg Flow Control support to ixgbe_device_supports_autoneg_fc and sets the x550em setup_fc function pointer to ixgbe_setup_fc_generic. ixgbe_setup_fc_generic is used for x550em because flow control is setup on the external PHY via MDIO, when ixgbe_setup_fc_X550em sets up flow control on the internal PHY. Signed-off-by: Wenzhuo Lu Acked-by: Helin Zhang --- drivers/net/ixgbe/base/ixgbe_common.c | 1 + drivers/net/ixgbe/base/ixgbe_x550.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index 7a8eb6b150..9e80722f29 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -185,6 +185,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X540T: case IXGBE_DEV_ID_X540T1: case IXGBE_DEV_ID_X550T: + case IXGBE_DEV_ID_X550EM_X_10G_T: supported = true; break; default: diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index bc0ca53e0c..a05bea0c61 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -382,7 +382,11 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw) mac->ops.get_supported_physical_layer = ixgbe_get_supported_physical_layer_X550em; + if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper) + mac->ops.setup_fc = ixgbe_setup_fc_generic; + else mac->ops.setup_fc = ixgbe_setup_fc_X550em; + mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550em; mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550em; -- 2.20.1