Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/rtl81x9var.h
RevisionDateAuthorComments
 1.59  12-Aug-2024  christos PR/58588: Christos Zoulas: Avoid crashes when exiting promiscuous mode (^C
tcpdump) by disabling RX in re_stop. Also add some earlyoff stuff while here.
From FreeBSD.
 1.58  21-Sep-2020  msaitoh branches: 1.58.26;
- Print chip revision. From OpenBSD.
- Rename RTK_HWREV_8168_SPIN[123] to RTK_HWREV_8168'B'_SPIN[123].
Same as other *BSDs.
- Rename RTK_HWREV_8168G_SPIN4 to RTK_HWREV_8411B. Same as other *BSDs.
- Add definition of RTK_HWREV_8169_8110SCE.
 1.57  22-Sep-2019  ryo 8168H model didn't link up well. some models seems to require to enable TX/RX after configuration.
RTKQ_TXRXEN_LATER quirk flag added. it may be able to unify with RTKQ_RXDV_GATED flag?
 1.56  19-Apr-2017  jmcneill branches: 1.56.12; 1.56.18;
Performance improvements for PCIe and 8168 based devices:
- When using the countdown timer for interrupt moderation on PCIe devices,
use a timer rate value based on a 125MHz PCIe reference clock instead of
33 MHz.
- For 8168 based devices, ditch the countdown timer and instead use the
(undocumented) hardware interrupt moderation feature.
- Support TSOv4 on 8168D and later devices.
 1.55  13-Apr-2015  riastradh branches: 1.55.2; 1.55.4;
Convert sys/dev to use <sys/rndsource.h>.
 1.54  10-Oct-2014  christos branches: 1.54.2;
PR/49259: J. Lorec: Add support for Realtek 8111G chipset into re(4)
 1.53  02-Feb-2012  tls branches: 1.53.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.52  22-Nov-2011  garbled branches: 1.52.2;
Add support to recognize the 8168E model of this chip. Taken from FreeBSD
 1.51  19-Nov-2011  tls First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.50  27-Jul-2010  jakllsch branches: 1.50.8;
Make the Realtek PCI network interfaces detachable.
Use __arraycount to avoid null table entries.
Miscellaneous other touch-ups in bus front-ends.
 1.49  05-Sep-2009  tsutsui branches: 1.49.2; 1.49.4;
Remove unnecessary whitespace.
 1.48  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.47  29-Apr-2009  tsutsui Pull some changes for newer chips from FreeBSD:
- pull MACSTAT and CMDSTOP quirks for 8168/8111 chips
- always set CPLUSCMD_PCI_MRW on reset
- set VLANSTRIP and RXCSUM_ENB bits on CPLUS register per if_capenable

Tested on 8111C and 8111D by several users, and
no bad side effect on my old 8169S.
 1.46  26-Apr-2009  tsutsui - use (uint8_t *) for RX buffer
- remove unnecessary pointer casts
 1.45  21-Mar-2009  tsutsui Add another quirk flag which shows availability of EEPROM command register.

Now we can remove sc_rev which was intended to represent "MAC revision"
used in the Realtek driver.
 1.44  21-Mar-2009  tsutsui Add and use a new quirk flag to disable JUMBO MTU,
rather than checking sc_rev values.
 1.43  21-Mar-2009  tsutsui Add hardware checksum support for newer PCIe 8168/8111/8102 chips,
per device info taken from FreeBSD driver. Tested by snj@ on 8111C.

Should closes PR kern/40955.

Note on old 8169 chips IP hw csum must be enabled to use TCP/UDP hw csums,
but I'm not sure if these newer chips still have the same restriction.
 1.42  20-Mar-2009  tsutsui Access LDPS register in re_reset() only on 8169S single chip variants.
From OpenBSD and FreeBSD drivers via PR kern/41009, and
Realtek-supplied FreeBSD driver.
 1.41  25-Apr-2008  tsutsui branches: 1.41.2; 1.41.10; 1.41.12; 1.41.16;
Split device_t/softc for re(4) and rtk(4).
 1.40  09-Dec-2007  jmcneill branches: 1.40.10; 1.40.12;
