Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370948
| From | Daniel Walker <danielwa@cisco.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Intel-wired-lan] [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber |
| Date | 2016-04-05 01:10 +0200 |
| Message-ID | <rklN8-24A-29@gated-at.bofh.it> (permalink) |
| References | <rgI5A-8hV-13@gated-at.bofh.it> <riuhQ-1Jv-3@gated-at.bofh.it> <rjRcm-4FV-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/03/2016 07:23 AM, Ruinskiy, Dima wrote:
> I have a couple of comments (sorry for not getting to it a bit sooner).
>
>> 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.
> Should this be specific to fiber? Because the code just checks media != copper. There is at least other media type (e1000_media_type_internal_serdes), which will be affected by this change as well. What is the proper behavior in this case?
Steve is shy, so here are his comments,
<Steve>
Regarding the 1st comment. The issue affects all non-copper media. In
fact, we are using e1000_media_type_internal_serdes and are affected due
to the following check in e1000_set_settings:
/* MDI setting is only allowed when autoneg enabled because
* some hardware doesn't allow MDI setting when speed or
* duplex is forced.
*/
if (ecmd->eth_tp_mdix_ctrl) {
if (hw->phy.media_type != e1000_media_type_copper)
return -EOPNOTSUPP;
if ((ecmd->eth_tp_mdix_ctrl != ETH_TP_MDI_AUTO) &&
(ecmd->autoneg != AUTONEG_ENABLE)) {
e_err("forcing MDI/MDI-X state is not supported when link speed and/or
duplex are forced\n");
return -EINVAL;
}
}
</Steve>
>> e1000_set_spd_dplx should not automatically turn autoneg back on for forced
>> 1000 Mbps full duplex settings.
> I seem to remember that this code is there because the copper-based NICs only support 1000Mbps in auto-negotiation mode, not forced (this is according to the IEEE spec, as far as I know). I believe this code is there to ensure that a user can force the speed to 1000 via the API, and still have the link resolve correctly via auto-negotiation. I am concerned that changing this code will break clients that rely on it. Maybe it is best to also limit it to fiber devices only?
>
<Steve>
Regarding the 2nd comment. Yes, will limit to non-copper media.
</Steve>
He supplied me with a second patch which I can send.. Can we remove the
RFC this time ?
Daniel
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RE: [Intel-wired-lan] [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber "Ruinskiy, Dima" <dima.ruinskiy@intel.com> - 2016-04-03 16:30 +0200
Re: [Intel-wired-lan] [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber Daniel Walker <danielwa@cisco.com> - 2016-04-05 01:10 +0200
RE: [Intel-wired-lan] [PATCH-RFC] drivers: net: ethernet: intel: e1000e: fix ethtool autoneg off for fiber "Ruinskiy, Dima" <dima.ruinskiy@intel.com> - 2016-04-05 15:50 +0200
csiph-web