e1000e: introduce new parameter to disable force-link-up on serdes
Subsystems (2)
PATCH 1/1 e1000e: introduce new parameter to disable force-link-up on serdes
From: Hiroki Ohashi <[email protected]>
Hi,
[email protected] wrote (2008/12/12 16:41:55 +0900 ):
Quoted 52 lines
[email protected] wrote (2008/12/04 18:24:21 +0900 ):
Quoted 21 lines
Jeff Kirsher wrote (2008/12/03 17:12:00 +0900 ):
Quoted 18 lines · On Tue, Dec 2, 2008 at 11:36 PM, <[email protected]> wrote:
Quoted 17 lines
From: Hiroki Ohashi <[email protected]>
Hi all,
I faced the following situations.
The LED of NIC was indicated, even when the system was not linked the network (auto-negotiation failed or link partner cannot auto-negotiate).
LED should be indicate only when the network was linked. And so, it is a problem that LED indicates.I think the indicating the LED is a problem for maintenance. I cannot know the condition of the link, because I confirm to link up by LED's indication.
We are using 82571EB ethernet controler and serdes interface.
...
Quoted 15 lines
Quoted 7 lines
I am a little confused. You state you are using an NIC (82571EB) which is currently not supported by e1000, but is supported in the e1000e driver. Then you suggest a change to the e1000 driver to resolve an issue you see with your 82571EB NIC.
So I would suggest you use the e1000e driver first.
Thank you, I will try again using e1000e driver.
Quoted 4 lines
Also the Link LED is supposed to indicated that there is a "physical" link, in which case you can have a physical connection and still fail auto-neg. So I do not necessarily agree with your interpretation of what a link LED is supposed to indicate.
Quoted 5 lines
My explanation was insufficiently.
My system was NOT connected LAN cable to NIC, but the Link LED was indicated.
So the problem is the LED is indicated without connecting the cable.I tried again using kernel 2.6.27.8 (e1000e driver).
The LED of NIC was indicated, even when the system was not connected LAN cable.
When I deleted logic of force-link-up (the following modification.), the LED was turned off.
Quoted 3 lines
I think it is a problem that LED indicates.
If you have any good way to modify, please let me know. (Patches are considering.)
I send the patch to modify.
-------------------------
From: Hiroshi Shimamoto <[email protected]>
Subject: [PATCH] e1000e: introduce new parameter to disable force-link-up on serdes
Introduce new parameter EnableForceLinkOnSERDES to disable force-link-up on SERDES fablic.
The problem that LED indicates in the following cases is avoided.
- LAN cable was not connected.
- AutoNeg failed (LAN cable is connected).
- Link partner could not auto-neg (LAN cable is connected).
--- drivers/net/e1000e/hw.h | 1 + drivers/net/e1000e/lib.c | 4 ++++ drivers/net/e1000e/param.c | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-)
drivers/net/e1000e/hw.h +1 -0
@@ -857,6 +857,7 @@ struct e1000_fc_info {struct e1000_dev_spec_82571 {bool laa_is_present;bool alt_mac_addr_is_present; +bool enable_force_link_up; };struct e1000_shadow_ram {
drivers/net/e1000e/lib.c +4 -0
@@ -539,6 +539,10 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) mac->autoneg_failed =1 ;return 0 ; } +if (!hw->dev_spec.e82571.enable_force_link_up) { +hw_dbg (hw,"Force link up disabled.\n" ); +return -E1000_ERR_PHY ; + }hw_dbg (hw,"NOT RXing /C/, disable AutoNeg and force link.\n" );/* Disable auto-negotiation in the TXCW register */
drivers/net/e1000e/param.c +24 -0
@@ -161,6 +161,15 @@ E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can leaE1000_PARAM (CrcStripping,"Enable CRC Stripping, disable if your BMC needs " \"the CRC" ); +/* +* Enable Force Link Up on SERDES +* +* Valid Range: 0, 1 +* +* Default Value: 1 (enabled) +*/ +E1000_PARAM (EnableForceLinkUpOnSERDES,"Enable force link up SERDES" ); +struct e1000_option {enum { enable_option, range_option, list_option } type;const char *name;
@@ -470,4 +479,19 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) } } } + {/* Enable Force Link Up on SERDES */ +const struct e1000_option opt = { + .type = enable_option, + .name ="Enable Force Link Up on SERDES" , + .err ="defaulting to Enabled" , + .def =OPTION_ENABLED + }; + +if (num_EnableForceLinkUpOnSERDES > bd) { +unsigned int force_link_up = EnableForceLinkUpOnSERDES[bd]; +e1000_validate_option (&force_link_up, &opt, adapter); + hw->dev_spec.e82571.enable_force_link_up = force_link_up; + }else + hw->dev_spec.e82571.enable_force_link_up = opt.def; + } }
Quoted 20 lines
================================================
net/e1000e/lib.c renamed from net/e1000e/lib.c.org +2
-1@@ -539,8 +539,6 @@ s32 e1000e_check_for_serdes_link(struct mac->autoneg_failed =1 ;return 0 ; } +#if 0 hw_dbg (hw,"NOT RXing /C/, disable AutoNeg and force link.\n" );/* Disable auto-negotiation in the TXCW register */ @@ -550,7 +548,7 @@ s32 e1000e_check_for_serdes_link(struct ctrl =er32 (CTRL ); ctrl |= (E1000_CTRL_SLU |E1000_CTRL_FD );ew32 (CTRL , ctrl); +#endif -/* Configure Flow Control after forcing link up. */ ret_val =e1000e_config_fc_after_link_up (hw);if (ret_val) {
Quoted 2 lines
================================================
Hiroki Ohashi
Quoted 17 lines · [email protected] wrote:
Quoted 17 lines
Quoted 10 lines
Quoted 4 lines
Also the Link LED is supposed to indicated that there is a "physical" link, in which case you can have a physical connection and still fail auto-neg. So I do not necessarily agree with your interpretation of what a link LED is supposed to indicate.
My explanation was insufficiently.
My system was NOT connected LAN cable to NIC, but the Link LED was indicated.
So the problem is the LED is indicated without connecting the cable.I tried again using kernel 2.6.27.8 (e1000e driver).
The LED of NIC was indicated, even when the system was not connected LAN cable.
When I deleted logic of force-link-up (the following modification.), the LED was turned off.
Quoted 5 lines
Quoted 3 lines
I think it is a problem that LED indicates.
If you have any good way to modify, please let me know. (Patches are considering.)I send the patch to modify.
I appreciate your work on this issue but I think you're making the wrong solution. We've done some work on a similar issue, does the attached patch fix the issue for you?
inline also, but (probably) whitespace damaged.
Author: Jesse Brandeburg <[email protected]> Date: Mon Jan 19 11:04:11 2009 -0800
e1000e: do not force link on blades
e1000 originally had a workaround to force link up based on some hardware errata on ancient parts. The e1000e driver has carried over this workaround even though it doesn't support the same hardware.
letting rx sequence errors drive link up/down events is harming the
logic of
the state machines that control link state on blade connected e1000e
parts.
remove rx sequence errors from causing link events.
drivers/net/e1000e/netdev.c +0 -0
@@ -1152,7 +1152,7 @@ static irqreturn_t e1000_intr_msi(int irq, void
*data)
* read ICR disables interrupts using IAM
*/
- if (icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
+ if (icr & E1000_ICR_LSC) {
hw->mac.get_link_status = 1;
/*
* ICH8 workaround-- Call gig speed drop workaround on
cable
@@ -1218,7 +1218,7 @@ static irqreturn_t e1000_intr(int irq, void *data)
* IMC write
*/
- if (icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
+ if (icr & E1000_ICR_LSC) {
hw->mac.get_link_status = 1;
/*
* ICH8 workaround-- Call gig speed drop workaround on
cable
commit 9ed41efac25a68e7daa1312c0a9a322d2b6a282d
Author: Jesse Brandeburg <[email protected]> Date: Mon Jan 19 11:04:11 2009 -0800
e1000e: do not force link on blades
e1000 originally had a workaround to force link up based on some hardware errata on ancient parts. The e1000e driver has carried over this workaround even though it doesn't support the same hardware.
letting rx sequence errors drive link up/down events is harming the logic of the state machines that control link state on blade connected e1000e parts.
remove rx sequence errors from causing link events.
drivers/net/e1000e/netdev.c +2 -2
@@ -1152,7 +1152,7 @@ static irqreturn_t e1000_intr_msi(int irq, void *data)* read ICR disables interrupts using IAM */ -if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { +if (icr &E1000_ICR_LSC ) { hw->mac.get_link_status =1 ;/* * ICH8 workaround-- Call gig speed drop workaround on cable
@@ -1218,7 +1218,7 @@ static irqreturn_t e1000_intr(int irq, void *data)* IMC write */ -if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { +if (icr &E1000_ICR_LSC ) { hw->mac.get_link_status =1 ;/* * ICH8 workaround-- Call gig speed drop workaround on cable
Re: [PATCH] e1000e: introduce new parameter to disableforce-link-up on serdes
Brandeburg, Jesse wrote (2009/01/20 04:06:46 +0900 ):
Quoted 74 lines
Quoted 17 lines · [email protected] wrote:
Quoted 17 lines
Quoted 10 lines
Quoted 4 lines
Also the Link LED is supposed to indicated that there is a "physical" link, in which case you can have a physical connection and still fail auto-neg. So I do not necessarily agree with your interpretation of what a link LED is supposed to indicate.
My explanation was insufficiently.
My system was NOT connected LAN cable to NIC, but the Link LED was indicated.
So the problem is the LED is indicated without connecting the cable.I tried again using kernel 2.6.27.8 (e1000e driver).
The LED of NIC was indicated, even when the system was not connected LAN cable.
When I deleted logic of force-link-up (the following modification.), the LED was turned off.Quoted 5 lines
Quoted 3 lines
I think it is a problem that LED indicates.
If you have any good way to modify, please let me know. (Patches are considering.)I send the patch to modify.
I appreciate your work on this issue but I think you're making the wrong solution. We've done some work on a similar issue, does the attached patch fix the issue for you?
inline also, but (probably) whitespace damaged.
Author: Jesse Brandeburg <[email protected]> Date: Mon Jan 19 11:04:11 2009 -0800e1000e: do not force link on blades
e1000 originally had a workaround to force link up based on some hardware errata on ancient parts. The e1000e driver has carried over this workaround even though it doesn't support the same hardware.
letting rx sequence errors drive link up/down events is harming the
logic of
the state machines that control link state on blade connected e1000e
parts.remove rx sequence errors from causing link events.
Signed-off-by Jesse Brandeburg <[email protected]>drivers/net/e1000e/netdev.c +1
-1@@ -1152,7 +1152,7 @@ static irqreturn_t e1000_intr_msi(int irq, void*data) * read ICR disables interrupts using IAM */ -if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { +if (icr &E1000_ICR_LSC ) { hw->mac.get_link_status =1 ;/* * ICH8 workaround-- Call gig speed drop workaround on
cabledrivers/net/e1000e/netdev.c +1
-1@@ -1218,7 +1218,7 @@ static irqreturn_t e1000_intr(int irq, void *data)* IMC write */ -if (icr & (E1000_ICR_RXSEQ |E1000_ICR_LSC )) { +if (icr &E1000_ICR_LSC ) { hw->mac.get_link_status =1 ;/* * ICH8 workaround-- Call gig speed drop workaround on
Quoted 2 lines
cable
Thank you for your reply.
I tried this patch, but the issue was not solved.
The LED of NIC was indicated still, when the system was not linked the network. I think it is affected the e1000e_check_for_serdes_link() that LED indicates.
Hiroki Ohashi
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
Hi, all
I would like to confirm to link up by LED's indication. If you have any good way to modify, please let me know.
Hiroki Ohashi
[email protected] wrote (2009/01/19 19:42:10 +0900 ):
Quoted 178 lines
From: Hiroki Ohashi <[email protected]>
Hi,
[email protected] wrote (2008/12/12 16:41:55 +0900 ):
Quoted 52 lines
[email protected] wrote (2008/12/04 18:24:21 +0900 ):
Quoted 21 lines
Jeff Kirsher wrote (2008/12/03 17:12:00 +0900 ):
Quoted 18 lines · On Tue, Dec 2, 2008 at 11:36 PM, <[email protected]> wrote:
Quoted 17 lines
From: Hiroki Ohashi <[email protected]>
Hi all,
I faced the following situations.
The LED of NIC was indicated, even when the system was not linked the network (auto-negotiation failed or link partner cannot auto-negotiate).
LED should be indicate only when the network was linked. And so, it is a problem that LED indicates.I think the indicating the LED is a problem for maintenance. I cannot know the condition of the link, because I confirm to link up by LED's indication.
We are using 82571EB ethernet controler and serdes interface.
...
Quoted 15 lines
Quoted 7 lines
I am a little confused. You state you are using an NIC (82571EB) which is currently not supported by e1000, but is supported in the e1000e driver. Then you suggest a change to the e1000 driver to resolve an issue you see with your 82571EB NIC.
So I would suggest you use the e1000e driver first.
Thank you, I will try again using e1000e driver.
Quoted 4 lines
Also the Link LED is supposed to indicated that there is a "physical" link, in which case you can have a physical connection and still fail auto-neg. So I do not necessarily agree with your interpretation of what a link LED is supposed to indicate.
Quoted 5 lines
My explanation was insufficiently.
My system was NOT connected LAN cable to NIC, but the Link LED was indicated.
So the problem is the LED is indicated without connecting the cable.I tried again using kernel 2.6.27.8 (e1000e driver).
The LED of NIC was indicated, even when the system was not connected LAN cable.
When I deleted logic of force-link-up (the following modification.), the LED was turned off.Quoted 3 lines
I think it is a problem that LED indicates.
If you have any good way to modify, please let me know. (Patches are considering.)I send the patch to modify.
-------------------------
From: Hiroshi Shimamoto <[email protected]>
Subject: [PATCH] e1000e: introduce new parameter to disable force-link-up on serdesIntroduce new parameter EnableForceLinkOnSERDES to disable force-link-up on SERDES fablic.
The problem that LED indicates in the following cases is avoided.
- LAN cable was not connected.
- AutoNeg failed (LAN cable is connected).
- Link partner could not auto-neg (LAN cable is connected).Signed-off-by Hiroshi Shimamoto <[email protected]>Signed-off-by Hiroki Ohashi <[email protected]>Tested-by Hiroki Ohashi <[email protected]>---
drivers/net/e1000e/hw.h | 1 + drivers/net/e1000e/lib.c | 4 ++++ drivers/net/e1000e/param.c | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-)drivers/net/e1000e/hw.h +1
-0@@ -857,6 +857,7 @@ struct e1000_fc_info {struct e1000_dev_spec_82571 {bool laa_is_present;bool alt_mac_addr_is_present; +bool enable_force_link_up; };struct e1000_shadow_ram {drivers/net/e1000e/lib.c +4
-0@@ -539,6 +539,10 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) mac->autoneg_failed =1 ;return 0 ; } +if (!hw->dev_spec.e82571.enable_force_link_up) { +hw_dbg (hw,"Force link up disabled.\n" ); +return -E1000_ERR_PHY ; + }hw_dbg (hw,"NOT RXing /C/, disable AutoNeg and force link.\n" );/* Disable auto-negotiation in the TXCW register */ drivers/net/e1000e/param.c +24
-0@@ -161,6 +161,15 @@ E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can leaE1000_PARAM (CrcStripping,"Enable CRC Stripping, disable if your BMC needs " \"the CRC" ); +/* +* Enable Force Link Up on SERDES +* +* Valid Range: 0, 1 +* +* Default Value: 1 (enabled) +*/ +E1000_PARAM (EnableForceLinkUpOnSERDES,"Enable force link up SERDES" ); +struct e1000_option {enum { enable_option, range_option, list_option } type;const char *name;@@ -470,4 +479,19 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) } } } + {/* Enable Force Link Up on SERDES */ +const struct e1000_option opt = { + .type = enable_option, + .name ="Enable Force Link Up on SERDES" , + .err ="defaulting to Enabled" , + .def =OPTION_ENABLED + }; + +if (num_EnableForceLinkUpOnSERDES > bd) { +unsigned int force_link_up = EnableForceLinkUpOnSERDES[bd]; +e1000_validate_option (&force_link_up, &opt, adapter); + hw->dev_spec.e82571.enable_force_link_up = force_link_up; + }else + hw->dev_spec.e82571.enable_force_link_up = opt.def; + } }Quoted 20 lines
================================================
net/e1000e/lib.c renamed from net/e1000e/lib.c.org +2
-1@@ -539,8 +539,6 @@ s32 e1000e_check_for_serdes_link(struct mac->autoneg_failed =1 ;return 0 ; } +#if 0 hw_dbg (hw,"NOT RXing /C/, disable AutoNeg and force link.\n" );/* Disable auto-negotiation in the TXCW register */ @@ -550,7 +548,7 @@ s32 e1000e_check_for_serdes_link(struct ctrl =er32 (CTRL ); ctrl |= (E1000_CTRL_SLU |E1000_CTRL_FD );ew32 (CTRL , ctrl); +#endif -/* Configure Flow Control after forcing link up. */ ret_val =e1000e_config_fc_after_link_up (hw);if (ret_val) {Quoted 2 lines
================================================
Hiroki Ohashi
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword