Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable BCM54616S MII isolate mode #327

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/igb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Ingrasys S9100 platform set the PHY address to 00h puts the device
into isolate mode during and after reset. So we must write 0 to
bit 10 of the MII Control register to return normal operation.

From: wadelnn <wadelnn@users.noreply.github.com>

---
src/e1000_82575.c | 6 ++++++
src/e1000_phy.c | 15 +++++++++++++++
src/e1000_phy.h | 1 +
3 files changed, 22 insertions(+)

diff --git a/src/e1000_82575.c b/src/e1000_82575.c
index 049ab7b..41d70ab 100644
--- a/src/e1000_82575.c
+++ b/src/e1000_82575.c
@@ -1592,6 +1592,12 @@ 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:
+ ret_val = e1000_copper_link_setup_m88(hw);
+ if (e1000_disable_mii_isolate_bcm54616(hw) != 0) {
+ DEBUGOUT("Disable bcm54616 PHY MII isolate mode failed.\n");
+ }
+ 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..84c5514 100644
--- a/src/e1000_phy.c
+++ b/src/e1000_phy.c
@@ -1367,6 +1367,21 @@ 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);
+ if (ret_val)
+ return ret_val;
+ phy_data &=~(MII_CR_ISOLATE);
+ ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
+
+ return ret_val;
+}
+
/**
* 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