drivers/net/ethernet/intel/igc/igc_base.c | 35 +++- drivers/net/ethernet/intel/igc/igc_defines.h | 9 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 209 +++++++++++++------ drivers/net/ethernet/intel/igc/igc_hw.h | 10 +- drivers/net/ethernet/intel/igc/igc_mac.c | 16 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_phy.c | 65 +++++- drivers/net/ethernet/intel/igc/igc_phy.h | 1 + 8 files changed, 257 insertions(+), 90 deletions(-)
From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> This series adds support for forcing 10/100 Mb/s link speed via ethtool when autonegotiation is disabled on the igc driver. Changes in v4: - Validate that autoneg is AUTONEG_ENABLE or AUTONEG_DISABLE early in igc_ethtool_set_link_ksettings() to avoid passing unexpected values to igc_handle_autoneg_disabled(). (Simon Horman) Changes in v3: - Modify condition from "if (duplex == DUPLEX_HALF)" to "if (duplex != DUPLEX_FULL)". (Simon Horman) Changes in v2: - When forcing half-duplex, set hw->fc.requested_mode = igc_fc_none, since half-duplex cannot support flow control per IEEE 802.3. (Simon Horman) - Split the original single patch into three patches for clarity: patches 1 and 2 are preparatory cleanups; patch 3 carries the functional change. v3 at: https://patchwork.ozlabs.org/project/intel-wired-lan/cover/20260422155701.7420-1-khai.wen.tan@linux.intel.com/ v2 at: https://patchwork.kernel.org/project/netdevbpf/patch/20260416015520.6090-4-khai.wen.tan@linux.intel.com/ v1 at: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260409072747.217836-1-khai.wen.tan@linux.intel.com/ Faizal Rahim (3): igc: remove unused autoneg_failed field igc: move autoneg-enabled settings into igc_handle_autoneg_enabled() igc: add support for forcing link speed without autonegotiation drivers/net/ethernet/intel/igc/igc_base.c | 35 +++- drivers/net/ethernet/intel/igc/igc_defines.h | 9 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 209 +++++++++++++------ drivers/net/ethernet/intel/igc/igc_hw.h | 10 +- drivers/net/ethernet/intel/igc/igc_mac.c | 16 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_phy.c | 65 +++++- drivers/net/ethernet/intel/igc/igc_phy.h | 1 + 8 files changed, 257 insertions(+), 90 deletions(-) -- 2.43.0
On Tue, 28 Apr 2026 14:00:06 +0800 KhaiWenTan <khai.wen.tan@linux.intel.com> wrote: > From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> > > This series adds support for forcing 10/100 Mb/s link speed via ethtool > when autonegotiation is disabled on the igc driver. I'll ask 'why' ? In particular forcing half/full duplex has always been a very good way of 'breaking' a network connection. It really is much better to restrict the advertised link modes and let the autodetect/autonegotiation logic in the phy/mac do its job. About the only think I can think of is to force 10M HDX when connected to a remote system that supports 10M/100M HDX. In that case you need to send out single link test pulses, not the burst used to identify 100M HDX, or the pattern encoded on the burst used by autonegotiation. But you need to got back to the mid 1990s to find such systems. Anything that supports FDX will do autonegotiation. David > > Changes in v4: > - Validate that autoneg is AUTONEG_ENABLE or AUTONEG_DISABLE early > in igc_ethtool_set_link_ksettings() to avoid passing unexpected > values to igc_handle_autoneg_disabled(). (Simon Horman) > > Changes in v3: > - Modify condition from "if (duplex == DUPLEX_HALF)" to > "if (duplex != DUPLEX_FULL)". (Simon Horman) > > Changes in v2: > - When forcing half-duplex, set hw->fc.requested_mode = igc_fc_none, > since half-duplex cannot support flow control per IEEE 802.3. > (Simon Horman) > - Split the original single patch into three patches for clarity: > patches 1 and 2 are preparatory cleanups; patch 3 carries the > functional change. > > v3 at: > https://patchwork.ozlabs.org/project/intel-wired-lan/cover/20260422155701.7420-1-khai.wen.tan@linux.intel.com/ > > v2 at: > https://patchwork.kernel.org/project/netdevbpf/patch/20260416015520.6090-4-khai.wen.tan@linux.intel.com/ > > v1 at: > https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260409072747.217836-1-khai.wen.tan@linux.intel.com/ > > Faizal Rahim (3): > igc: remove unused autoneg_failed field > igc: move autoneg-enabled settings into igc_handle_autoneg_enabled() > igc: add support for forcing link speed without autonegotiation > > drivers/net/ethernet/intel/igc/igc_base.c | 35 +++- > drivers/net/ethernet/intel/igc/igc_defines.h | 9 +- > drivers/net/ethernet/intel/igc/igc_ethtool.c | 209 +++++++++++++------ > drivers/net/ethernet/intel/igc/igc_hw.h | 10 +- > drivers/net/ethernet/intel/igc/igc_mac.c | 16 +- > drivers/net/ethernet/intel/igc/igc_main.c | 2 +- > drivers/net/ethernet/intel/igc/igc_phy.c | 65 +++++- > drivers/net/ethernet/intel/igc/igc_phy.h | 1 + > 8 files changed, 257 insertions(+), 90 deletions(-) > > -- > 2.43.0 > >
On 30/4/2026 10:41 pm, David Laight wrote: > On Tue, 28 Apr 2026 14:00:06 +0800 > KhaiWenTan <khai.wen.tan@linux.intel.com> wrote: > >> From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> >> >> This series adds support for forcing 10/100 Mb/s link speed via ethtool >> when autonegotiation is disabled on the igc driver. > > I'll ask 'why' ? > > In particular forcing half/full duplex has always been a very good way > of 'breaking' a network connection. > > It really is much better to restrict the advertised link modes and let > the autodetect/autonegotiation logic in the phy/mac do its job. > > About the only think I can think of is to force 10M HDX when connected > to a remote system that supports 10M/100M HDX. > In that case you need to send out single link test pulses, not the > burst used to identify 100M HDX, or the pattern encoded on the burst > used by autonegotiation. > But you need to got back to the mid 1990s to find such systems. > Anything that supports FDX will do autonegotiation. > > David > There's a use case requested: Profinet Certification tool reports that forcing a link speed without auto-negotiation is not working. Forcing the link speed is a critical feature for the industrial automation "fast-start" use case. When there is a connection lost, the system must come back up as fast as possible. In PROFINET, that means to force the speed and rejoin the controller loops. Without supporting forcing the speed to 100M in Foxville, the certification tool would not be able to certify the availability of this feature. I'm hoping this context is enough to justify the need?
On Wed, 6 May 2026 14:21:59 +0800 "Abdul Rahim, Faizal" <faizal.abdul.rahim@linux.intel.com> wrote: > On 30/4/2026 10:41 pm, David Laight wrote: > > On Tue, 28 Apr 2026 14:00:06 +0800 > > KhaiWenTan <khai.wen.tan@linux.intel.com> wrote: > > > >> From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> > >> > >> This series adds support for forcing 10/100 Mb/s link speed via ethtool > >> when autonegotiation is disabled on the igc driver. > > > > I'll ask 'why' ? > > > > In particular forcing half/full duplex has always been a very good way > > of 'breaking' a network connection. > > > > It really is much better to restrict the advertised link modes and let > > the autodetect/autonegotiation logic in the phy/mac do its job. > > > > About the only think I can think of is to force 10M HDX when connected > > to a remote system that supports 10M/100M HDX. > > In that case you need to send out single link test pulses, not the > > burst used to identify 100M HDX, or the pattern encoded on the burst > > used by autonegotiation. > > But you need to got back to the mid 1990s to find such systems. > > Anything that supports FDX will do autonegotiation. > > > > David > > > > There's a use case requested: > > Profinet Certification tool reports that forcing a link speed without > auto-negotiation is not working. > Forcing the link speed is a critical feature for the industrial automation > "fast-start" use case. When there is a connection lost, the system must > come back up as fast as possible. In PROFINET, that means to force the > speed and rejoin the controller loops. Without supporting forcing the speed > to 100M in Foxville, the certification tool would not be able to certify > the availability of this feature. > > I'm hoping this context is enough to justify the need? Is auto-negotiation of the 'low' speed actually that slow? IIRC detecting 10G and above requires a lot of signal processing. But 10/100 and hdx/fdx just uses the ANAR register value sent in the link test pulses. (IIRC 1G uses the ANAR pattern, but requires extra signal processing as well. The higher speeds didn't exist when I was writing ethernet drivers.) I've been on the 'wrong end' of hdx/fdx mismatches - you really don't want to let people get there, it is terribly confusing. There actually ought to be a way of setting the auto-negotiation registers to 100M (HDX and/or FDX) and then transmitting as (say) 100M HDX even before negotiation completes. Then correcting hdx/fdx based on the received ANAR register. Or, at least, sending out an ANAR that only contains what you are using. The problem I always had was that the actual operating mode of the phy wasn't in one of the standard registers. So if you connected to a system that didn't do auto-negotiation the phy would be using (say) 10M HDX, but the received ANAR register would still contain a value from an earlier connection. If the driver read that register from the phy it used the wrong duplex mode. (The speed for 10/100 doesn't matter, the phy clocks the interface to the mac at the right speed and the mac doesn't care.) David
+ Hector On 6/5/2026 5:40 pm, David Laight wrote: > On Wed, 6 May 2026 14:21:59 +0800 > "Abdul Rahim, Faizal" <faizal.abdul.rahim@linux.intel.com> wrote: > >> On 30/4/2026 10:41 pm, David Laight wrote: >>> On Tue, 28 Apr 2026 14:00:06 +0800 >>> KhaiWenTan <khai.wen.tan@linux.intel.com> wrote: >>> >>>> From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> >>>> >>>> This series adds support for forcing 10/100 Mb/s link speed via ethtool >>>> when autonegotiation is disabled on the igc driver. >>> >>> I'll ask 'why' ? >>> >>> In particular forcing half/full duplex has always been a very good way >>> of 'breaking' a network connection. >>> >>> It really is much better to restrict the advertised link modes and let >>> the autodetect/autonegotiation logic in the phy/mac do its job. >>> >>> About the only think I can think of is to force 10M HDX when connected >>> to a remote system that supports 10M/100M HDX. >>> In that case you need to send out single link test pulses, not the >>> burst used to identify 100M HDX, or the pattern encoded on the burst >>> used by autonegotiation. >>> But you need to got back to the mid 1990s to find such systems. >>> Anything that supports FDX will do autonegotiation. >>> >>> David >>> >> >> There's a use case requested: >> >> Profinet Certification tool reports that forcing a link speed without >> auto-negotiation is not working. >> Forcing the link speed is a critical feature for the industrial automation >> "fast-start" use case. When there is a connection lost, the system must >> come back up as fast as possible. In PROFINET, that means to force the >> speed and rejoin the controller loops. Without supporting forcing the speed >> to 100M in Foxville, the certification tool would not be able to certify >> the availability of this feature. >> >> I'm hoping this context is enough to justify the need? > > Is auto-negotiation of the 'low' speed actually that slow? > IIRC detecting 10G and above requires a lot of signal processing. > But 10/100 and hdx/fdx just uses the ANAR register value sent in the > link test pulses. > (IIRC 1G uses the ANAR pattern, but requires extra signal processing as well. > The higher speeds didn't exist when I was writing ethernet drivers.) > > I've been on the 'wrong end' of hdx/fdx mismatches - you really don't > want to let people get there, it is terribly confusing. > Thanks for the information. I agree that for normal Ethernet use, auto-negotiation on both link partners is safer and avoids the issues you mentioned. The reason for this patch is the more specific PROFINET Fast Start Up (FSU) use case. For FSU, the requirement is different from normal Ethernet use. It is intended for deterministic startup, for example in industrial robot/tool-change applications. One of the startup optimizations is to use "fixed transmission parameters" instead of automatic detection in the profinet specification: https://us.profinet.com/profinet_tech/fast-start-up/ I understand your point that 10/100 auto-negotiation is faster than higher-speed link training. I don't have a detailed timing breakdown for the FSU case comparing 10/100 startup with auto-negotiation enabled versus disabled, or enough visibility into the certification criteria to comment on additional determinism requirements. But keeping AutoNeg enabled, even with only specific speed advertised, would not cover the same requirement. This is only meant as an explicit link configuration for controlled industrial deployments where both link partners are configured consistently. It's not intended as a recommended default for general networking. Also, ethtool already allows users to request speed/duplex configuration with auto-negotiation disabled, and some drivers already support this, for example igb. This patch just reuses that existing interface and enables igc to support the forced modes supported by this hardware. > There actually ought to be a way of setting the auto-negotiation > registers to 100M (HDX and/or FDX) and then transmitting as (say) 100M HDX > even before negotiation completes. > Then correcting hdx/fdx based on the received ANAR register. > Or, at least, sending out an ANAR that only contains what you are using. > > The problem I always had was that the actual operating mode of the phy > wasn't in one of the standard registers. > So if you connected to a system that didn't do auto-negotiation the > phy would be using (say) 10M HDX, but the received ANAR register would > still contain a value from an earlier connection. > If the driver read that register from the phy it used the wrong duplex mode. > (The speed for 10/100 doesn't matter, the phy clocks the interface to the > mac at the right speed and the mac doesn't care.) > > David > > > > >
> I agree that for normal Ethernet use, auto-negotiation on both link > partners is safer and avoids the issues you mentioned. > > The reason for this patch is the more specific PROFINET Fast Start Up > (FSU) use case. For FSU, the requirement is different from normal Ethernet > use. It is intended for deterministic startup, for example in industrial > robot/tool-change applications. > > One of the startup optimizations is to use "fixed transmission parameters" > instead of automatic detection in the profinet specification: > https://us.profinet.com/profinet_tech/fast-start-up/ Automotive also have similar requirements. For them, Autoneg is slow, takes around 1 second, where as a fixed link is operative very fast. There are even some automotive ethernet devices which don't even support autoneg. So this use case makes sense to me, for embedded systems. If the hardware can do it, any most PHYs can, i see no reason not to support it. And anything using phylib gets it for free. Andrew
© 2016 - 2026 Red Hat, Inc.