| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this replaces the existing counters implementation, which just
collected the stats in the softc, but didn't really provide a way
for a person to read them.
em counters get cleared on read. a lot of them are 32bit, so to
avoid overflow the counters are polled and the newly accumulated
values are added to some 64 bit counters in software.
tested by hrvoje popovski and SAITOH Masanobu
ok mpi@
i missed these files when i committed src/sys/dev/pci/if_em.c r1.356.
thanks to jsg for pointing this out.
|
|
|
|
| |
Tested by Hrvoje Popovski and jmatthew@, ok jmatthew@
|
|
|
|
| |
Tested by Hrvoje Popovski, ok jmatthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Abstract the allocation/freeing of TX/RX ring into em_dma_malloc().
This will ease the introduction of multiple rings.
- Split the 82576 variant out of 82575. The distinction is necessary
when it comes to setting multiple queues.
- Change multiple TX/RX related macro to take an index argument
corresponding to a ring. Currently only the index 0 and 1 are used.
- Gather and print more stats counters
- Switch to using a function, like FreeBSD, to translate 82542
registers and get rid of a set of defines.
Tested by many, thanks! ok mlarkin@, jmatthew@
|
| |
|
|
|
|
| |
ok millert@, sf@, deraadt@
|
|
|
|
|
|
|
|
|
|
| |
If the NIC is in some error state (seen on a i219LM when em_read_phy_reg_ex()
returns at "MDI Error"), it can happen that we loop endlessly because the loop
variable is modified again somewhere down in the call stack. Use a separate
variable to make the attach fail with "Hardware Initialization Failed" instead
of hanging.
yes deraadt@
|
|
|
|
|
|
|
|
| |
Add another magic 1ms delay that seems to help with some remaining "Hardware
Initialization Failed" issues on an HP elitebook 820 G3 with i219LM. A printf()
at the same place helps, too.
ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
The em driver calls em_get_software_flag() recursively, which causes the
semaphore to be unlocked too early. Make em_get_software_flag and
em_release_software_flag handle this correctly. Freebsd does not do
this, but they have a mutex that probably allows them to detect
recursive calls to e1000_acquire_swflag_ich8lan(). Reworking the
openbsd driver to not recursively get the semaphore would be very
invasive.
ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
| |
Some em chips have a semaphore ("software flag") to synchronize access
to certain registers between OS and firmware (ME/AMT).
Make the logic to get the flag match the logic in freebsd. This includes
higher timeouts and waiting for a previous unlock to complete before
trying a lock again.
ok mikeb@
|
|
|
|
|
|
|
| |
Port the logic from freebsd to em_check_phy_reset_block(). A single
read does not seem to be reliable.
ok mikeb@ jsg@
|
|
|
|
|
|
| |
This is the value in freebsd for ich8lan.
ok mikeb@ jsg@
|
|
|
|
|
| |
Going by changes in FreeBSD and Linux it is almost identical to pch_spt
but doesn't need one of the workarounds for a pch_spt specific errata.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With i219V, it sometimes happens that em fails to attach with this error:
em0: Hardware Initialization Failed
em0: Unable to initialize the hardware
This happens always if booting native Windows 10 first and then rebooting into
openbsd without switching the laptop off. But it has also been seen in other
cases.
This change ports the e1000_disable_ulp_lpt_lp() logic from the FreeBSD driver
to disable ultra-low-power (ULP) mode. This seems to fix the problem in many
(but not all) cases.
The code has been merged in a way to make the diff from FreeBSD minimal. For
example, the SWFW register is called H2ME on newer chips, so a new define is
introduced. Also, the em_toggle_lanphypc_pch_lpt() function is left as separate
function even if only used in one place at the moment.
ok tom@
"commit it" deraadt@
|
|
|
|
| |
Expanded version of a diff from claudio@ who tested on x270 ok kettenis@
|
| |
|
|
|
|
|
| |
from Christian Ehrhardt; input jsg@; OK deraadt@ sthen@ mpi@ jsg@
tested by sthen@ jca@ benno@ bluhm@
|
| |
|
| |
|
|
|
|
|
|
| |
from the Intel code in FreeBSD.
Tested by Paul Levlin on a machine with I354.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a workaround for a hardware bug were receiving of packets would stop
until the battery of the laptop was removed. The problem could be
triggered if the LAN cable was plugged in after the PHY had already been
initialized.
The workaround is already present in FreeBSD (e1000_ich8lan.c:
e1000_lv_jumbo_workaround_ich8lan()) and Linux. The commit messages of
b20a7744 and da1e2046 in Linux have some more details.
Found and ported from FreeBSD by Valentin Dornauer.
Tested by many.
ok deraadt@
|
| |
|
|
|
|
|
|
|
| |
based devices. This introduces Realtek PHY into em driver
code and is only a temporary solution to the problem.
OK deraadt@
|
|
|
|
|
|
|
| |
Internal Non-Volatile Memory (iNVM). Add support for reading
words out of it instead of an EEPROM.
From Patrick Wildt with some more offsets added.
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
the i218 which is used in many modern laptops like the X240. This
seems to stop the watchdog timeouts triggered by heavy traffic on
such systems.
Tested by myself, phessler, blambert and Donovan Watteau
OK deraadt, brad
|
| |
|
|
|
|
|
| |
DH89XX/Cave Creek PCH which seem to function like a 82580 with some
external Marvell PHYs.
|
| |
|
|
|
|
|
|
| |
tested on Supermicro X10SLL
ok jsg@
|
|
|
|
|
|
|
| |
Currently treated the same as i350, i354 specific EEE settings
and 2.5Gb backplane connections not properly handled yet.
Tested by Andrew Lester on a Supermicro A1SRi-2758F.
|
|
|
|
| |
no binary change
|
|
|
|
|
|
| |
with external i217 and i218 PHYs.
Requires a changed way of detecting the eeprom flash bank from FreeBSD
as suggested by Masanobu SAITOH. Thanks to everyone who tested.
|
|
|
|
|
| |
don't have to. Just remove these include lines.
Compiled on amd64 i386 sparc64; OK henning@ mikeb@
|
|
|
|
|
|
| |
required to make 82580(i340) and i350 based adapters work.
Tested by Rogier Krieger on an i350-F2.
|
|
|
|
| |
ok guenther millert kettenis
|
|
|
|
|
|
|
|
|
|
|
|
| |
- modify em_oem_bits_config_pchlan for pch2
- sync pch2 use of gating/ungating hardware phy config
- add 82579 phy workarounds
- enable Energy Efficient Ethernet on 82579
From Yoshihisa Matsushita based on an earlier diff of mine.
Fixes problems some people were seeing with gigabit autoneg on pch2.
tested by naddy@ & jasper@, ok mikeb@
|
|
|
|
|
|
|
|
|
|
| |
in FreeBSD. Workaround the apparently undocumented errata where the
CRC is always stripped whether asked to or not, and take the FreeBSD
workaround for a known errata when clearing the vlan filter.
Thanks to Jens A. Griepentrog for donating a card.
ok dlg@ mikeb@
|
|
|
|
|
|
| |
code instead of testing only the phy. Fixes autoneg on ich9.
From Jonathan Perkin
|
|
|
|
|
|
|
|
| |
garbage when changing snoop related registers on pch2.
Rework the code to remove the duplication and hopefully make
this sort of thing less likely in future.
Found and debugged by pedro. ok markus@
|
|
|
|
|
|
|
|
|
| |
the Intel I340-T4 and HP NC365T and simplify some of the multi port
handling while here.
Thanks to fredrik danerklint for donating a card, Linden Varley
for setting up a test system and everyone who made sure this
didn't break their existing em setups.
|
|
|
|
|
|
|
|
|
| |
driver.
Fixes 82578DC from only being able to negotiate at 10baseT.
ok jsg@
please commit mikeb@
|
|
|
|
|
|
| |
lost rx packets between the mac and phy.
From Laurence Tratt
|
|
|
|
|
|
| |
From Laurence Tratt.
ok claudio@ deraadt@
|
|
|
|
| |
ok claudio@
|
|
|
|
|
|
| |
up. From FreeBSD.
ok jsg claudio
|