-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 #303
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Force disable MII isolate mode | ||
|
||
From: wadelnn <[email protected]> | ||
--- | ||
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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ret_val = e1000_disable_mii_isolate_bcm54616(hw); |
||
+ break; | ||
default: | ||
ret_val = e1000_copper_link_setup_m88(hw); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not convinced that this patch does not affect other nic that also use 54616 phy since in previous code, they will call e1000_copper_link_setup_m88. Now, they will only call your function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am searching for open source patch for BCM54616S in IGB. There is not found to call this m88 function. Most of patch just return 0 or break like this. M88 register addresses and behaviors are not match with BCM54616S. Why would we need to call the m88 function? |
||
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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if ret_val != 0, need to return retval There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. thx |
||
+ phy_data &=~(MII_CR_ISOLATE); | ||
+ ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); | ||
+ | ||
+ return 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add description in your patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add detail in my patch. Thx