Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1364855 > unrolled thread
| Started by | Daniel Walker <danielwa@cisco.com> |
|---|---|
| First post | 2016-03-25 23:10 +0100 |
| Last post | 2016-03-30 21:50 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber Daniel Walker <danielwa@cisco.com> - 2016-03-25 23:10 +0100
Re: [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber Daniel Walker <danielwa@cisco.com> - 2016-03-30 21:50 +0200
| From | Daniel Walker <danielwa@cisco.com> |
|---|---|
| Date | 2016-03-25 23:10 +0100 |
| Subject | [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber |
| Message-ID | <rgI5A-8hV-13@gated-at.bofh.it> |
From: Steve Shih <sshih@cisco.com> This patch fixes the issues for disabling auto-negotiation and forcing speed and duplex settings for the fiber media. For fiber media, e1000_get_settings should return ETH_TP_MDI_INVALID for eth_tp_mdix_ctrl instead of ETH_TP_MDI_AUTO so subsequent e1000_set_settings call would not fail with -EOPNOTSUPP. e1000_set_spd_dplx should not automatically turn autoneg back on for forced 1000 Mbps full duplex settings. Cc: danielwa@fifo99.com Cc: xe-kernel@external.cisco.com Signed-off-by: Steve Shih <sshih@cisco.com> --- drivers/net/ethernet/intel/e1000e/ethtool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 6cab1f3..cd03dcd 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c @@ -201,6 +201,9 @@ static int e1000_get_settings(struct net_device *netdev, else ecmd->eth_tp_mdix_ctrl = hw->phy.mdix; + if (hw->phy.media_type != e1000_media_type_copper) + ecmd->eth_tp_mdix_ctrl = ETH_TP_MDI_INVALID; + return 0; } @@ -236,8 +239,7 @@ static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u32 spd, u8 dplx) mac->forced_speed_duplex = ADVERTISE_100_FULL; break; case SPEED_1000 + DUPLEX_FULL: - mac->autoneg = 1; - adapter->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; + mac->forced_speed_duplex = ADVERTISE_1000_FULL; break; case SPEED_1000 + DUPLEX_HALF: /* not supported */ default: -- 2.5.0
[toc] | [next] | [standalone]
| From | Daniel Walker <danielwa@cisco.com> |
|---|---|
| Date | 2016-03-30 21:50 +0200 |
| Subject | Re: [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber |
| Message-ID | <riuhQ-1Jv-3@gated-at.bofh.it> |
| In reply to | #1364855 |
So Intel maintainers (Jeff, Jesse, Shannon, Carolyn, Don, Bruce, and John) I'm assuming no comments means this patch is acceptable , and I will resubmit it without the RFC. Is that acceptable ? On 03/25/2016 02:58 PM, Daniel Walker wrote: > From: Steve Shih <sshih@cisco.com> > > This patch fixes the issues for disabling auto-negotiation and forcing > speed and duplex settings for the fiber media. > > For fiber media, e1000_get_settings should return ETH_TP_MDI_INVALID for > eth_tp_mdix_ctrl instead of ETH_TP_MDI_AUTO so subsequent e1000_set_settings > call would not fail with -EOPNOTSUPP. > > e1000_set_spd_dplx should not automatically turn autoneg back on for forced > 1000 Mbps full duplex settings. > > Cc: danielwa@fifo99.com > Cc: xe-kernel@external.cisco.com > Signed-off-by: Steve Shih <sshih@cisco.com> > --- > drivers/net/ethernet/intel/e1000e/ethtool.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c > index 6cab1f3..cd03dcd 100644 > --- a/drivers/net/ethernet/intel/e1000e/ethtool.c > +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c > @@ -201,6 +201,9 @@ static int e1000_get_settings(struct net_device *netdev, > else > ecmd->eth_tp_mdix_ctrl = hw->phy.mdix; > > + if (hw->phy.media_type != e1000_media_type_copper) > + ecmd->eth_tp_mdix_ctrl = ETH_TP_MDI_INVALID; > + > return 0; > } > > @@ -236,8 +239,7 @@ static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u32 spd, u8 dplx) > mac->forced_speed_duplex = ADVERTISE_100_FULL; > break; > case SPEED_1000 + DUPLEX_FULL: > - mac->autoneg = 1; > - adapter->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; > + mac->forced_speed_duplex = ADVERTISE_1000_FULL; > break; > case SPEED_1000 + DUPLEX_HALF: /* not supported */ > default:
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web