Merge jmcneill-pm branch.
 1.39  21-Mar-2007  tsutsui branches: 1.39.8; 1.39.10; 1.39.18; 1.39.20;
Cleanup handling of quikrs on each RealTek chip:
- replace rtk_type member in rtk_softc which has chip types
with new rtk_quirk that represents quirks on each chip:
- RTKQ_8129 doesn't have internal MII (used in rtk(4))
- RTKQ_8139CPLUS has different register layout (for re(4))
- RTKQ_8169NONS (original 8169) requires some settings on init
- RTKQ_PCIE requires different settings in setmulti
so that we don't have to check each hwrev values or types everywhere
and newer variants will also work without changes if they don't
have other quirks
(sc_rev is unchenged for now for reference to the Realtek's driver)
- don't check hwrev register in re_pci_match() but check
only PCI_VENDER(), PCI_PRODUCT() and PCI_REVISION()
so that we no longer have to map pci space there
- add a new HWREV value for another 8168 variant
- try to map PCI mem space more properly
- remove (probably unneeded) ifp->if_baudrate initialization

Tested on a newer 8168 variant by Dennis den Brok on tech-kern,
and also tested on 8139 and 8169C on macppc, and 8139C+ on landisk
by me.
 1.38  04-Mar-2007  christos branches: 1.38.2; 1.38.4; 1.38.6;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37  25-Nov-2006  tsutsui branches: 1.37.2; 1.37.4; 1.37.8;
- add RE_RX_DMAMEM_SZ macro to hide a bit confusing hack
(allocating TX padding buffer in RX DMA mem to save resouces)
and use it where appropriate
- add a comment about the hack in re_attach() too
- pass a correct size on bus_dmamem_unmap() for RX DMA mem
 1.36  18-Nov-2006  tsutsui Use bitmask ops rather than modulo in RE_NEXT_*() macro since
we can assume each number of descriptors and TX queue is a power of two.
 1.35  17-Nov-2006  tsutsui Add a workaround for hardware ip4csum-tx bug on re(4) chips.

See discussion on tech-kern and tech-net for details:
http://mail-index.netbsd.org/tech-net/2006/10/21/0000.html
http://mail-index.netbsd.org/tech-net/2006/11/04/0003.html
http://mail-index.netbsd.org/tech-net/2006/11/07/0002.html
http://mail-index.netbsd.org/tech-net/2006/11/12/0000.html
etc.
 1.34  12-Nov-2006  tsutsui - merge re_encap() into re_start() so that we can handle each error case
more flexible
- account a number of free txq and use it to see if packets are queued or sent
- assume free TX descriptors are not owned by the chip in re_start() and
panic if there is any inconsistency on them #ifdef DIAGNOSTIC case.
- replace a magic number (reserved TX descs?) with macro
 1.33  11-Nov-2006  tsutsui - declare struct re_txq separately
- reorder bus_dma_segment_t members since they are used only on attach/detach
 1.32  05-Nov-2006  tsutsui Rename prefixes of re(4) specific macro and structure members
from RTK_ or rtk_ to RE_ or re_ for maintainability of these sources.
Eventually we should split these files (and struct rtk_softc) into
three elements, rtk(4) specific one, re(4) specific one, and a common
(register definitions, eeprom and multicast functions etc) part.

While here, add a couple of comments around weird definitions.
 1.31  05-Nov-2006  tsutsui - make TX threshold macro more generic
- no need to bother to initialize sc_txthresh in rtk_attach()
since it's done in rtk_init()
 1.30  03-Nov-2006  tsutsui Minor cleanups:
- move some driver specific definitions from rtl81x9reg.h to rtl81x9var.h
- move several macro where related structures are declared
- remove unused macro
- fix some comments
- unwrap some lines
 1.29  03-Nov-2006  tsutsui Use #define<space>, which seems consistent in these files.
 1.28  28-Oct-2006  tsutsui Put common data for each RX DMA descriptor into a new rxsoft structure
for micro optimization.
 1.27  27-Oct-2006  tsutsui Remove redundant byteswap ops.
 1.26  27-Oct-2006  tsutsui Use common macro rather than local one.
 1.25  22-Oct-2006  tsutsui Rename RTK_[TR]X_DESC_INC() macro to RTK_NEXT_[TR]X_DESC() and
change them to return rvalues to avoid possible side effects.
Also define RTK_NEXT_TXQ() for rtk_txq index and use it as well.
 1.24  20-Oct-2006  tsutsui u_intNN_t -> uintNN_t
 1.23  20-Oct-2006  tsutsui - call bus_dmamap_sync(9) against DMA descriptors more properly
- make DMA descripter members volatile
Now re(4) works on sgimips O2.

XXX: Still re(4) sometimes stalls on NFS load on sgimips,
XXX: but I'm not sure it's sgimips specific or not.
 1.22  17-Oct-2006  tsutsui Use "#ifdef __NO_STRICT_ALIGNMENT" rather than
"#if defined(__i386__) || defined(__x86_64__)".

XXX: What will happen if RTL8168B is used on !__NO_STRICT_ALIGNMENT hosts?
XXX: If 8168B can't handle RX DMA into 32bit-unaligned memory, should we
XXX: implement some code to copy RX buffers like vge(4)?
XXX: Or is 8168B available only for on-board NIC for PCs?
 1.21  18-Jun-2006  christos branches: 1.21.4; 1.21.6;
PR/33763: dieter roelants: Realtek 8168B doesn't function. Don't align
for i386/x86_64. From FreeBSD.
 1.20  11-Dec-2005  christos branches: 1.20.4; 1.20.8; 1.20.14; 1.20.16;
merge ktrace-lwp.
 1.19  30-May-2005  christos branches: 1.19.2;
- add missing const
- fix variable shadowing
- remove unneeded casts
 1.18  23-Mar-2005  yamt - restructure tx descriptor handling code to decouple
number of tx descriptors, number of rx descriptors, and number of mbufs.
- bump number of tx descriptors for rtl8169. 64 doesn't seem to be sufficient
when doing TSO.
 1.17  04-Feb-2005  perry branches: 1.17.4;
de-__P
 1.16  23-Jan-2005  dan branches: 1.16.2;
attach rtk(4) as an event source to rnd(4)
patches from Sean Davis in PR/28547
(also added a detach hook)
 1.15  09-Jan-2005  kanaoka branches: 1.15.2;
sys/dev/ic/rtl8169.c:
- re_attach(): Use bus_dma* directly instead of calling re_alloc().
- re_attach(): Free bus_dma* resources if attach fails.
- re_detach(): Free bus_dma* resources.
- re_newbuf(): Remove unnecessary error check.

sys/dev/ic/rtl81x9reg.h:
- Define RTK_NTXSEGS.

sys/dev/ic/rtl81x9var.h:
- Add new members to struct rtk_list_data for bus_dma*.
 1.14  25-Dec-2004  jonathan Add a forgotten change to rtl81x9var.hfor split re(4) driver
(sys/dev/ic/rtl8169.c): add `sc_rev' to generic 81x9 struct rtk_softc.
 1.13  30-May-2004  toshii Minor clean ups. No functional change.
- use RTK_RX_DESC_CNT where appropriate
- remove unused members
 1.12  28-May-2004  toshii A couple of changes for adding re(4) (Realtek gigabit ethernet):
- add necessary members in rtk_softc
- make functions used by re(4) non-static
 1.11  25-Oct-2003  fvdl branches: 1.11.2;
Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD.
 1.10  25-Jul-2001  kanaoka branches: 1.10.20;
- Increase Early TX threshold if underrun occurred.
 1.9  02-Feb-2001  thorpej branches: 1.9.2; 1.9.4;
Rework the transmit logic. Use a "free" and "dirty" list of
transmit jobs. The previous logic occasionally, under heavy
load, would attempt to sync and unload DMA maps that weren't
currently in use, and also occasionally leaked mbufs under
heavy load.

Yay, NFS now works pretty well on my Dreamcast.
 1.8  02-Feb-2001  thorpej Put the rx buf pointer into the softc directly.
 1.7  05-Dec-2000  tsutsui - Since rtk_rxeof() was rewritten, we don't have to reserve a few bytes
before the Rx buffer.
- Reduce delay on EEPROM access.
- Some more cosmetics.
 1.6  30-Nov-2000  tsutsui Clarify RX status header length and some cosmetics.
 1.5  19-May-2000  tsutsui branches: 1.5.4; 1.5.6;
- Change RL_* -> RTK_*
- Free bus_dma resources if attach fails
- Add detach and power management code

Patch from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> in kern/10156.
 1.4  15-May-2000  thorpej Symbol namespace cleanup: rl_ -> rtk_
 1.3  01-May-2000  tsutsui - Move some initialization into MI rl_attach() from each bus attachment.
- Use proper CARDBUS_* macro in if_rl_cardbus.c
- Use product ID read from PCI configuration space rather than from EEPROM
in if_rl_pci.c.

Patch sent from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> and
some cosmetic changes by me.
 1.2  30-Apr-2000  tsutsui Modify EEPROM read functions and handle also 9356 EEPROM.
Fixes kern/9861.
 1.1  26-Apr-2000  tsutsui - Allocate mbuf dynamically on Tx and use bus_dmamap_load_mbuf(9).
- Call bus_dmamap_sync(9) as appropriate.
- Leave only register declarations in rtl81x9reg.h and
split other stuff into rtl81x9var.h.

bus_dma(9) code mostly taken from thorpej's if_rtp.c.
 1.5.6.4  11-Feb-2001  bouyer Sync with HEAD.
 1.5.6.3  08-Dec-2000  bouyer Sync with HEAD.
 1.5.6.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.6.1  19-May-2000  bouyer file rtl81x9var.h was added on branch thorpej_scsipi on 2000-11-20 11:40:53 +0000
 1.5.4.2  27-Oct-2001  he Pull up revisions 1.8-1.10 (via patch, requested by jdolecek):
Apply assorted stability fixes:
o increase early TX threshold if underrun occurred
o reworked transmit logic
o fix bug in ring-buffer wrap calculation
Should fix problems with hung network interfaces of this type.
 1.5.4.1  25-Jan-2001  jhawk Pull up revisions 1.6-1.7 (requested by tsutsui):
Clean up receive interrupt routine and fix DMA buffer handing
for receive buffering.
Add missed bus_dmamem_free() in rtk_detach().
Some cosmetic fixes.
 1.9.4.1  03-Aug-2001  lukem update to -current
 1.9.2.1  24-Aug-2001  nathanw Catch up with -current.
 1.10.20.8  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.20.7  01-Apr-2005  skrll Sync with HEAD.
 1.10.20.6  04-Feb-2005  skrll Sync with HEAD.
 1.10.20.5  24-Jan-2005  skrll Sync with HEAD.
 1.10.20.4  17-Jan-2005  skrll Sync with HEAD.
 1.10.20.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.20.2  18-Sep-2004  skrll Sync with HEAD.
 1.10.20.1  03-Aug-2004  skrll Sync with HEAD
 1.11.2.2  21-Jun-2004  tron branches: 1.11.2.2.2;
Pull up revision 1.13 (requested by toshii in ticket #517):
Minor clean ups. No functional change.
- use RTK_RX_DESC_CNT where appropriate
- remove unused members
 1.11.2.1  21-Jun-2004  tron Pull up revision 1.12 (requested by toshii in ticket #517):
A couple of changes for adding re(4) (Realtek gigabit ethernet):
- add necessary members in rtk_softc
- make functions used by re(4) non-static
 1.11.2.2.2.1  16-Apr-2005  tron Pull up revision 1.16 (requested by dan in ticket #1116):
attach rtk(4) as an event source to rnd(4)
patches from Sean Davis in PR/28547
(also added a detach hook)
 1.15.2.1  29-Apr-2005  kent sync with -current
 1.16.2.2  26-Mar-2005  yamt sync with head.
 1.16.2.1  12-Feb-2005  yamt sync with head.
 1.17.4.3  04-Oct-2007  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1852):
sys/dev/ic/rtl81x9var.h: revision 1.39
sys/dev/cardbus/if_re_cardbus.c: revision 1.13
sys/dev/pci/if_re_pci.c: revision 1.27 via patch
sys/dev/pci/if_rtk_pci.c: revision 1.32
sys/dev/cardbus/if_rtk_cardbus.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.84, 1.85
sys/dev/ic/rtl81x9reg.h: revision 1.27
sys/dev/ic/rtl81x9.c: revision 1.72
Cleanup handling of quikrs on each RealTek chip:
Pull a fix for PCIe variants from FreeBSD
 1.17.4.2  03-Mar-2007  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1673):
distrib/sets/lists/man/mi 1.844, 1.871
share/man/man4/Makefile 1.372, 1.379 via patch
share/man/man4/re.4 1.8, 1.9, 1.11, 1.12
share/man/man4/rgephy.4 1.1
share/man/man4/rlphy.4 1.1, 1.2
sys/arch/amd64/conf/GENERIC 1.79, 1.89
sys/arch/amd64/conf/INSTALL 1.45, 1.49
sys/arch/i386/conf/GENERIC 1.717, 1.747
sys/arch/i386/conf/GENERIC_LAPTOP 1.164
sys/arch/i386/conf/INSTALL 1.277, 1.283
sys/arch/i386/conf/INSTALL_LAPTOP 1.96, 1.98
sys/arch/i386/conf/XEN2_DOM0 1.22 via patch
sys/arch/macppc/conf/GENERIC 1.220, 1.246
sys/arch/macppc/conf/INSTALL 1.96, 1.100
sys/dev/cardbus/if_re_cardbus.c 1.10
sys/dev/cardbus/if_rtk_cardbus.c 1.29-1.31
sys/dev/ic/rtl8169.c 1.14, 1.20, 1.24, 1.25, 1.28-1.61, 1.63, 1.64-1.81 via patch
sys/dev/ic/rtl81x9.c 1.52, 1.54-1.63, 1.65, 1.67-1.70
sys/dev/ic/rtl81x9reg.h 1.15-1.26
sys/dev/ic/rtl81x9var.h 1.19, 1.21-1.37
sys/dev/mii/files.mii 1.38
sys/dev/mii/miidevs 1.62, 1.64
sys/dev/mii/rgephy.c 1.10, 1.13-1.16
sys/dev/mii/rlphy.c 1.1, 1.6, 1.7, 1.11 via patch
sys/dev/pci/if_re_pci.c 1.13, 1.15-1.17, 1.19-1.23
sys/dev/pci/if_rtk_pci.c 1.25, 1.28, 1.29, 1.31
sys/dev/pci/pcidevs 1.851, 1.852

on re(4):
- improve stability (I believe ;-)
- add a workaround for hardware ip4csum-tx bug
- support newer chips (8169SB/SC, PCIe based 8168 etc.)
- fix 8139C+ support
- enable hardware VLAN
- misc bus_dma(9) fix (which makes re(4) work on mips ports)

on rtk(4):
- fix kern/31348
- fix possible panic on dreamcast
 1.17.4.1  04-Apr-2005  tron Pull up revision 1.18 (requested by yamt in ticket #91):
- restructure tx descriptor handling code to decouple
number of tx descriptors, number of rx descriptors, and number of mbufs.
- bump number of tx descriptors for rtl8169. 64 doesn't seem to be sufficient
when doing TSO.
 1.19.2.4  21-Jan-2008  yamt sync with head
 1.19.2.3  03-Sep-2007  yamt sync with head.
 1.19.2.2  30-Dec-2006  yamt sync with head.
 1.19.2.1  21-Jun-2006  yamt sync with head.
 1.20.16.1  13-Jul-2006  gdamore Merge from HEAD.
 1.20.14.1  22-Jun-2006  chap Complete a sync sys/ with head.
 1.20.8.1  26-Jun-2006  yamt sync with head.
 1.20.4.1  09-Sep-2006  rpaulo sync with head
 1.21.6.2  10-Dec-2006  yamt sync with head.
 1.21.6.1  22-Oct-2006  yamt sync with head
 1.21.4.2  12-Jan-2007  ad Sync with head.
 1.21.4.1  18-Nov-2006  ad Sync with head.
 1.37.8.1  03-Jun-2007  wrstuden Catch up with now-somewhat-dated netbsd-4. These changes took longer
than expected for me to actually get around to merging.
 1.37.4.2  24-Mar-2007  yamt sync with head.
 1.37.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.37.2.3  18-Aug-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1339):
sys/dev/ic/rtl8169.c: revisions 1.107, 1.114, 1.115, 1.116,
1.117 (via patch), 1.118 (via patch),
1.119, 1.121
sys/dev/ic/rtl81x9reg.h: revisions 1.36, 1.37, 1.38, 1.39
sys/dev/ic/rtl81x9var.h: revision 1.47
sys/dev/mii/rgephy.c: revisions 1.16, 1.18, 1.19, 1.27 (via patch)
sys/dev/mii/rgephyreg.h: revision 1.3
sys/dev/pci/if_re_pci.c: revision 1.36
- add support for RTL8211B(L) to rgephy(4)
- add a wakeup instruction for rgephy(4) on newer re(4) chips
- detect RTL8169CP, RTL8168D/8111D, and RTL8103E variants
- fix rgephy(4) problem on RTL8111D reported on current-users:
http://mail-index.NetBSD.org/current-users/2009/04/12/msg008977.html
http://mail-index.NetBSD.org/current-users/2009/04/19/msg009096.html
- pull more quirk handling from FreeBSD
- fix RX hwcksum for DESCV2 chips for PR kern/40605
- remove "B" suffix from RTL8168 device names in attach message
 1.37.2.2  31-Mar-2009  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1297):
src/sys/dev/ic/rtl8169.c 1.104 (via patch), 1.105 (via patch),
1.106 (via patch), 1.108, 1.109 (via patch),
1.110, 1.111, 1.112, 1.113
sys/dev/ic/rtl81x9reg.h: revision 1.30 - 1.35
sys/dev/ic/rtl81x9var.h: revision 1.42 - 1.45
sys/dev/pci/if_re_pci.c: revision 1.35
Add support for 8168C/8111C/8102E chips.
Fix MAC reset issue (PR kern/41009)
Add/fix HW checksum support (PR kern/40955)
 1.37.2.1  16-May-2007  jdc Pull up revision 1.39 (requested by tsutsui in ticket #640).

Cleanup handling of quikrs on each RealTek chip:
- replace rtk_type member in rtk_softc which has chip types
with new rtk_quirk that represents quirks on each chip:
- RTKQ_8129 doesn't have internal MII (used in rtk(4))
- RTKQ_8139CPLUS has different register layout (for re(4))
- RTKQ_8169NONS (original 8169) requires some settings on init
- RTKQ_PCIE requires different settings in setmulti
so that we don't have to check each hwrev values or types everywhere
and newer variants will also work without changes if they don't
have other quirks
(sc_rev is unchenged for now for reference to the Realtek's driver)
- don't check hwrev register in re_pci_match() but check
only PCI_VENDER(), PCI_PRODUCT() and PCI_REVISION()
so that we no longer have to map pci space there
- add a new HWREV value for another 8168 variant
- try to map PCI mem space more properly
- remove (probably unneeded) ifp->if_baudrate initialization

Tested on a newer 8168 variant by Dennis den Brok on tech-kern,
and also tested on 8139 and 8169C on macppc, and 8139C+ on landisk
by me.
 1.38.6.1  29-Mar-2007  reinoud Pullup to -current
 1.38.4.1  11-Jul-2007  mjf Sync with head.
 1.38.2.1  10-Apr-2007  ad Sync with head.
 1.39.20.1  11-Dec-2007  yamt sync with head.
 1.39.18.1  26-Dec-2007  ad Sync with head.
 1.39.10.1  09-Jan-2008  matt sync with HEAD
 1.39.8.1  05-Oct-2007  joerg Remove the power management nonsense in the PCI versions of
rtk(4) and re(4). It is not really likely to work anyway.
Use PNP power management for the cardbus attachment as well and
remove the power management handlers from the chipset code.
 1.40.12.1  18-May-2008  yamt sync with head.
 1.40.10.1  02-Jun-2008  mjf Sync with HEAD.
 1.41.16.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.12.6  25-Jan-2012  riz Pull up following revision(s) (requested by garbled in ticket #1698):
sys/dev/ic/rtl81x9var.h: revision 1.52
sys/dev/ic/rtl8169.c: revision 1.134
sys/dev/ic/rtl81x9reg.h: revision 1.42
Add support to recognize the 8168E model of this chip. Taken from FreeBSD
 1.41.12.5  19-Jun-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #821):
sys/dev/ic/rtl8169.c: revisions 1.107, 1.114-1.119, 1.121
sys/dev/ic/rtl81x9reg.h: revisions 1.36-1.39
sys/dev/ic/rtl81x9var.h: revision 1.47
sys/dev/mii/rgephy.c: revision 1.27 via patch
sys/dev/pci/if_re_pci.c: revision 1.36
remove extra semicolons.
--
Add HWREV values of RTL8168CP and RTL8168D. From FreeBSD.

XXX: needs more quirk handling after wakeup for newer chips.
--
Add HWREV of RTL8102EL variant. From FUKAUMI Naoki.
--
Assume an unknown HWREV chip has the same features with the latest one.
--
Remove suffix "B" from rtk_name of PCI_PRODUCT_REALTEK_RT8168 devices.
All 8168/8111 variants (8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP)
have the same PCI device ID.
--
Remove magic reset sequence except wakeup for rev 2 chips which breaks 8111D.
Problem reported and fix confirmed by Thomas Bieg on current-users.

Also tested on 8111C (no bad side effect) by several users privately.
--
Pull some changes for newer chips from FreeBSD:
- pull MACSTAT and CMDSTOP quirks for 8168/8111 chips
- always set CPLUSCMD_PCI_MRW on reset
- set VLANSTRIP and RXCSUM_ENB bits on CPLUS register per if_capenable

Tested on 8111C and 8111D by several users, and
no bad side effect on my old 8169S.
--
Remove unused sc_rev settings (all quirks are handled by sc_quirk)
and merge HWREV cases which have the same quirks.
--
- rename RTK_HWREV_8102EL_SPIN2 -> RTK_HWREV_8103E
- add a HWREV value for 8168DP
Per Realtek's Linux drivers.
--
Two fixes for RX hwcsum on DESCV2 chips:
* On checking TCPv4/UDPv4 RX checksum on DESCV2 chips, also check
RE_RDESC_VLANCTL_IPV4 bit because those DESCV2 chips may also recognize
IPv6 packets and set RE_PROTOID_TCPIP or RE_PROTOID_UDPIP bits for
TCPv6/UDPv6 packets. This may fix PR kern/40605.
* According to Realtek's Linux driver, DESCV2 chips don't set RE_PROTOID_IP
for non-TCP/UDP IP packets (set only RE_RDESC_VLANCTL_IPV[46]) so
remove PROTOID check for IPv4 RX cheksum on DESCV2 chips.
 1.41.12.4  01-May-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #597):
sys/dev/ic/rtl8169.c: revision 1.111
sys/dev/ic/rtl81x9var.h: revision 1.45
Add another quirk flag which shows availability of EEPROM command register.
Now we can remove sc_rev which was intended to represent "MAC revision"
used in the Realtek driver.
 1.41.12.3  01-May-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #597):
sys/dev/ic/rtl8169.c: revision 1.110
sys/dev/ic/rtl81x9var.h: revision 1.44
Add and use a new quirk flag to disable JUMBO MTU,
rather than checking sc_rev values.
 1.41.12.2  01-May-2009  snj Pull up following revision(s) (requested by tsutsui in ticket #597):
sys/dev/ic/rtl8169.c: revision 1.109
sys/dev/ic/rtl81x9reg.h: revision 1.34
sys/dev/ic/rtl81x9var.h: revision 1.43
Add hardware checksum support for newer PCIe 8168/8111/8102 chips,
per device info taken from FreeBSD driver. Tested by snj@ on 8111C.
Should closes PR kern/40955.
Note on old 8169 chips IP hw csum must be enabled to use TCP/UDP hw csums,
but I'm not sure if these newer chips still have the same restriction.
 1.41.12.1  24-Mar-2009  snj branches: 1.41.12.1.4;
Pull up following revision(s) (requested by tsutsui in ticket #596):
sys/dev/ic/rtl8169.c: revision 1.108
sys/dev/ic/rtl81x9var.h: revision 1.42
Access LDPS register in re_reset() only on 8169S single chip variants.
From OpenBSD and FreeBSD drivers via PR kern/41009, and
Realtek-supplied FreeBSD driver.
 1.41.12.1.4.1  21-Apr-2010  matt sync to netbsd-5
 1.41.10.1  28-Apr-2009  skrll Sync with HEAD.
 1.41.2.4  11-Aug-2010  yamt sync with head.
 1.41.2.3  16-Sep-2009  yamt sync with head
 1.41.2.2  16-May-2009  yamt sync with head
 1.41.2.1  04-May-2009  yamt sync with head.
 1.49.4.1  05-Mar-2011  rmind sync with head
 1.49.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.50.8.1  17-Apr-2012  yamt sync with head
 1.52.2.1  18-Feb-2012  mrg merge to -current.
 1.53.6.1  03-Dec-2017  jdolecek update from HEAD
 1.54.2.2  28-Aug-2017  skrll Sync with HEAD
 1.54.2.1  06-Jun-2015  skrll Sync with HEAD
 1.55.4.1  21-Apr-2017  bouyer Sync with HEAD
 1.55.2.1  26-Apr-2017  pgoyette Sync with HEAD
 1.56.18.2  04-Aug-2023  martin Pull up following revision(s) (requested by jakllsch in ticket #1705):

sys/dev/ic/rtl81x9var.h: revision 1.58
sys/dev/ic/rtl81x9reg.h: revision 1.54
sys/dev/ic/rtl8169.c: revision 1.167
sys/dev/ic/rtl8169.c: revision 1.168

re(4): misc chip revision support changes
* remove impossible-to-match chip revision cases
* bring support for modern chips in line with FreeBSD and OpenBSD
* adds support for RTL8168GU

Addresses PR kern/56312.

- Print chip revision. From OpenBSD.
- Rename RTK_HWREV_8168_SPIN[123] to RTK_HWREV_8168'B'_SPIN[123].
Same as other *BSDs.
- Rename RTK_HWREV_8168G_SPIN4 to RTK_HWREV_8411B. Same as other *BSDs.
- Add definition of RTK_HWREV_8169_8110SCE.
 1.56.18.1  28-Jan-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #667):

sys/dev/ic/rtl81x9var.h: revision 1.57
sys/dev/ic/rtl81x9.c: revision 1.107
sys/dev/ic/rtl81x9reg.h: revision 1.51
sys/dev/ic/rtl8169.c: revision 1.160
sys/dev/ic/rtl81x9reg.h: revision 1.52
sys/dev/ic/rtl8169.c: revision 1.161

Use unsigned in rtk_setmulti() to avoid undefined behavior. Found bk kUBSan.
8168H model didn't link up well. some models seems to require to enable TX/RX after configuration.
RTKQ_TXRXEN_LATER quirk flag added. it may be able to unify with RTKQ_RXDV_GATED flag?
Sort RTK_HWREV_* by value.

Improve some chip revisions support:
- Add 8168FP, 8411, 8168G, 8401E, 8105E, 8105E_SPIN1, 8106E and 8402 from
{Free,Open}BSD.
- Renumber RTK_HWREV_8103E from 0x24C00000 to 0x34c00000. 0x24C00000 is newly
used as RTK_HWREV_8102EL_SPIN1. Same as {Free,Open}BSD.
 1.56.12.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.58.26.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed