freebsd-dev/sys/dev
J.R. Oldroyd 9ab4dfce8f e1000: Try auto-negotiation for fixed 100 or 10 configuration
Currently if an e1000 interface is set to a fixed media configuration,
for gigabit, it will participate in auto-negotiation as required by
IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration
for 100 or 10, it does NOT participate in auto-negotiation.

By my reading of Clauses 28 and 37, while auto-negotiation is optional
for 100 and 10, it is not prohibited and is, in fact, "highly
recommended".

This patch enables auto-negotiation for fixed 100 and 10 media
configuration, in a similar manner to that already performed for 1000.
I.e., the patch enables advertising of just the manually configured
settings with the goal of allowing the remote end to match the manually
configured settings if it has them available.

To be clear, this patch does NOT allow an em(4) interface that has been
manually configured with specific media settings to respond to
auto-negotiation by then configuring different parameters to those that
were manually configured. The intent of this patch is to fully comply
with the requirements of Clause 37, but for 100 and 10.

The need for this has arisen on an em(4) link where the other end is
under a different administrative control and is set to full
auto-negotiation. Due to the cable length GigE is not working well. It
is desired to set the em(4) end to "media 100baseTX mediatype
full-duplex" which does work when both ends are configured that way.
Currently, because em(4) does not participate in autoneg for this
setting, the remote defaults to half-duplex - i.e., there's a duplex
mismatch and things don't work. With this patch, em(4) would inform the
remote that it has only 100baseTX full, the remote would match that and
it will work.

Approved by:	erj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34449
2022-04-13 09:17:32 -07:00
..
aac aac: Move sge64 declaration into the #ifdef __amd64__ block. 2022-04-08 17:25:13 -07:00
aacraid
acpi_support acpi_support: Remove CTLFLAG_NEEDGIANT from sysctls. 2021-12-26 19:37:08 -05:00
acpica xen/acpi: upload Cx and Px data to Xen 2022-04-12 10:03:26 +02:00
adb
adlink
ae
age
agp agp_nvidia: Replace a dummy variable to force a read with a void cast. 2022-04-08 17:30:14 -07:00
ahci ahci/siis/mvs: Fix panics after 3394d4239b. 2022-03-04 20:55:23 -05:00
aic7xxx Fix "set but not used" in aic7xxx/aic79xx. The variables were dead 2022-02-26 10:33:31 -07:00
al_eth al_eth: Remove a double word in a source code comment 2022-04-09 11:06:18 +02:00
alc alc: plug set-but-not-unused vars 2021-12-10 11:48:42 +00:00
ale
alpm
altera
amd_ecc_inject amd_ecc_inject: return an error instead of ignoring it in tsc_modevent 2021-11-24 16:25:50 +00:00
amdgpio
amdpm
amdsbwd amdsbwd: always enable watchdog register decoding 2021-12-13 13:36:50 +02:00
amdsmb
amdsmn
amdtemp amdtemp: Remove CTLFLAG_NEEDGIANT from sysctls. 2021-12-25 21:03:54 -05:00
arcmsr sys/dev/arcmsr: Update Areca RAID driver to fix some issues on ARC-1886. 2021-12-13 08:09:15 -08:00
asmc asmc: plug set-but-not-unused vars 2021-12-10 11:45:36 +00:00
ata ata-promise: kill lenght, it's set but never used 2021-12-14 16:53:09 -07:00
ath ath(4): Remove a double word in a few source code comments 2022-04-09 10:55:00 +02:00
atkbdc psm: Remove write-only variables. 2022-04-06 16:45:28 -07:00
axgbe if_axgbe: properly release resource in error case 2022-04-11 09:52:32 -04:00
backlight
bce bce: Mark a few debugging variables as unused. 2022-04-05 13:52:54 -06:00
beri vfs: NDFREE(&nd, NDF_ONLY_PNBUF) -> NDFREE_PNBUF(&nd) 2022-03-24 10:20:51 +00:00
bfe bfe(4): Fix a typo in a comment 2022-03-28 19:36:18 +02:00
bge Fix "set but not used" for bge 2021-12-03 23:29:51 -07:00
bhnd bhnd(4): Remove a double word in a source code comment 2022-04-09 14:31:19 +02:00
bnxt bnxt: Remove dead write to cp_ring_id 2022-02-28 10:14:34 -07:00
bwi bwi: Mark write-only variable as __unused 2022-04-05 13:52:55 -06:00
bwn bwn_lo_measure_gain_values: eliminate write only trsw_rx variable 2022-04-04 22:29:23 -06:00
bxe bxe: Quiet set but not used warnings. 2022-04-06 16:45:28 -07:00
cadence cgem: support SGMII PHY connection mode 2022-04-12 19:51:17 -03:00
cardbus Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
cas cas: Mark work3 as unused: we apparently need to read it from hardware, but ignore its value 2022-04-05 21:42:05 -06:00
ce Remove checks for __CC_SUPPORTS__INLINE assuming it is always true. 2022-04-12 10:06:09 -07:00
cesa cesa: Remove unused variable. 2022-04-08 18:31:29 -07:00
cfe
cfi
chromebook_platform
ciss Fix "set but not used" for real in the ciss driver. 2022-02-26 11:07:05 -07:00
coretemp Make CPU children explicitly share parent unit numbers. 2021-09-24 23:31:51 -04:00
cp Remove checks for __CC_SUPPORTS__INLINE assuming it is always true. 2022-04-12 10:06:09 -07:00
cpuctl
cpufreq cpufreq: dt: Plug set but not used variable 2022-02-21 11:08:23 +01:00
cxgb cxgb(4): Fix "set but not used [-Wunused-but-set-variable]" warnings. 2022-01-10 12:15:12 -08:00
cxgbe cxgbe/cxgbei: Allow max PDU payload lengths to be changed with a sysctl. 2022-04-12 21:35:29 -07:00
cyapa cyapa_raw_input: elimmminate write only k variable 2022-04-04 22:29:25 -06:00
dc
dcons
dme
dpaa
dpms
drm2 drm2: Fix a typo in a source code comment 2022-04-09 09:28:14 +02:00
dwc dwc: Support phy mode MII 2022-02-22 10:01:56 +01:00
dwwdt dwwdt: make it actually useful 2022-01-11 15:56:07 +02:00
e1000 e1000: Try auto-negotiation for fixed 100 or 10 configuration 2022-04-13 09:17:32 -07:00
efidev efirt: Mark buffers filled out by EFI firmware as initialized 2021-09-07 11:19:29 -04:00
ena ena(4): Remove a double word in a source code comment 2022-04-09 10:50:49 +02:00
enetc enetc(4): Fix a typo in a source code comment 2022-04-02 14:02:46 +02:00
et et: plug set-but-not-used vars 2021-12-09 16:37:26 +00:00
etherswitch arswitch: Remove unused variable. 2022-04-12 14:58:59 -07:00
evdev evdev: Fix a typo in a commit 2021-10-02 10:43:41 +02:00
exca exca(4): Fix a typo in a source code comment 2022-03-28 19:30:10 +02:00
extres clk: rename clknode_try_freq to clknode_test_freq 2021-12-26 06:16:02 -08:00
fb splash_pcx: Remove unused variables. 2022-04-07 17:01:29 -07:00
fdc fd_probe: only define unit on x86, other platforms don't use this code 2022-04-04 22:29:28 -06:00
fdt Extend device_get_property API 2022-03-10 12:11:32 +01:00
ffec
filemon filemon: Reject FILEMON_SET_FD commands when the fd is a kqueue 2022-02-03 09:41:53 -05:00
firewire firewire(4): Fix "set but not used" warnings 2021-12-20 11:24:21 +00:00
flash flexspi: In flex_spi_task remove dev, it's write only 2022-04-05 21:42:05 -06:00
ftwd
fxp fxp: Mark sysctls with CTLFLAG_MPSAFE. 2021-12-09 21:16:16 -05:00
gem
glxiic
glxsb
goldfish
gpio gpio pl061: Remove unused variables. 2022-04-08 17:25:14 -07:00
gxemul
hdmi
hid hpen_battery_strenght_cb: eliminate write only data variable 2022-04-04 22:29:31 -06:00
hifn
hpt27xx hpt27xx: Remove FreeBSD 9.x support including Giant. 2021-12-09 20:24:29 -05:00
hptiop hptiop: Remove Giant locking around ioctls. 2021-12-09 20:35:21 -05:00
hptmv Fix "set but not used" for hptmv 2021-12-04 11:07:04 -07:00
hptnr
hptrr
hwpmc ppc hwpmc: Remove unused variables. 2022-04-12 14:58:58 -07:00
hyperv hyperv storvsc: Remove unused variables. 2022-04-06 16:45:28 -07:00
iavf iavf: Quite set but not used warnings. 2022-04-06 16:45:28 -07:00
ic esp: Remove 2021-11-25 00:45:12 -07:00
ice ice: Remove a double word in a source code comment 2022-04-09 09:25:47 +02:00
ichiic ig4(4): Add PNP info for ACPI attachment 2022-03-03 02:35:23 +03:00
ichsmb Remove check for __CC_SUPPORTS___FUNC__. 2022-04-12 10:06:04 -07:00
ichwd ichwd: add Lewisburg Super SKUs, Cannon and Comet Lake support 2021-08-26 12:04:28 +02:00
ida ida: plug set-but-not-used vars 2021-12-16 13:23:30 +00:00
igc Default to always accepting the PHY that's present. Linux did 2022-02-26 18:29:08 -07:00
iicbus adt746x: Remove unused variables. 2022-04-12 14:58:58 -07:00
imcsmb
intel
intpm intpm: Remove write only variables, tag slvcnt unused since it's used for debugging 2022-04-05 21:42:05 -06:00
io
ioat ioat: plug set-but-not-unused vars 2021-12-09 20:21:16 +00:00
iommu iommu_gas: Rename a function missed earlier 2021-12-31 01:50:30 -06:00
ipmi ipmi: Remove write only variables used to read form hardware 2022-04-05 21:42:05 -06:00
ips Fix "set but not used" in the ips driver. Dead code. 2022-02-26 10:35:51 -07:00
ipw
isci iscsi(4): Remove a double word in a source code comment 2022-04-09 11:01:43 +02:00
iscsi isci(4): Remove a double word in an error message 2022-04-03 16:07:20 +02:00
iser iscsi: Handle unmapped I/O requests. 2022-03-10 15:49:53 -08:00
isl
ismt
isp isp: Remove unused variable. 2022-04-12 14:58:59 -07:00
ispfw
itwd
iwi iwi: Remove write-only status variable. 2022-04-06 16:45:27 -07:00
iwm iwm(4): Remove a double word in a source code comment 2022-04-09 11:04:23 +02:00
iwn iwn: Remove write-only extra variable. 2022-04-06 16:45:27 -07:00
ixgbe ixgbe: Update mc filter before FCTRL flags 2022-04-13 08:59:21 -07:00
ixl i40e_validate_filter_settings: Remove unused variables. 2022-04-12 14:51:44 -07:00
jedec_dimm
jme jme(4): Fix a typo in a source code comment 2022-04-02 10:54:43 +02:00
kbd kbd: replace vestigial spl calls with Giant assertions 2022-03-24 12:56:29 -04:00
kbdmux kbdmux(4): Make callout handler mpsafe. 2021-08-08 18:29:48 -04:00
ksyms
kvm_clock kvmclock: Expose implied TSC frequency via sysctl 2021-11-16 10:27:27 -08:00
le
led
lge
liquidio lio: Quiet set but unused warnings. 2022-04-06 16:45:29 -07:00
malo malo: Remove write only variables, but leave hardware reads in place 2022-04-05 21:42:05 -06:00
mana mana: Add handling of CQE_RX_TRUNCATED 2022-02-15 07:27:42 +00:00
mbox
md vfs: NDFREE(&nd, NDF_ONLY_PNBUF) -> NDFREE_PNBUF(&nd) 2022-03-24 10:20:51 +00:00
mdio
mem Add new vnode dumper to support live minidumps 2022-04-05 15:35:05 -03:00
mfi hardware: added Dell H840 raid support 2022-03-24 07:13:45 +01:00
mgb mgb: remove set but not used variables 2021-11-23 20:56:53 -05:00
mge mge: eliminate write only variables ifp, sc and error 2022-04-04 22:29:41 -06:00
mii mii_fdt: fix a set-but-not-used warning 2022-04-03 12:28:37 -03:00
mlx Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
mlx4 mlx4: Remove unused variables. 2022-04-08 17:25:13 -07:00
mlx5 mlx5 RATELIMIT: Remove an unused variable. 2022-04-12 14:59:00 -07:00
mlxfw
mmc Extend device_get_property API 2022-03-10 12:11:32 +01:00
mmcnull
mpr mpr: add \n in diagnostic printf 2022-03-30 20:14:07 -04:00
mps mpr/mps/mpt: verify cfg page ioctl lengths 2022-03-28 20:35:47 -04:00
mpt mpt(4): Fix a typo in a source code comment 2022-04-09 14:10:05 +02:00
mrsas mrsas: if controller reset is in progress, refrain from firing DCMDs to 2022-04-05 08:38:15 -06:00
msk msk: Remove write only variables, but leave hardware reads in place 2022-04-05 21:42:06 -06:00
mthca mthca: Mark a variable used only in debug traces as unused. 2022-04-07 17:01:26 -07:00
mvs ahci/siis/mvs: Fix panics after 3394d4239b. 2022-03-04 20:55:23 -05:00
mwl mwl: Remove write only variables, but leave hardware reads in place 2022-04-05 21:42:06 -06:00
mxge mxgbe: Remove a dummy variable used to force a register read. 2022-04-07 17:01:26 -07:00
my
nctgpio
neta neta: Fix a typo in a source code comment 2022-04-09 09:25:07 +02:00
netmap netmap: Move more_txspace and some_recvd under #ifdef SYNC_KLOOP_POLL. 2022-04-08 17:30:14 -07:00
nfe nfe: plug set-but-not-unused vars 2021-12-10 11:53:38 +00:00
nfsmb
nge Fix a common typo in man pages and src comments 2021-08-28 19:24:27 +02:00
nmdm
ntb ntb_hw_intel: fix xeon NTB gen3 bar disable logic 2021-09-27 12:13:03 -07:00
null
nvd nvd: For AHCI attached devices, report ahci bridge 2021-12-06 10:23:40 -07:00
nvdimm nvdimm: Remove unused variable. 2022-04-07 17:01:27 -07:00
nvme nvme(4): Fix a typo in a source code comment 2022-04-09 09:24:34 +02:00
nvram
nvram2env
oce oce: Remove unused variables. 2022-04-07 17:01:27 -07:00
ocs_fc ocs: Remove unused variable. 2022-04-07 17:01:27 -07:00
ofw Add serial-number to hw.fdt sysctl area if found in fdt. 2022-03-03 07:08:32 -06:00
otus otus: Return computed error value instead of ENXIO from otus_raw_xmit. 2022-04-07 17:01:27 -07:00
ow
p2sb Add support for Lewisburg GPIO through P2SB 2021-08-26 11:00:39 +02:00
pbio
pccard pccard: Remove more of the PC Card infrastructure 2021-12-14 15:27:47 -07:00
pccbb pccbb: Remove Giant mention in comments. 2021-12-25 21:51:48 -05:00
pcf
pci pci_host_generic_acpi: Remove unused variable. 2022-04-08 17:25:15 -07:00
pms Fix some common typos in source code comments 2021-08-14 08:55:58 +02:00
powermac_nvram powermac_nvram: Actually return EBUSY on error from open. 2022-04-12 14:58:58 -07:00
ppbus ppi_probe: eliminate unused variable ppi 2022-04-04 22:29:53 -06:00
ppc ppc: Fix set but not used warnings on !i386. 2022-04-06 16:45:27 -07:00
proto
psci psci: finish psci_present implementation 2022-03-18 22:04:32 -05:00
pst
pty
puc
pwm
qat qat: Address -Wunused-but-set-variable warnings 2021-12-17 13:10:22 -05:00
qcom_clk qcom_clk: add the qualcomm clock nodes for the IPQ4018 2021-12-27 13:02:30 -08:00
qcom_dwc3 qcom_dwc3: add initial Qualcomm SoC DWC3 controller glue 2021-12-27 18:25:32 -08:00
qcom_gcc Add support for qualcomm clock nodes the the IPQ4018/IPQ4019 clock tree. 2021-12-27 13:02:31 -08:00
qcom_mdio qcom_mdio: add initial IPQ4018 MDIO support 2022-02-03 21:26:14 -08:00
qcom_qup qcom_qup: add initial v1/v2 QUP SPI driver 2021-12-27 15:27:29 -08:00
qcom_rnd qcom_rnd: add initial qualcomm prng driver. 2021-11-04 09:02:27 -07:00
qcom_tcsr qcom_tcsr: add initial top control and status register (TCSR) support 2021-12-27 15:56:28 -08:00
qcom_tlmm qcom_tlmm: add initial gpio/pinmux controller (TLMM) 2021-12-23 10:41:41 -08:00
qlnx qlnxe(4): Fix a typo in a source code comment 2022-04-09 09:29:35 +02:00
qlxgb qlxgb: Remove unused variables. 2022-04-07 17:01:28 -07:00
qlxgbe qlxgbe: Remove unused variables. 2022-04-07 17:01:28 -07:00
qlxge qlxge: Remove unused variables. 2022-04-07 17:01:28 -07:00
quicc
ral ral: plug set-but-not-used vars 2021-12-14 14:24:21 +00:00
random Remove checks for __GNUCLIKE_ASM assuming it is always true. 2022-04-12 10:05:45 -07:00
rccgpio
re re: Avoid subobject overread when setting IDRn 2021-12-23 20:19:31 +00:00
rl
rndtest
rt rt(4): Replace Giant callout+task with timeout_task. 2021-09-03 18:10:06 -04:00
rtsx rtsx: Remove update of softc during probe and some var rename. 2022-03-25 15:24:49 -04:00
rtwn rtwn: Restore RF_ENV control type after initializing RF. 2022-04-07 17:01:28 -07:00
safe safe(4): Fix a typo in a source code comment 2022-04-02 14:03:17 +02:00
safexcel safexcel: plug set-but-not-used vars 2021-12-18 13:29:32 +00:00
sbni sbni: Use memset to clear flags structure in attach. 2022-04-08 17:25:14 -07:00
scc
sdhci Extend device_get_property API 2022-03-10 12:11:32 +01:00
sdio Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
sec
sfxge sfxge(4): Remove a double word in a few source code comments 2022-04-09 10:57:31 +02:00
sge
siis ahci/siis/mvs: Fix panics after 3394d4239b. 2022-03-04 20:55:23 -05:00
sis sis_attach: Move waittime definition into for loop 2022-04-04 22:29:57 -06:00
sk sk: plug set-but-not-used vars 2021-12-14 14:08:17 +00:00
smartpqi smartpqi(4): Fix a typo in a source code comment 2022-04-02 15:21:45 +02:00
smbios
smbus
smc smc: Rename constants for control register from CTR* to CTRL*. 2022-04-12 17:11:28 -07:00
snp
sound sound aoa: Mark variable only used in debug trace as unused. 2022-04-12 14:58:58 -07:00
speaker
spibus
ste
stge stge: fix null pointer dereference 2022-03-31 15:54:56 -04:00
sume
superio
sym sym(4): Fix a typo in a source code comment 2022-04-09 09:23:57 +02:00
syscons sc: Move prev_ysize under #ifndef SC_NO_HISTORY 2022-04-13 12:35:55 +03:00
tcp_log
tdfx tdfx: Mark a variable only used under a custom debug macro as unused. 2022-04-08 17:25:13 -07:00
ti Fix "set but not used" for the ti driver 2021-12-03 15:31:14 -07:00
tpm tpm: Remove unused variables. 2022-04-07 17:01:29 -07:00
tsec tsec: Fix a typo in a source code comment 2022-04-02 10:48:37 +02:00
twe The TWE driver should have been marked with gone_in for FreeBSD 13.x, 2022-02-26 11:40:17 -07:00
tws tws: fix "set but not used" in the tws driver 2022-01-09 14:28:08 -09:00
uart uart_dev_lowrisc: Remove unused variables in stub functions. 2022-04-12 14:58:57 -07:00
usb usb(4): Remove a double word in a source code comment 2022-04-09 11:02:23 +02:00
veriexec vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
vge
viapm
viawd viawd(4): Fix a typo in a kernel message 2022-04-02 10:21:37 +02:00
videomode modules: increase MAXMODNAME and provide backward compat 2021-12-09 18:09:53 +00:00
virtio vtpci_legacy_register_msix: eliminate write only variable dev 2022-04-04 22:30:42 -06:00
vkbd
vmd Missed line from 7af4475a6e. 2021-09-02 22:25:16 -04:00
vmgenc
vmware vmci: Remove unused variables. 2022-04-07 17:01:29 -07:00
vnic vnic: Fix a typo in a comment 2021-10-02 10:47:21 +02:00
vr Fix a common typo in man pages and src comments 2021-08-28 19:24:27 +02:00
vt vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized 2022-03-17 14:30:39 +01:00
vte
watchdog
wbwd wbwd: Move set but not used variable test under notyet 2022-01-07 09:23:00 -07:00
wpi wpi: Fix a lock leak in an error path in wpi_run() 2021-09-10 10:03:51 -04:00
wtap
xdma xdma: Fix another -Wunused-but-set-variable warning previously missed 2021-12-10 05:06:54 +00:00
xen xen/acpi: upload Cx and Px data to Xen 2022-04-12 10:03:26 +02:00
xilinx if_xae: Remove unused variables. 2022-04-12 14:58:57 -07:00
xl xl_attach: eliminate write only variable unit 2022-04-04 22:30:45 -06:00
xz
zlib