From 69bcf7b112d10a82a2133d37409ad31b54479cd5 Mon Sep 17 00:00:00 2001 From: wadelnn Date: Fri, 17 Feb 2017 10:58:32 +0800 Subject: [PATCH] Disable BCM54616S MII isolate mode * Add disable BCM54616S MII isolate mode Signed-off-by: Wade He --- src/igb/Makefile | 1 + ...isable-mii-isolate-mode-for-bcm54616.patch | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/igb/patch/0002-force-disable-mii-isolate-mode-for-bcm54616.patch diff --git a/src/igb/Makefile b/src/igb/Makefile index ab8c68cef32d..a5760c1e978a 100644 --- a/src/igb/Makefile +++ b/src/igb/Makefile @@ -12,6 +12,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Patch pushd ./igb-$(IGB_DRIVER_VERSION) patch -p1 < ../patch/0001-add-support-for-BCM54616-phy-for-intel-igb-driver.patch + patch -p1 < ../patch/0002-force-disable-mii-isolate-mode-for-bcm54616.patch # Build the package pushd src diff --git a/src/igb/patch/0002-force-disable-mii-isolate-mode-for-bcm54616.patch b/src/igb/patch/0002-force-disable-mii-isolate-mode-for-bcm54616.patch new file mode 100644 index 000000000000..44be143bb361 --- /dev/null +++ b/src/igb/patch/0002-force-disable-mii-isolate-mode-for-bcm54616.patch @@ -0,0 +1,62 @@ +Force disable MII isolate mode + +From: wadelnn +--- + src/e1000_82575.c | 3 +++ + src/e1000_phy.c | 13 +++++++++++++ + src/e1000_phy.h | 1 + + 3 files changed, 17 insertions(+) + +diff --git a/src/e1000_82575.c b/src/e1000_82575.c +index 049ab7b..97e7025 100644 +--- a/src/e1000_82575.c ++++ b/src/e1000_82575.c +@@ -1592,6 +1592,9 @@ static s32 e1000_setup_copper_link_82575(struct e1000_hw *hw) + case I210_I_PHY_ID: + ret_val = e1000_copper_link_setup_m88_gen2(hw); + break; ++ case BCM54616_E_PHY_ID: ++ e1000_disable_mii_isolate_bcm54616(hw); ++ break; + default: + ret_val = e1000_copper_link_setup_m88(hw); + break; +diff --git a/src/e1000_phy.c b/src/e1000_phy.c +index 5172691..c9c8660 100644 +--- a/src/e1000_phy.c ++++ b/src/e1000_phy.c +@@ -1367,6 +1367,19 @@ s32 e1000_copper_link_setup_igp(struct e1000_hw *hw) + return ret_val; + } + ++s32 e1000_disable_mii_isolate_bcm54616(struct e1000_hw *hw) ++{ ++ struct e1000_phy_info *phy = &hw->phy; ++ s32 ret_val; ++ u16 phy_data; ++ ++ ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); ++ phy_data &=~(MII_CR_ISOLATE); ++ ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); ++ ++ return 0; ++} ++ + /** + * e1000_phy_setup_autoneg - Configure PHY for auto-negotiation + * @hw: pointer to the HW structure +diff --git a/src/e1000_phy.h b/src/e1000_phy.h +index a109c91..d72ae62 100644 +--- a/src/e1000_phy.h ++++ b/src/e1000_phy.h +@@ -43,6 +43,7 @@ s32 e1000_check_reset_block_generic(struct e1000_hw *hw); + s32 e1000_copper_link_setup_igp(struct e1000_hw *hw); + s32 e1000_copper_link_setup_m88(struct e1000_hw *hw); + s32 e1000_copper_link_setup_m88_gen2(struct e1000_hw *hw); ++s32 e1000_disable_mii_isolate_bcm54616(struct e1000_hw *hw); + s32 e1000_phy_force_speed_duplex_igp(struct e1000_hw *hw); + s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw); + s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw); +-- +2.1.4 +