The NetBSD Project

CVS log for src/sys/dev/ic/rtl8169.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.176.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:21:59 2026 UTC (11 days, 11 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.176.2.1: preferred, colored; branchpoint 1.176: preferred, colored; next MAIN 1.177: preferred, colored
Changes since revision 1.176.2.1: +245 -103 lines
Sync with HEAD

Revision 1.175.4.1: download - view: text, markup, annotated - select for diffs
Fri Oct 2 10:23:13 2026 UTC (6 weeks, 3 days ago) by martin
Branches: netbsd-10
Diff to: previous 1.175: preferred, colored; next MAIN 1.176: preferred, colored
Changes since revision 1.175: +6 -3 lines
Pull up following revision(s) (requested by tsutsui in ticket #1346):

	sys/dev/ic/rtl8169.c: revision 1.184

re(4): fix mangled TX queue on DMA map loading errors

Do not advance the TX queue producer index when bus_dmamap_load_mbuf()
fails.

The producer index must advance only after a packet has been
successfully committed to a TX queue entry.  Advancing it on a
map loading error leaves a hole in re_txq[], while re_txq_free()
still counts only successfully queued packets.

re_txeof() assumes that all outstanding TX queue entries from
re_txq_considx are contiguous, so such a hole can make it process
an unused entry and corrupt the TX queue accounting.

This bug was introduced by my re_encap() -> re_start() refactoring
in rev. 1.59 back in 2006.  Sorry it took ~20 years to notice it.

Revision 1.179.2.2: download - view: text, markup, annotated - select for diffs
Fri Oct 2 10:21:55 2026 UTC (6 weeks, 3 days ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-1-RELEASE
Diff to: previous 1.179.2.1: preferred, colored; branchpoint 1.179: preferred, colored; next MAIN 1.180: preferred, colored
Changes since revision 1.179.2.1: +6 -3 lines
Pull up following revision(s) (requested by tsutsui in ticket #499):

	sys/dev/ic/rtl8169.c: revision 1.184

re(4): fix mangled TX queue on DMA map loading errors

Do not advance the TX queue producer index when bus_dmamap_load_mbuf()
fails.

The producer index must advance only after a packet has been
successfully committed to a TX queue entry.  Advancing it on a
map loading error leaves a hole in re_txq[], while re_txq_free()
still counts only successfully queued packets.

re_txeof() assumes that all outstanding TX queue entries from
re_txq_considx are contiguous, so such a hole can make it process
an unused entry and corrupt the TX queue accounting.

This bug was introduced by my re_encap() -> re_start() refactoring
in rev. 1.59 back in 2006.  Sorry it took ~20 years to notice it.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Sat Sep 26 00:48:28 2026 UTC (7 weeks, 2 days ago) by tsutsui
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +12 -7 lines
re(4): handle errors while initializing the RX ring

Properly propagate errors from re_newbuf() while initializing the RX
descriptor ring.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Wed Sep 23 19:15:25 2026 UTC (7 weeks, 4 days ago) by tsutsui
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +6 -3 lines
re(4): fix mangled TX queue on DMA map loading errors

Do not advance the TX queue producer index when bus_dmamap_load_mbuf()
fails.

The producer index must advance only after a packet has been
successfully committed to a TX queue entry.  Advancing it on a
map loading error leaves a hole in re_txq[], while re_txq_free()
still counts only successfully queued packets.

re_txeof() assumes that all outstanding TX queue entries from
re_txq_considx are contiguous, so such a hole can make it process
an unused entry and corrupt the TX queue accounting.

This bug was introduced by my re_encap() -> re_start() refactoring
in rev. 1.59 back in 2006.  Sorry it took ~20 years to notice it.

Should be pulled up to netbsd-11 and netbsd-10.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Thu May 21 10:19:28 2026 UTC (5 months, 3 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +3 -3 lines
One semicolon is enough. ;; -> ;

Revision 1.179.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 2 19:04:52 2026 UTC (7 months, 2 weeks ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +21 -2 lines
Pull up following revision(s) (requested by gutteridge in ticket #228):

	sys/external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts: revision 1.2
	share/installboot/evbarm/boards.plist: revision 1.17
	sys/dev/ic/rtl8169.c: revision 1.182

evbarm/boards.plist: add nanopi-r4s

rk3399-nanopi-r4s.dts: apply upstream USB fix

This gives us the addition of:
[   1.0000040] rkusbphy2 at rkusb1: USB2 host port

This is taken from the following commit (applied to a different file
in the current Linux tree; it should be included in the DTS update
skrll@ is planning, but could be simpler to pull up to netbsd-11 in
this form):
From 38f4aa34a5f737ea8588dac320d884cc2e762c03 Mon Sep 17 00:00:00 2001
From: Justin Klaassen <justin%tidylabs.net@localhost>
Date: Tue, 25 Feb 2025 17:03:58 +0000
Subject: arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S
The u2phy1_host should always have the same status as usb_host1_ehci
and usb_host1_ohci, otherwise the EHCI and OHCI drivers may be
initialized for a disabled usb port.
Per the NanoPi R4S schematic, the phy-supply for u2phy1_host is set to
the vdd_5v regulator.
Fixes: db792e9adbf8 ("rockchip: rk3399: Add support for FriendlyARM NanoPi R4S")
Cc: stable%vger.kernel.org@localhost
Signed-off-by: Justin Klaassen <justin%tidylabs.net@localhost>
Reviewed-by: Dragan Simic <dsimic%manjaro.org@localhost>
Link: https://lore.kernel.org/r/20250225170420.3898-1-justin%tidylabs.net@localhost
Signed-off-by: Heiko Stuebner <heiko%sntech.de@localhost>


rtl8169.c: generate MAC address for hardware without an EEPROM

Borrow the equivalent change from if_ure.c (r. 1.33). These re(4)
devices otherwise end up with an all zero MAC. Found (at least) on the
NanoPi R4S (non-"Enterprise" version, the other being distinguished by
including an EEPROM to set a consistent MAC address).
(Given this code is in two places now, it may make more sense to
centralize this if it grows any further.)

Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri Jan 30 23:51:06 2026 UTC (9 months, 2 weeks ago) by gutteridge
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +21 -2 lines
rtl8169.c: generate MAC address for hardware without an EEPROM

Borrow the equivalent change from if_ure.c (r. 1.33). These re(4)
devices otherwise end up with an all zero MAC. Found (at least) on the
NanoPi R4S (non-"Enterprise" version, the other being distinguished by
including an EEPROM to set a consistent MAC address).

(Given this code is in two places now, it may make more sense to
centralize this if it grows any further.)

Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Jan 1 21:22:43 2026 UTC (10 months, 2 weeks ago) by gutteridge
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -3 lines
rtl8169.c: improve a comment

Revision 1.180: download - view: text, markup, annotated - select for diffs
Sat Dec 20 06:50:45 2025 UTC (10 months, 3 weeks ago) by mlelstv
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +211 -96 lines
Use private mutex to make code MPSAFE.
Enable MPSAFE interrupt for PCI (but not cardbus).
Fix handling multi-fragments in error path.
Move RTKQ_PICE handling into re_intr().
Increase queue lengths a bit.

Revision 1.176.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:56:42 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +25 -6 lines
Sync with HEAD

Revision 1.179: download - view: text, markup, annotated - select for diffs
Mon Aug 12 21:27:34 2024 UTC (2 years, 3 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-0-RC2, netbsd-11-0-RC1
Branch point for: netbsd-11
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +11 -11 lines
fix whitespace

Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Aug 12 18:55:01 2024 UTC (2 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +23 -2 lines
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.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Fri Jul 5 04:31:51 2024 UTC (2 years, 4 months ago) by rin
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +4 -6 lines
sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@

Revision 1.176: download - view: text, markup, annotated - select for diffs
Sat Jun 29 12:11:11 2024 UTC (2 years, 4 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +5 -5 lines
if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377

Revision 1.159.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 4 15:06:50 2023 UTC (3 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE
Diff to: previous 1.159.2.1: preferred, colored; branchpoint 1.159: preferred, colored; next MAIN 1.160: preferred, colored
Changes since revision 1.159.2.1: +77 -23 lines
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.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Sun Sep 25 18:43:32 2022 UTC (4 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -3 lines
Remove unnecessary include of <sys/malloc.h>.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Aug 1 07:37:18 2022 UTC (4 years, 3 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +2 -2 lines
Revert last accidental commits.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Mon Aug 1 07:34:28 2022 UTC (4 years, 3 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +4 -4 lines
Also fix shift values for SCT constants.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Sat Jun 25 02:46:15 2022 UTC (4 years, 4 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +6 -5 lines
Pass proper status values to rnd_add_uint32(9) as rnd(9) man page claims.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Tue May 24 20:50:19 2022 UTC (4 years, 5 months ago) by andvar
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +3 -3 lines
fix various typos in comment, documentation and log messages.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Thu Jan 27 18:07:27 2022 UTC (4 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +2 -3 lines
drop poorly phrased and redundant message about unsupported chip revisions

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Dec 31 14:25:22 2021 UTC (4 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +3 -3 lines
sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sat Sep 4 19:27:43 2021 UTC (5 years, 2 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +6 -12 lines
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.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Mon Sep 21 06:57:00 2020 UTC (6 years, 1 month ago) by msaitoh
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +73 -13 lines
- 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.

Revision 1.154.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:22 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.154.2.1: preferred, colored; branchpoint 1.154: preferred, colored; next MAIN 1.155: preferred, colored
Changes since revision 1.154.2.1: +54 -22 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Mar 13 04:08:07 2020 UTC (6 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +4 -7 lines
Use BUS_ADDR_{LO,HI}32().

Revision 1.165: download - view: text, markup, annotated - select for diffs
Thu Mar 12 03:01:46 2020 UTC (6 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -2 lines
Add support for MBUFTRACE.

Revision 1.161.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:08 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.161: preferred, colored; next MAIN 1.162: preferred, colored
Changes since revision 1.161: +17 -14 lines
Sync with head.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Feb 7 00:56:48 2020 UTC (6 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +5 -4 lines
Use callout_setfunc() / callout_schedule().

Revision 1.163: download - view: text, markup, annotated - select for diffs
Tue Feb 4 05:25:39 2020 UTC (6 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +5 -5 lines
Use ifmedia_fini().

Revision 1.162: download - view: text, markup, annotated - select for diffs
Wed Jan 29 15:06:12 2020 UTC (6 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +11 -9 lines
Adopt <net/if_stats.h>.

Revision 1.159.2.1: download - view: text, markup, annotated - select for diffs
Tue Jan 28 11:12:30 2020 UTC (6 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +36 -5 lines
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.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Tue Dec 17 10:42:06 2019 UTC (6 years, 11 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +23 -3 lines
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.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sun Sep 22 16:41:19 2019 UTC (7 years, 1 month ago) by ryo
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +15 -4 lines
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?

Revision 1.154.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:11 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +101 -65 lines
Sync with HEAD

Revision 1.159: download - view: text, markup, annotated - select for diffs
Thu May 30 02:32:18 2019 UTC (7 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +11 -10 lines
 Simplify MII structure initialization and reference. No functional change.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Fri Apr 5 23:44:59 2019 UTC (7 years, 7 months ago) by uwe
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +3 -3 lines
RTK_CFG2_BUSFREQ is only 1 byte.  Fixes panic on landisk.

Revision 1.152.2.5: download - view: text, markup, annotated - select for diffs
Sat Jan 26 22:00:06 2019 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.152.2.4: preferred, colored; branchpoint 1.152: preferred, colored; next MAIN 1.153: preferred, colored
Changes since revision 1.152.2.4: +50 -46 lines
Sync with HEAD

Revision 1.157: download - view: text, markup, annotated - select for diffs
Tue Jan 22 03:42:26 2019 UTC (7 years, 9 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-compat-20190127
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +50 -46 lines
 Change MII PHY read/write API from:

	int (*mii_readreg_t)(device_t, int, int);
	void (*mii_writereg_t)(device_t, int, int, int);
to:

	int (*mii_readreg_t)(device_t, int, int, uint16_t *);
	int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

 In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

 Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

	arm/at91/at91emac.c
	arm/ep93xx/epe.c
	arm/omap/omapl1x_emac.c
	mips/ralink/ralink_eth.c
	arch/powerpc/booke/dev/pq3etsec.c(read)
	dev/cadence/if_cemac.c <- hkenken
	dev/ic/lan9118.c


Tested with the following device:

	axe+ukphy
	axe+rgephy
	axen+rgephy	(tested by Andrius V)
	wm+atphy
	wm+ukphy
	wm+igphy
	wm+ihphy
	wm+makphy
	sk+makphy
	sk+brgphy
	sk+gentbi
	msk+makphy
	sip+icsphy
	sip+ukphy
	re+rgephy
	bge+brgphy
	bnx+brgphy
	gsip+gphyter
	rtk+rlphy
	fxp+inphy	(tested by Andrius V)
	tlp+acphy
	ex+exphy
	epic+qsphy
	vge+ciphy	(tested by Andrius V)
	vr+ukphy	(tested by Andrius V)
	vte+ukphy	(tested by Andrius V)

Not tested (MAC):
	arm:at91emac
	arm:cemac
	arm:epe
	arm:geminigmac
	arm:enet
	arm:cpsw
	arm:emac(omac)
	arm:emac(sunxi)
	arm:npe
	evbppc:temac
	macppc:bm
	macppc:gm
	mips:aumac
	mips:ae
	mips:cnmac
	mips:reth
	mips:sbmac
	playstation2:smap
	powerpc:tsec
	powerpc:emac(ibm4xx)
	sgimips:mec
	sparc:be
	sf
	ne(ax88190, dl10019)
	awge
	ep
	gem
	hme
	smsh
	mtd
	sm
	age
	alc
	ale
	bce
	cas
	et
	jme
	lii
	nfe
	pcn
	ste
	stge
	tl
	xi
	aue
	mue
	smsc
	udav
	url

Not tested (PHY):
	amhphy
	bmtphy
	dmphy
	etphy
	glxtphy
	ikphy
	iophy
	lxtphy
	nsphyter
	pnaphy
	rdcphy
	sqphy
	tlphy
	tqphy
	urlphy

Revision 1.152.2.4: download - view: text, markup, annotated - select for diffs
Fri Jan 18 08:50:26 2019 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.152.2.3: preferred, colored; branchpoint 1.152: preferred, colored
Changes since revision 1.152.2.3: +3 -3 lines
Synch with HEAD

Revision 1.156: download - view: text, markup, annotated - select for diffs
Thu Jan 10 23:01:57 2019 UTC (7 years, 10 months ago) by mlelstv
Branches: MAIN
CVS tags: pgoyette-compat-20190118
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +3 -3 lines
Fix handling of RTKQ_IM_HW quirk, the check was inverted.

Found by tho@useless-ficus.net, thanks.
Fixes PR/53858.

Revision 1.152.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:31 2018 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.152.2.2: preferred, colored; branchpoint 1.152: preferred, colored
Changes since revision 1.152.2.2: +44 -13 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue Nov 13 10:51:49 2018 UTC (8 years ago) by mlelstv
Branches: MAIN
CVS tags: pgoyette-compat-1226, pgoyette-compat-1126
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +44 -13 lines
compute interrupt timer depending on bus clock.

Revision 1.152.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:45 2018 UTC (8 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.152.2.1: preferred, colored; branchpoint 1.152: preferred, colored
Changes since revision 1.152.2.1: +3 -3 lines
Sync with HEAD

Revision 1.154: download - view: text, markup, annotated - select for diffs
Tue Jun 26 06:48:00 2018 UTC (8 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +3 -3 lines
 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

Revision 1.152.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:50 2018 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -4 lines
Sync with HEAD

Revision 1.153: download - view: text, markup, annotated - select for diffs
Fri Jun 1 09:10:52 2018 UTC (8 years, 5 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -4 lines
Use m_remove_pkthdr() instead of "&= ~M_PKTHDR", to ensure the tags get
freed. Several other drivers have this problem it seems...

Revision 1.136.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:04 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.136.2.2: preferred, colored; branchpoint 1.136: preferred, colored; next MAIN 1.137: preferred, colored
Changes since revision 1.136.2.2: +86 -45 lines
update from HEAD

Revision 1.151.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 24 08:38:59 2017 UTC (9 years ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.151: preferred, colored; next MAIN 1.152: preferred, colored
Changes since revision 1.151: +6 -8 lines
Pull up following revision(s) (requested by knakahara in ticket #302):
	sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31
	sys/arch/x86/pci/if_vmx.c: 1.20
	sys/dev/ic/i82557.c: 1.148
	sys/dev/ic/rtl8169.c: 1.152
	sys/dev/pci/cxgb/cxgb_sge.c: 1.5
	sys/dev/pci/if_age.c: 1.51
	sys/dev/pci/if_alc.c: 1.25
	sys/dev/pci/if_ale.c: 1.23
	sys/dev/pci/if_bge.c: 1.311
	sys/dev/pci/if_bge.c: 1.312
	sys/dev/pci/if_bnx.c: 1.62
	sys/dev/pci/if_jme.c: 1.32
	sys/dev/pci/if_nfe.c: 1.64
	sys/dev/pci/if_sip.c: 1.167
	sys/dev/pci/if_stge.c: 1.63-1.64
	sys/dev/pci/if_ti.c: 1.102
	sys/dev/pci/if_txp.c: 1.48
	sys/dev/pci/if_vge.c: 1.61
	sys/dev/pci/if_wm.c: 1.538
	sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch
	sys/net/agr/if_agrether_hash.c: 1.4
	sys/net/if_ether.h: 1.67-1.68
	sys/net/if_ethersubr.c: 1.244
	sys/net/if_vlan.c: 1.100
	sys/net80211/ieee80211_input.c: 1.89
	sys/net80211/ieee80211_output.c: 1.59
	sys/sys/mbuf.h: 1.171
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.
I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html
--
only get vtag when we have vtag like the other drivers.
--
- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag
--
- add a constant for the vlan mask.
- enforce that we have a tag before we get it.
only get vtag when we have vtag like the other drivers.
like if_bge.c:1.312 and if_stge.c:1.64.
fixed by s-yamaguchi@IIJ, thanks.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Tue Sep 26 07:42:06 2017 UTC (9 years, 1 month ago) by knakahara
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +6 -8 lines
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.

I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html

XXX need pullup to -8 branch

Revision 1.143.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:03 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143.2.5: preferred, colored; branchpoint 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143.2.5: +49 -29 lines
Sync with HEAD

Revision 1.150.2.1: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:57 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.150: preferred, colored; next MAIN 1.151: preferred, colored
Changes since revision 1.150: +3 -3 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue May 16 06:16:35 2017 UTC (9 years, 6 months ago) by snj
Branches: MAIN
CVS tags: prg-localcount2-base3, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
fix inverted logic.

spotted by "sc dying" on current-users.

Revision 1.147.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:11 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.147.2.2: preferred, colored; branchpoint 1.147: preferred, colored; next MAIN 1.148: preferred, colored
Changes since revision 1.147.2.2: +46 -27 lines
Sync with HEAD

Revision 1.148.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:46 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.148: preferred, colored; next MAIN 1.149: preferred, colored
Changes since revision 1.148: +49 -29 lines
Sync with HEAD

Revision 1.150: download - view: text, markup, annotated - select for diffs
Wed Apr 19 00:20:02 2017 UTC (9 years, 7 months ago) by jmcneill
Branches: MAIN
CVS tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, bouyer-socketcan-base1
Branch point for: prg-localcount2
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +46 -27 lines
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.

Revision 1.147.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:28 2017 UTC (9 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.147.2.1: preferred, colored; branchpoint 1.147: preferred, colored
Changes since revision 1.147.2.1: +5 -4 lines
Sync with HEAD

Revision 1.149: download - view: text, markup, annotated - select for diffs
Mon Feb 20 06:46:41 2017 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +5 -4 lines
Fix assertion failure in bpf_mtap by applying deferred if_start to re(4)

Reported by maya@

Revision 1.143.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:28 2017 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143.2.4: preferred, colored; branchpoint 1.143: preferred, colored
Changes since revision 1.143.2.4: +2 -4 lines
Sync with HEAD

Revision 1.147.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:32 2017 UTC (9 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +2 -4 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.148: download - view: text, markup, annotated - select for diffs
Thu Dec 15 09:28:05 2016 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +2 -4 lines
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net

Revision 1.143.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:02 2016 UTC (10 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143.2.3: preferred, colored; branchpoint 1.143: preferred, colored
Changes since revision 1.143.2.3: +3 -3 lines
Sync with HEAD

Revision 1.147: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:13 2016 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +3 -3 lines
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.143.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:09 2016 UTC (10 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143.2.2: preferred, colored; branchpoint 1.143: preferred, colored
Changes since revision 1.143.2.2: +3 -4 lines
Sync with HEAD

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:10 2016 UTC (10 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +3 -3 lines
Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!

Revision 1.143.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:58 2015 UTC (11 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143.2.1: preferred, colored; branchpoint 1.143: preferred, colored
Changes since revision 1.143.2.1: +7 -4 lines
Sync with HEAD

Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri Aug 28 13:20:46 2015 UTC (11 years, 2 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +4 -2 lines
Add support for Realtek RTL8168H/8111H variant.

Revision 1.143.2.1: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:07 2015 UTC (11 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
Sync with HEAD

Revision 1.140.2.2: download - view: text, markup, annotated - select for diffs
Fri May 15 04:12:07 2015 UTC (11 years, 6 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.140.2.1: preferred, colored; branchpoint 1.140: preferred, colored; next MAIN 1.141: preferred, colored
Changes since revision 1.140.2.1: +6 -6 lines
Pull up following revision(s) (requested by joerg in ticket #772):
	sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.4
	sys/arch/arm/arm/disassem.c: revision 1.25
	sys/arch/arm/omap/am335x_cm_padconf.c: revision 1.3
	sys/arch/arm/omap/sitara_cm.h: revision 1.2
	sys/dev/ic/i82557var.h: revision 1.51
	sys/dev/ic/rtl8169.c: revision 1.143
	sys/dev/ieee1394/fwcrom.c: revision 1.17
	sys/external/bsd/dwc2/dwc2.c: revision 1.32
dwc2_hubd appears to be unused so #if 0 it in order to appease clang
--
Preserve const.
--
No reason not to make the string const.
--
Drop unnecessary-but-harmful casts.
--
Replace void * cast with proper __UNVOLATILE.
--
Preserve const.
--
amlogic_genfb_hdmi_write_4 is currently unused, mark it as such.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Mon Apr 13 16:33:24 2015 UTC (11 years, 7 months ago) by riastradh
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
Convert sys/dev to use <sys/rndsource.h>.

Revision 1.105.4.10: download - view: text, markup, annotated - select for diffs
Sun Dec 21 20:49:43 2014 UTC (11 years, 10 months ago) by msaitoh
Branches: netbsd-5
Diff to: previous 1.105.4.9: preferred, colored; branchpoint 1.105: preferred, colored; next MAIN 1.106: preferred, colored
Changes since revision 1.105.4.9: +15 -5 lines
Pull up following revision(s) (requested by uwe in ticket #1936):
	sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0xffff as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.

Revision 1.140.2.1: download - view: text, markup, annotated - select for diffs
Sun Dec 14 16:44:04 2014 UTC (11 years, 11 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +15 -5 lines
Pull up following revision(s) (requested by uwe in ticket #324):
	sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0xffff as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.

Revision 1.134.4.4: download - view: text, markup, annotated - select for diffs
Sun Dec 14 14:24:56 2014 UTC (11 years, 11 months ago) by martin
Branches: netbsd-6
Diff to: previous 1.134.4.3: preferred, colored; branchpoint 1.134: preferred, colored; next MAIN 1.135: preferred, colored
Changes since revision 1.134.4.3: +15 -5 lines
Pull up following revision(s) (requested by uwe in ticket #1212):
	sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0xffff as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Nov 22 00:17:07 2014 UTC (11 years, 11 months ago) by joerg
Branches: MAIN
CVS tags: nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +6 -6 lines
Drop unnecessary-but-harmful casts.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Tue Oct 14 00:56:48 2014 UTC (12 years, 1 month ago) by uwe
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +15 -5 lines
RealTek 8139C+ incorrectly identifies UDP checksum 0xffff as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Fri Oct 10 17:41:05 2014 UTC (12 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +15 -2 lines
PR/49259: J. Lorec: Add support for Realtek 8111G chipset into re(4)

Revision 1.136.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:38 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.136.2.1: preferred, colored; branchpoint 1.136: preferred, colored
Changes since revision 1.136.2.1: +1 -1 lines
Rebase to HEAD as of a few days ago.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:35 2014 UTC (12 years, 3 months ago) by tls
Branches: MAIN
CVS tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +3 -3 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.133.8.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:22 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.133.8.2: preferred, colored; branchpoint 1.133: preferred, colored; next MAIN 1.134: preferred, colored
Changes since revision 1.133.8.2: +36 -9 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.139.6.1: download - view: text, markup, annotated - select for diffs
Mon Apr 7 03:37:32 2014 UTC (12 years, 7 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139: +3 -3 lines
Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.134.4.3: download - view: text, markup, annotated - select for diffs
Wed Sep 18 20:00:53 2013 UTC (13 years, 2 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.134.4.2: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.4.2: +25 -6 lines
Pull up following revision(s) (requested by phx in ticket #946):
	sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
	sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
	sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).

Revision 1.134.4.2: download - view: text, markup, annotated - select for diffs
Mon Jul 29 08:11:53 2013 UTC (13 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.134.4.1: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.4.1: +6 -5 lines
Pull up following revision(s) (requested by khorben in ticket #913):
	sys/dev/ic/rtl8169.c: revision 1.137
	sys/dev/ic/rtl81x9reg.h: revision 1.44
	share/man/man4/re.4: revision 1.14
Added support for the Realtek 8168F variant in re(4).
From FreeBSD; not tested on real hardware unfortunately. The manual page
was adjusted as well.
No objection from current-users@, "commit it" gdt@

Revision 1.136.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:17 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +36 -9 lines
resync from head

Revision 1.139: download - view: text, markup, annotated - select for diffs
Fri May 10 14:55:08 2013 UTC (13 years, 6 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: tls-earlyentropy
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +9 -2 lines
Add RNG entropy collection support of rnd(9) to re(4).
Taken from rtk(4), and briefly checked by rndctl(8).

Revision 1.138: download - view: text, markup, annotated - select for diffs
Fri May 10 14:05:57 2013 UTC (13 years, 6 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +25 -6 lines
Make re(4) driver always use IDR register values for its MAC address.

Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.

Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Apr 6 01:53:14 2013 UTC (13 years, 7 months ago) by khorben
Branches: MAIN
CVS tags: khorben-n900
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +6 -5 lines
Added support for the Realtek 8168F variant in re(4).

From FreeBSD; not tested on real hardware unfortunately. The manual page was adjusted as well.

No objection from current-users@, "commit it" gdt@

Revision 1.133.8.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:08 2012 UTC (14 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.133.8.1: preferred, colored; branchpoint 1.133: preferred, colored
Changes since revision 1.133.8.1: +4 -4 lines
sync with head

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Jul 22 14:32:57 2012 UTC (14 years, 3 months ago) by matt
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +4 -4 lines
Fix mii_statchg to take a 'struct ifnet *' instead of device_t.  This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.

Revision 1.133.8.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:36 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +15 -2 lines
sync with head

Revision 1.134.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 6 18:26:40 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.134.2.2: preferred, colored; branchpoint 1.134: preferred, colored; next MAIN 1.135: preferred, colored
Changes since revision 1.134.2.2: +6 -2 lines
sync to -current

Revision 1.134.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 6 09:56:12 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.134.2.1: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.2.1: +2 -6 lines
sync to -current

Revision 1.134.4.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 20:31:49 2012 UTC (14 years, 8 months ago) by sborrill
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +6 -2 lines
Pull up the following revisions(s) (requested by nonaka in ticket #83):
	sys/dev/ic/rtl8169.c:	revision 1.135
	sys/dev/ic/rtl81x9reg.h:	revision 1.43

Add RTL8168E/8111E-VL support.

Revision 1.134.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 4 00:46:19 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +6 -2 lines
sync to latest -current.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Fri Mar 2 16:23:40 2012 UTC (14 years, 8 months ago) by nonaka
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base4, jmcneill-usbmp-base10
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +6 -2 lines
Added RTL8168E/8111E-VL support.

Revision 1.105.4.9: download - view: text, markup, annotated - select for diffs
Wed Jan 25 18:02:44 2012 UTC (14 years, 9 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.105.4.8: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.8: +11 -2 lines
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

Revision 1.134: download - view: text, markup, annotated - select for diffs
Tue Nov 22 18:42:56 2011 UTC (14 years, 11 months ago) by garbled
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base5, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base
Branch point for: netbsd-6, jmcneill-usbmp
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +11 -2 lines
Add support to recognize the 8168E model of this chip.  Taken from FreeBSD

Revision 1.129.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:19 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.129.4.1: preferred, colored; branchpoint 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.4.1: +6 -3 lines
sync with head

Revision 1.129.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:46:12 2010 UTC (16 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.129.2.1: preferred, colored; branchpoint 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.2.1: +4 -1 lines
Sync with HEAD.

Revision 1.102.2.7: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:30 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.6: preferred, colored; branchpoint 1.102: preferred, colored; next MAIN 1.103: preferred, colored
Changes since revision 1.102.2.6: +9 -7 lines
sync with head.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Wed Jul 28 23:30:21 2010 UTC (16 years, 3 months ago) by msaitoh
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +3 -3 lines
The ETHERCAP_VLAN_HWTAGGING flag is not a member of if_cap but ec_cap,
so fix it.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Jul 27 21:02:00 2010 UTC (16 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +5 -2 lines
Make the Realtek PCI network interfaces detachable.
Use __arraycount to avoid null table entries.
Miscellaneous other touch-ups in bus front-ends.

Revision 1.129.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:24 2010 UTC (16 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +5 -6 lines
sync with head

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:21 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +5 -6 lines
Sync with HEAD.

Revision 1.105.4.2.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:27:37 2010 UTC (16 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.105.4.2: preferred, colored; next MAIN 1.105.4.3: preferred, colored
Changes since revision 1.105.4.2: +136 -81 lines
sync to netbsd-5

Revision 1.131: download - view: text, markup, annotated - select for diffs
Fri Apr 9 10:40:59 2010 UTC (16 years, 7 months ago) by nonaka
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +3 -2 lines
Added 8110SBL support.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Apr 5 07:19:36 2010 UTC (16 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +4 -6 lines
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.102.2.6: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:34 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.5: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.5: +4 -11 lines
sync with head

Revision 1.129: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:06:25 2010 UTC (16 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -11 lines
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.

Revision 1.102.2.5: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:37:48 2009 UTC (17 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.4: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.4: +19 -21 lines
sync with head

Revision 1.128: download - view: text, markup, annotated - select for diffs
Tue Sep 15 19:29:17 2009 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, matt-premerge-20091211, jym-xensuspend-nbase
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +5 -12 lines
Simplify activation routines: do not call mii_activate(), it is a
no-op.  Do not block interrupts, if_deactivate() will take care of
that for us.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Sat Sep 5 08:23:24 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -3 lines
Remove one more extra whitespace.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Sat Sep 5 03:50:49 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +5 -5 lines
Remove unnecessary whitespace.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Wed Sep 2 15:11:13 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +10 -2 lines
Move pmf(9) calls to MI re_attach() and re_detach() from each backend.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Mon Aug 31 13:05:30 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -2 lines
Treat 8168DP as well as 8168C/CP/D. From FreeBSD.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sat Aug 29 14:06:22 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +3 -4 lines
- no need to include "vlan.h" since no NVLAN reference
- whitespace in comment

Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Aug 27 16:02:26 2009 UTC (17 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +3 -6 lines
Remove an unnecessary assignment. No binary change.

Revision 1.72.2.11: download - view: text, markup, annotated - select for diffs
Tue Aug 18 09:46:51 2009 UTC (17 years, 3 months ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.72.2.10: preferred, colored; branchpoint 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72.2.10: +80 -69 lines
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

Revision 1.107.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:48 2009 UTC (17 years, 3 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.107.2.1: preferred, colored; branchpoint 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107.2.1: +45 -21 lines
Sync with HEAD.

Revision 1.102.2.4: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:22 2009 UTC (17 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.3: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.3: +45 -21 lines
sync with head

Revision 1.105.4.8: download - view: text, markup, annotated - select for diffs
Fri Jun 19 21:51:43 2009 UTC (17 years, 5 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.105.4.7: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.7: +81 -70 lines
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.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun May 31 05:10:47 2009 UTC (17 years, 5 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +45 -21 lines
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.

Revision 1.102.2.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:24 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.2: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.2: +8 -8 lines
sync with head

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:19:24 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +108 -74 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Tue May 12 14:25:18 2009 UTC (17 years, 6 months ago) by cegger
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, jym-xensuspend-base
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +7 -7 lines
struct device * -> device_t, no functional changes intended.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Mon May 11 15:42:34 2009 UTC (17 years, 6 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -3 lines
- rename RTK_HWREV_8102EL_SPIN2 -> RTK_HWREV_8103E
- add a HWREV value for 8168DP
Per Realtek's Linux drivers.

Revision 1.102.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:43 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102.2.1: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.1: +120 -72 lines
sync with head.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sun May 3 13:49:07 2009 UTC (17 years, 6 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base3
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +7 -32 lines
Remove unused sc_rev settings (all quirks are handled by sc_quirk)
and merge HWREV cases which have the same quirks.

Revision 1.105.4.7: download - view: text, markup, annotated - select for diffs
Fri May 1 02:11:15 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105.4.6: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.6: +13 -19 lines
Pull up following revision(s) (requested by tsutsui in ticket #597):
	sys/dev/ic/rtl8169.c: revision 1.113
Fix another botch in hwcsum changes for PR kern/40955:
8168/8111/8168B/8111B doesn't have DESCV2.
Problem reported by Arto Huusko on current-users@.

Revision 1.105.4.6: download - view: text, markup, annotated - select for diffs
Fri May 1 02:10:03 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105.4.5: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.5: +3 -3 lines
Pull up following revision(s) (requested by tsutsui in ticket #597):
	sys/dev/ic/rtl8169.c: revision 1.112
	sys/dev/ic/rtl81x9reg.h: revision 1.35
Check a correct bit for ip4csum-rx.  Reported privately on PR kern/40955.

Revision 1.105.4.5: download - view: text, markup, annotated - select for diffs
Fri May 1 02:08:29 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105.4.4: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.4: +6 -5 lines
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.

Revision 1.105.4.4: download - view: text, markup, annotated - select for diffs
Fri May 1 02:07:04 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105.4.3: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.3: +26 -9 lines
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.

Revision 1.105.4.3: download - view: text, markup, annotated - select for diffs
Fri May 1 02:03:44 2009 UTC (17 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105.4.2: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.2: +46 -14 lines
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.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Apr 29 15:10:57 2009 UTC (17 years, 6 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +30 -24 lines
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.

Revision 1.105.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:35:27 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.105.2.1: preferred, colored; branchpoint 1.105: preferred, colored; next MAIN 1.106: preferred, colored
Changes since revision 1.105.2.1: +79 -26 lines
Sync with HEAD.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Mon Apr 13 12:38:06 2009 UTC (17 years, 7 months ago) by tsutsui
Branches: MAIN
CVS tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +5 -2 lines
Assume an unknown HWREV chip has the same features with the latest one.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Apr 13 12:33:05 2009 UTC (17 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +3 -2 lines
Add HWREV of RTL8102EL variant.  From FUKAUMI Naoki.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Mon Apr 13 12:28:46 2009 UTC (17 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -2 lines
Add HWREV values of RTL8168CP and RTL8168D.  From FreeBSD.

XXX: needs more quirk handling after wakeup for newer chips.

Revision 1.72.2.10: download - view: text, markup, annotated - select for diffs
Tue Mar 31 18:22:02 2009 UTC (17 years, 7 months ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.72.2.9: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.9: +156 -70 lines
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)

Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Mar 28 22:16:08 2009 UTC (17 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +13 -19 lines
Fix another botch in hwcsum changes for PR kern/40955:
8168/8111/8168B/8111B doesn't have DESCV2.

Problem reported by Arto Huusko on current-users@.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Mar 27 12:19:17 2009 UTC (17 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -3 lines
Check a correct bit for ip4csum-rx.  Reported privately on PR kern/40955.

Revision 1.105.4.2: download - view: text, markup, annotated - select for diffs
Thu Mar 26 17:36:03 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.105.4.1: preferred, colored; branchpoint 1.105: preferred, colored
Changes since revision 1.105.4.1: +19 -18 lines
Pull up following revision(s) (requested by tsutsui in ticket #597):
	sys/dev/ic/rtl8169.c: revision 1.106
	sys/dev/ic/rtl81x9reg.h: revision 1.33
Add support for a 8168C/8111C revision
 - also disable jumbo frame on this adapter following the FreeBSD driver
 - merge redundant call to aprint_error_dev

Revision 1.105.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 24 20:38:38 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +11 -8 lines
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.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sat Mar 21 10:05:28 2009 UTC (17 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +6 -5 lines
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.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Sat Mar 21 09:18:06 2009 UTC (17 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +26 -9 lines
Add and use a new quirk flag to disable JUMBO MTU,
rather than checking sc_rev values.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Sat Mar 21 07:58:30 2009 UTC (17 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +46 -14 lines
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.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Fri Mar 20 06:31:31 2009 UTC (17 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +11 -8 lines
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.

Revision 1.105.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:17:56 2009 UTC (17 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +20 -19 lines
Sync with HEAD.

Revision 1.96.6.4: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:56 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.96.6.3: preferred, colored; branchpoint 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96.6.3: +18 -17 lines
Sync with HEAD.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Jan 3 03:43:22 2009 UTC (17 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -3 lines
remove extra semicolons.

Revision 1.104.6.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:14:14 2008 UTC (17 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.104.6.1: preferred, colored; branchpoint 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104.6.1: +19 -18 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon Dec 8 03:24:08 2008 UTC (17 years, 11 months ago) by alc
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +19 -18 lines
Add support for a 8168C/8111C revision

 - also disable jumbo frame on this adapter following the FreeBSD driver
 - merge redundant call to aprint_error_dev

Revision 1.104.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:16:27 2008 UTC (18 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +16 -3 lines
Sync with HEAD.

Revision 1.96.6.3: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:23 2008 UTC (18 years, 1 month ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.96.6.2: preferred, colored; branchpoint 1.96: preferred, colored
Changes since revision 1.96.6.2: +14 -1 lines
Sync with HEAD.

Revision 1.104.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:35:04 2008 UTC (18 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104: +16 -3 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Aug 23 14:27:45 2008 UTC (18 years, 2 months ago) by tnn
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +16 -3 lines
Add support for the Realtek 8102E/8102EL PCIe 10/100 Ethernet devices.
From FreeBSD.

Revision 1.72.2.7.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 3 20:47:19 2008 UTC (18 years, 5 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.72.2.7.2.1: preferred, colored; next MAIN 1.72.2.8: preferred, colored
Changes since revision 1.72.2.7.2.1: +20 -21 lines
Sync with netbsd-4.

Revision 1.96.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:23:27 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.96.6.1: preferred, colored; branchpoint 1.96: preferred, colored
Changes since revision 1.96.6.1: +215 -262 lines
Sync with HEAD.

Revision 1.99.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:33:45 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.99: preferred, colored; next MAIN 1.100: preferred, colored
Changes since revision 1.99: +211 -241 lines
sync with head.

Revision 1.102.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:24:06 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +66 -42 lines
sync with head.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Tue May 6 11:45:00 2008 UTC (18 years, 6 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +64 -40 lines
- use RTK_IDR[0-5] registers to get MAC address on RTL8168C
- change sc_rev numbers to match quirk numbers used in Realtek's driver
- tweak some register definitions
Taken from Realtek's FreeBSD driver.

Untested yet on 8168C, but no bad sideeffect on older chips.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Tue Apr 29 14:16:57 2008 UTC (18 years, 6 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +4 -4 lines
Fix a leakage on device_t/softc split.  PR kern/38541 from HITOSHI OSADA.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Apr 25 11:27:19 2008 UTC (18 years, 6 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +120 -120 lines
Split device_t/softc for re(4) and rtk(4).

Revision 1.101: download - view: text, markup, annotated - select for diffs
Fri Apr 18 19:01:15 2008 UTC (18 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +57 -39 lines
- use aprint_*() variants only in functions called during autoconf(9)
- wrap long lines

Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Apr 18 16:05:30 2008 UTC (18 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +2 -74 lines
NetBSD has no such thing as DEVICE_POLLING, so remove it.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Apr 8 12:07:27 2008 UTC (18 years, 7 months ago) by cegger
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +46 -63 lines
use aprint_*_dev and device_xname

Revision 1.96.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:42 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +16 -17 lines
Sync with HEAD.

Revision 1.72.2.9: download - view: text, markup, annotated - select for diffs
Mon Mar 24 20:50:33 2008 UTC (18 years, 7 months ago) by bouyer
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.72.2.8: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.8: +20 -21 lines
Pull up following revision(s) (requested by tsutsui in ticket #1105):
	sys/dev/ic/rtl8169.c: revisions 1.94, 1.95, 1.97, 1.98
	sys/dev/ic/rtl81x9reg.h: revision 1.28
No need to preserve RE_NTXDESC_RSVD on re_start().
FreeBSD says "16 bits" comment about RTK_GTXSTART was incorrect.
Use CSR_WRITE_1() for it. (though the previous code also worked)
Don't fetch DMA descriptor after BUS_DMASYNC_PREREAD op.
It looks vlan tag info must appear not only in the first descriptor
but in all descriptors of a multi-descriptor transmission attempt on re(4).
Problem was reported and fix was confirmed by Chris Brookes on tech-net.
Should also close PR kern/37959.

Revision 1.20.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:38:50 2008 UTC (18 years, 7 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.9: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.2.9: +15 -16 lines
sync with head.

Revision 1.96.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:15:17 2008 UTC (18 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +16 -17 lines
sync with head.

Revision 1.88.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:39 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.88.2.2: preferred, colored; branchpoint 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88.2.2: +38 -67 lines
sync with HEAD

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Mar 18 14:06:56 2008 UTC (18 years, 8 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +15 -16 lines
It looks vlan tag info must appear not only in the first descriptor
but in all descriptors of a multi-descriptor transmission attempt on re(4).

Problem was reported and fix was confirmed by Chris Brookes on tech-net.
Should also close PR kern/37959.

Revision 1.20.2.9: download - view: text, markup, annotated - select for diffs
Mon Mar 17 09:14:43 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.8: preferred, colored
Changes since revision 1.20.2.8: +3 -3 lines
sync with head.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Fri Mar 14 13:42:01 2008 UTC (18 years, 8 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -3 lines
Don't fetch DMA descriptor after BUS_DMASYNC_PREREAD op.

Revision 1.89.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:05:41 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89: +27 -51 lines
Sync with HEAD.

Revision 1.20.2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 11 14:59:33 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.7: preferred, colored
Changes since revision 1.20.2.7: +18 -12 lines
sync with head.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Feb 7 01:21:54 2008 UTC (18 years, 9 months ago) by dyoung
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +16 -10 lines
Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon Feb 4 15:16:49 2008 UTC (18 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +4 -4 lines
FreeBSD says "16 bits" comment about RTK_GTXSTART was incorrect.
Use CSR_WRITE_1() for it. (though the previous code also worked)

Revision 1.20.2.7: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:23:25 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.6: preferred, colored
Changes since revision 1.20.2.6: +5 -5 lines
sync with head.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Feb 3 17:14:35 2008 UTC (18 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +5 -5 lines
No need to preserve RE_NTXDESC_RSVD on re_start().

Revision 1.20.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:43:06 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.5: preferred, colored
Changes since revision 1.20.2.5: +8 -112 lines
sync with head

Revision 1.90.2.3: download - view: text, markup, annotated - select for diffs
Sun Jan 20 17:51:33 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.90.2.2: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.2.2: +3 -37 lines
Sync with HEAD

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Jan 19 22:10:17 2008 UTC (18 years, 10 months ago) by dyoung
Branches: MAIN
CVS tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +5 -39 lines
Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.

Revision 1.88.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:52:59 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.88.2.1: preferred, colored; branchpoint 1.88: preferred, colored
Changes since revision 1.88.2.1: +5 -75 lines
sync with HEAD

Revision 1.90.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:05 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.90.2.1: preferred, colored
Changes since revision 1.90.2.1: +3 -0 lines
Sync with HEAD

Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue Jan 8 15:50:35 2008 UTC (18 years, 10 months ago) by joerg
Branches: MAIN
CVS tags: matt-armv6-base
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +5 -2 lines
Short-cut interrupt processing if device has been suspended.
uvm_fault reported by xtraeme.

Revision 1.89.4.1: download - view: text, markup, annotated - select for diffs
Wed Dec 26 19:46:22 2007 UTC (18 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89: +2 -75 lines
Sync with head.

Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 21:55:36 2007 UTC (18 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -1 lines
Sync with HEAD

Revision 1.89.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:27:41 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89: +2 -75 lines
sync with head.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Tue Dec 11 11:52:26 2007 UTC (18 years, 11 months ago) by lukem
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, vmlocking2-base3, cube-autoconf-base, cube-autoconf
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -1 lines
use __KERNEL_RCSID()

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:27:59 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
Branch point for: bouyer-xeni386
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +1 -75 lines
Merge jmcneill-pm branch.

Revision 1.88.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:27:04 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2 lines
sync with HEAD

Revision 1.20.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:30:59 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.4: preferred, colored
Changes since revision 1.20.2.4: +2 -2 lines
sync with head.

Revision 1.86.6.3: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:44:59 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.86.6.2: preferred, colored; branchpoint 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86.6.2: +2 -2 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.88.6.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:37:55 2007 UTC (19 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +2 -2 lines
Sync with HEAD.

Revision 1.83.2.6: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:07:41 2007 UTC (19 years ago) by ad
Branches: vmlocking
Diff to: previous 1.83.2.5: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83.2.5: +2 -2 lines
Sync with head.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Oct 19 11:59:59 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: yamt-kmem, vmlocking2, mjf-devfs
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.83.2.5: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:41:30 2007 UTC (19 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.83.2.4: preferred, colored
Changes since revision 1.83.2.4: +3 -3 lines
Sync with head.

Revision 1.86.6.2: download - view: text, markup, annotated - select for diffs
Fri Oct 5 01:08:57 2007 UTC (19 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.86.6.1: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.6.1: +1 -75 lines
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.

Revision 1.14.2.7: download - view: text, markup, annotated - select for diffs
Thu Oct 4 18:50:22 2007 UTC (19 years, 1 month ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.14.2.6: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.6: +50 -37 lines
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

Revision 1.86.6.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:48:07 2007 UTC (19 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -5 lines
Sync with HEAD.

Revision 1.20.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:35:08 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.3: preferred, colored
Changes since revision 1.20.2.3: +63 -50 lines
sync with head.

Revision 1.86.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:20:25 2007 UTC (19 years, 2 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86: +5 -5 lines
Sync with HEAD.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Aug 27 14:48:54 2007 UTC (19 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: matt-armv6, bouyer-xenamd64
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
Constify: use CLLADDR() instead of LLADDR() wherever possible.

Revision 1.83.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:36:52 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.83.2.3: preferred, colored
Changes since revision 1.83.2.3: +3 -3 lines
Sync with HEAD.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Aug 19 16:11:46 2007 UTC (19 years, 3 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -3 lines
FALSE -> false, TRUE -> true

Revision 1.83.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:06:09 2007 UTC (19 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +51 -38 lines
Sync with head.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:00:38 2007 UTC (19 years, 4 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +2 -2 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.83.2.3: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:47:53 2007 UTC (19 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.83.2.2: preferred, colored
Changes since revision 1.83.2.2: +2 -2 lines
Adapt to callout API change.

Revision 1.72.2.7.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 3 17:26:02 2007 UTC (19 years, 5 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.72.2.7: preferred, colored
Changes since revision 1.72.2.7: +50 -37 lines
Catch up with now-somewhat-dated netbsd-4. These changes took longer
than expected for me to actually get around to merging.

Revision 1.83.2.2: download - view: text, markup, annotated - select for diffs
Sun May 27 14:30:06 2007 UTC (19 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.83.2.1: preferred, colored
Changes since revision 1.83.2.1: +15 -3 lines
Sync with head.

Revision 1.81.2.4: download - view: text, markup, annotated - select for diffs
Thu May 17 13:41:25 2007 UTC (19 years, 6 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.81.2.3: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81.2.3: +15 -3 lines
sync with head.

Revision 1.72.2.8: download - view: text, markup, annotated - select for diffs
Wed May 16 20:44:59 2007 UTC (19 years, 6 months ago) by jdc
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.72.2.7: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.7: +50 -37 lines
Pull up revisions 1.84-1.85 (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.

Pull a fix for PCIe variants from FreeBSD's if_re.c rev 1.71:

> - With the PCIe devices, it looks issuing a TX command while there's
>   already a transmission in progress doesn't have any effect. In other
>   words, if you send two packets in rapid succession, the second one may
>   end up sitting in the TX DMA ring until another transmit command is
>   issued later in the future. Basically, if re_txeof() sees that there
>   are still descriptors outstanding, it needs to manually resume the
>   TX DMA channel by issuing another TX command to make sure all
>   transmissions are flushed out. (The PCI devices seem to keep the
>   TX channel moving until all descriptors have been consumed. I'm not
>  sure why the PCIe devices behave differently.)

Revision 1.85: download - view: text, markup, annotated - select for diffs
Thu May 10 14:04:47 2007 UTC (19 years, 6 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +15 -3 lines
Pull a fix for PCIe variants from FreeBSD's if_re.c rev 1.71:

> - With the PCIe devices, it looks issuing a TX command while there's
>   already a transmission in progress doesn't have any effect. In other
>   words, if you send two packets in rapid succession, the second one may
>   end up sitting in the TX DMA ring until another transmit command is
>   issued later in the future. Basically, if re_txeof() sees that there
>   are still descriptors outstanding, it needs to manually resume the
>   TX DMA channel by issuing another TX command to make sure all
>   transmissions are flushed out. (The PCI devices seem to keep the
>   TX channel moving until all descriptors have been consumed. I'm not
>  sure why the PCIe devices behave differently.)

Revision 1.83.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:24:31 2007 UTC (19 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +36 -35 lines
Sync with head.

Revision 1.83.6.1: download - view: text, markup, annotated - select for diffs
Thu Mar 29 19:27:45 2007 UTC (19 years, 7 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +36 -35 lines
Pullup to -current

Revision 1.81.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:55:28 2007 UTC (19 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.81.2.2: preferred, colored
Changes since revision 1.81.2.2: +36 -35 lines
sync with head.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Wed Mar 21 12:17:31 2007 UTC (19 years, 8 months ago) by tsutsui
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +36 -35 lines
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.

Revision 1.81.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:53:42 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.81.2.1: preferred, colored
Changes since revision 1.81.2.1: +9 -9 lines
Sync with HEAD.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:02:00 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +9 -9 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.14.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 3 23:30:24 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.14.2.5: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.5: +593 -608 lines
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

Revision 1.81.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:53:53 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -2 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.20.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:10:11 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.2: preferred, colored
Changes since revision 1.20.2.2: +37 -45 lines
sync with head.

Revision 1.72.2.7: download - view: text, markup, annotated - select for diffs
Sat Feb 24 13:25:29 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-4
Branch point for: wrstuden-fixsa
Diff to: previous 1.72.2.6: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.6: +3 -3 lines
Pull up following revision(s) (requested by tsutsui in ticket #462):
	sys/dev/ic/rtl8169.c: revision 1.80 - 1.81
	sys/dev/ic/rtl81x9.c: revision 1.70
Use new RTK_HWREV_8100E_SPIN2 macro. (missed in the previous)
Don't set RTK_CFG1_FULLDUPLEX bit in RTK_CFG1 register
since it's available only on RTL8129. From FreeBSD.
As defined in rtl81x9reg.h, bits of 0x80 and 0x40 in RTK_CFG1
seem to indicate LEDS0 and LEDS1 configuration initialized by
EEPROM settings, and they seem read only on my quick tests with
two 8169S based cards.
RTK_HWREV_8100E_SPIN2 is a PCIe device so also check it
in rtk_setmulti() to handle quirk. Noticed by OpenBSD.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Feb 21 22:59:59 2007 UTC (19 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -2 lines
Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Feb 15 12:33:57 2007 UTC (19 years, 9 months ago) by tsutsui
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -2 lines
Don't set RTK_CFG1_FULLDUPLEX bit in RTK_CFG1 register
since it's available only on RTL8129. From FreeBSD.

As defined in rtl81x9reg.h, bits of 0x80 and 0x40 in RTK_CFG1
seem to indicate LEDS0 and LEDS1 configuration initialized by
EEPROM settings, and they seem read only on my quick tests with
two 8169S based cards.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Thu Feb 15 12:24:56 2007 UTC (19 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -2 lines
Use new RTK_HWREV_8100E_SPIN2 macro. (missed in the previous)

Revision 1.72.2.6: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:29:06 2007 UTC (19 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.72.2.5: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.5: +2 -2 lines
Pull up following revision(s) (requested by tsutsui in ticket #437):
	sys/dev/ic/rtl8169.c: revision 1.79
Clear IFF_OACTIVE in re_txeof() only if there are more than RE_TXDESC_RSVD
free TXDESCs. From FreeBSD, but I'm still wondering why we have to reserve
some free TXDESCs even on re_start().

Revision 1.72.2.5: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:27:49 2007 UTC (19 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.72.2.4: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.4: +20 -7 lines
Pull up following revision(s) (requested by tsutsui in ticket #437):
	sys/dev/ic/rtl8169.c: revision 1.78
- check more hwrev and use HWREV_* macro. From Realtek driver
  via Darrin B.Jewell.
  XXX: maybe we should check this sc_rev on more place
- use RTK_TXCFG_HWREV (0x7cc00000) rather than 0x7c800000
  to mask the hwrev value since bit 0x00400000 is used only by 8139D
  which is not supported by this driver
- fix a tyop

Revision 1.72.2.4: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:25:58 2007 UTC (19 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.72.2.3: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.3: +15 -36 lines
Pull up following revision(s) (requested by tsutsui in ticket #437):
	sys/dev/ic/rtl81x9.c: revision 1.67
	sys/dev/ic/rtl8169.c: revision 1.77
Fix EEPROM functions for RTL8169SC chips:
rtl81x9.c:
 Increase delay on EEPROM access since EEPROM on RTL8169 based board
 seems to require slower clock. Also use common EE_DELAY() macro.
rtl8169.c:
 Use common rtk_read_eeprom() function to get Ethernet address on
 8169 chips because EEMODE_AUTOLOAD command was a workaround on
 original FreeBSD's driver and it doesn't work on 8169SC.
Problem reported and fix tested by Frank Lorenzen on current-users,
and also tested on 8139C with rtk(4) driver by me.

Revision 1.72.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:24:36 2007 UTC (19 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.72.2.2: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.2: +4 -3 lines
Pull up following revision(s) (requested by tsutsui in ticket #437):
	sys/dev/ic/rtl8169.c: revision 1.76
Wrap a sanity check in re_newbuf() with #ifdef DIAGNOSTIC and
make it fatal on failure.

Revision 1.72.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:23:51 2007 UTC (19 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.72.2.1: preferred, colored; branchpoint 1.72: preferred, colored
Changes since revision 1.72.2.1: +6 -6 lines
Pull up following revision(s) (requested by tsutsui in ticket #437):
	sys/dev/ic/rtl8169.c: revision 1.75
Use __predict_false() in several conditionals.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sat Feb 10 12:46:29 2007 UTC (19 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -2 lines
Clear IFF_OACTIVE in re_txeof() only if there are more than RE_TXDESC_RSVD
free TXDESCs. From FreeBSD, but I'm still wondering why we have to reserve
some free TXDESCs even on re_start().

Revision 1.25.4.4: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:03:51 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.25.4.3: preferred, colored; branchpoint 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25.4.3: +20 -7 lines
Sync with HEAD.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Feb 4 04:49:58 2007 UTC (19 years, 9 months ago) by tsutsui
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +20 -7 lines
- check more hwrev and use HWREV_* macro. From Realtek driver
  via Darrin B.Jewell.
  XXX: maybe we should check this sc_rev on more place
- use RTK_TXCFG_HWREV (0x7cc00000) rather than 0x7c800000
  to mask the hwrev value since bit 0x00400000 is used only by 8139D
  which is not supported by this driver
- fix a tyop

Revision 1.25.4.3: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:20 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.25.4.2: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.2: +15 -36 lines
Sync with head.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon Jan 29 12:11:42 2007 UTC (19 years, 9 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +15 -36 lines
Fix EEPROM functions for RTL8169SC chips:

rtl81x9.c:
 Increase delay on EEPROM access since EEPROM on RTL8169 based board
 seems to require slower clock. Also use common EE_DELAY() macro.

rtl8169.c:
 Use common rtk_read_eeprom() function to get Ethernet address on
 8169 chips because EEMODE_AUTOLOAD command was a workaround on
 original FreeBSD's driver and it doesn't work on 8169SC.

Problem reported and fix tested by Frank Lorenzen on current-users,
and also tested on 8139C with rtk(4) driver by me.

Revision 1.25.4.2: download - view: text, markup, annotated - select for diffs
Fri Jan 12 00:57:36 2007 UTC (19 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.25.4.1: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.1: +105 -77 lines
Sync with head.

Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:48:04 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20.2.1: preferred, colored
Changes since revision 1.20.2.1: +552 -574 lines
sync with head.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Dec 26 13:45:43 2006 UTC (19 years, 10 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +4 -3 lines
Wrap a sanity check in re_newbuf() with #ifdef DIAGNOSTIC and
make it fatal on failure.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Dec 26 13:40:58 2006 UTC (19 years, 10 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +7 -7 lines
Use __predict_false() in several conditionals.

Revision 1.72.2.1: download - view: text, markup, annotated - select for diffs
Wed Dec 20 22:27:57 2006 UTC (19 years, 11 months ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +8 -22 lines
Pull up following revision(s) (requested by tsutsui in ticket #283):
	share/man/man4/re.4: revision 1.11
	sys/dev/ic/rtl8169.c: revision 1.74
Fix and reenable HW VLAN tagging on re(4).
Closes PR kern/32643 and also fixes HW VLAN tagging on big endian machines.

Revision 1.25.6.3: download - view: text, markup, annotated - select for diffs
Mon Dec 18 11:42:13 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.25.6.2: preferred, colored; branchpoint 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25.6.2: +8 -22 lines
sync with head.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Dec 16 02:52:17 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +8 -22 lines
Fix and reenable HW VLAN tagging on re(4):
- clear re_vlanctl in DMA descriptors before starting TX and RX
  to avoid stale tags
- use bswap16() rather than be16toh() or htons() on VLAN tag access
  since we already use htole32()

Closes PR kern/32643 and also fixes HW VLAN tagging on big endian machines.

Revision 1.25.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:17:07 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.25.6.1: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.6.1: +484 -466 lines
sync with head.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Dec 6 13:52:46 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-splraiseipl-base3
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +1 -5 lines
No need to include PCI header files.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Nov 29 14:13:15 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
CVS tags: netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -3 lines
Remove mii_mediachg() call from re_init().
It causes a few second TRX stalls on each ioctls
(on ifconfig(8) or tcpdump(8) etc.) and PHY seems
initialized properly without it at least on RTL8169S
with internal rgephy(4) PHY. Closes PR kern/34517.

XXX: maybe we should also test this on the original RTL8169
     with external makphy(4).

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Nov 25 02:42:18 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +9 -10 lines
- 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

Revision 1.70: download - view: text, markup, annotated - select for diffs
Fri Nov 24 16:30:45 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +22 -5 lines
Change RXFIFO, RXDMA and TXDMA configrations to values taken from
the Reaktek's driver, which are also used in FreeBSD.
Fixes RX FIFO overrun errors on my Duron 1300MHz PC.
(Note the configuration values for rtk(4) are not changed)

Also add some debug printf's in RX error case (disabled by default).

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Nov 22 14:32:28 2006 UTC (19 years, 11 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -2 lines
Umm, fix typo.

Revision 1.25.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:34:14 2006 UTC (20 years ago) by ad
Branches: newlock2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +484 -534 lines
Sync with head.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Nov 18 17:39:44 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +7 -12 lines
No need to check ifp->if_capenable on RX checksumming.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Nov 18 10:37:24 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -6 lines
Fix some comments.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Nov 18 07:40:13 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -3 lines
Replace magic numbers with macro.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Nov 18 00:21:36 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +2 -1 lines
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.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Nov 17 21:49:49 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +16 -9 lines
Prepare and use an inline function which sets 64 bit DMA address into
struct re_desc to avoid unnecessary 64 bit arithmetic on ILP32 ports.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Nov 17 21:29:36 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +43 -13 lines
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.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:32:52 2006 UTC (20 years ago) by christos
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
__unused removal on arguments; approved by core.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Nov 12 15:12:02 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
Replace RTK_ETHER_ALIGN with RE_ETHER_ALIGN, which I missed.
Pointed out by dieter roelants in PR kern/35041.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Nov 12 12:02:19 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2 lines
Remove an extra semicolon.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun Nov 12 03:09:37 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +191 -222 lines
- 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

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Nov 11 13:51:44 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +6 -8 lines
Minor style tweaks in re_txeof().

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Nov 11 12:41:56 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +6 -9 lines
Some minor tweaks in re_intr():
- check status bits at once (I'm not sure how gcc optimized them though)
- no need to check (ifp->if_flags & IFF_UP) twice
  (re_init() must be called at splnet() anyway)
- call re_start() only if the interrupt is actually handled here
- call re_start() directly rather than via (*ifp->if_start)()

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Nov 11 12:13:55 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -3 lines
Clear a TX timeout only if all queued packets are handled.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Nov 11 12:04:08 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +1 -3 lines
Remove a leftover comment.
(note bus_dmamap_sync(9) is still needed even if no changes are made to
 DMA descriptors but once they are fetched into the CPU cache)

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Nov 11 11:31:30 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +17 -16 lines
- set descriptor DMA addresses before enabling TX and RX
- set RTK_EARLY_TX_THRESH before starting TX and RX

Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Nov 10 21:49:02 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -3 lines
Call re_reset() after re_stop() in re_init().
Without this, re(4) on my macppc sometimes falls into mangled state
and generates many errors after ifconfig(8) or tcpdump(8) etc.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Nov 5 16:52:10 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +232 -232 lines
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.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Nov 3 17:16:58 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +9 -1 lines
Pull a 8139C+ fix from FreeBSD if_re.c rev 1.73:
Ignore BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+.

Tested by Brian A. Seklecki.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Oct 28 03:42:55 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +26 -25 lines
Put common data for each RX DMA descriptor into a new rxsoft structure
for micro optimization.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Oct 27 13:26:34 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +8 -6 lines
Remove redundant byteswap ops.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Oct 24 11:17:49 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -3 lines
Set RTK_RDESC_CMD_OWN in rtk_cmdstat of RX DMA descriptor after
all other descriptor data is written to avoid possible race condition.

Revision 1.25.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:05:45 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +169 -196 lines
sync with head

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Oct 22 01:47:53 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +6 -5 lines
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.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Oct 22 01:23:39 2006 UTC (20 years ago) by tsutsui
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +10 -10 lines
Rename a variable to clarify meaning of index.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Oct 21 21:29:14 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +15 -16 lines
Tweak TX descriptor setup code in re_encap() to make it more readable a bit.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Oct 21 16:13:21 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -3 lines
Use aprint_error(9) to print error messages.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Oct 21 03:44:47 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -2 lines
Use CSR_WRITE_1() to write RTK_TXSTART register because it is localted
at an odd address (0xd9) and noted "8 bit" in rtl81x9reg.h.

XXX: FreeBSD and OpenBSD also use CSR_WRITE_1() to write RTK_GTXSTART
XXX: for 8169 even though there is a "16 bits" comment at GTXSTART macro.
XXX: Which is correct?

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Oct 20 17:11:36 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +8 -8 lines
In re_newbuf():
- adjust m_data and m_len directly rather than calling m_adj(9)
- more cosmetics

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Oct 20 16:46:47 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +50 -64 lines
KNF, remove register decls, TAB/space cosmetics etc.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Oct 20 16:31:08 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +20 -20 lines
u_intNN_t -> uintNN_t

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Oct 20 15:44:00 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
Use BUS_DMA_COHERENT on mapping DMA memory for TX/RX descriptors.
I can't think of a good way to avoid race condition between writeback and
DMA write against descriptors if cachelinesize > sizeof(struct rtk_desc)...

Anyway, now re(4) is functional on O2 (and probably other mips ports).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Oct 20 15:19:01 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +19 -25 lines
Try to avoid race condition between cache writeback from CPU and DMA write
from re(4) chip as much as possible.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Oct 20 14:51:06 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -4 lines
while (1) -> for (;;)

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Oct 20 14:28:55 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -5 lines
- bcopy -> memcpy
- bcmp -> memcmp

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Oct 20 14:00:49 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +5 -6 lines
There is no particular reason to use BUS_DMA_ALLOCNOW on bus_dmamap_create(9).

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Oct 20 13:44:31 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -8 lines
Tweak a for() loop a bit in re_rxeof().

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Oct 20 13:39:47 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -5 lines
Sync RX mbufs before setting up RX DMA descriptor.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Oct 20 11:30:54 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +49 -54 lines
- 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.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Oct 17 14:03:26 2006 UTC (20 years, 1 month ago) by tsutsui
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -3 lines
DMA memory for the TX ring should be aligned at RTK_RING_ALIGN,
not RTK_ETHER_ALIGN.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Oct 17 09:19:57 2006 UTC (20 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
re_diag: constify.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Oct 13 11:06:15 2006 UTC (20 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -1 lines
re_start: fix tx stall.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Oct 13 11:02:38 2006 UTC (20 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -2 lines
re_txeof: fix watchdog timeout.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:31:01 2006 UTC (20 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Sep 24 03:53:08 2006 UTC (20 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -2 lines
Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@

Revision 1.22.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:50:03 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +23 -6 lines
sync with head

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:23 2006 UTC (20 years, 4 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +3 -3 lines
Merge from HEAD.

Revision 1.22.8.2: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:51:02 2006 UTC (20 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.22.8.1: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.8.1: +5 -5 lines
sync with head.

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:02:56 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +27 -8 lines
sync with head.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 03:58:14 2006 UTC (20 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +5 -5 lines
Sync with head.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Jun 18 16:14:10 2006 UTC (20 years, 5 months ago) by rpaulo
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, rpaulo-netinet-merge-pcb-base, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -3 lines
Use IFQ_IS_EMPTY().

Revision 1.22.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:36:26 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +21 -4 lines
Sync with head.

Revision 1.14.2.5: download - view: text, markup, annotated - select for diffs
Wed May 31 21:32:56 2006 UTC (20 years, 5 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Diff to: previous 1.14.2.4: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.4: +20 -3 lines
Pull up following revision(s) (requested by pavel in ticket #1340):
	sys/dev/ic/rtl8169.c: revision 1.23
Disable hw VLAN tagging, in a similar way that it was done in OpenBSD
(src/sys/dev/ic/re.c rev. 1.15). The disabled VLAN stripping is mine.
(The OpenBSD driver forgot to do this.)
The reason is that untagged packets get sometimes tagged incorrectly.
PR 32643.
Approved by martin@.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri May 26 12:59:24 2006 UTC (20 years, 5 months ago) by blymn
Branches: MAIN
CVS tags: simonb-timecounters-base, gdamore-uart-base
Branch point for: gdamore-uart
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Clean up bogus whitespace

Revision 1.22.12.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:25 2006 UTC (20 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +21 -4 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.22.8.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:57:42 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +21 -4 lines
sync with head.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue May 16 22:39:24 2006 UTC (20 years, 6 months ago) by pavel
Branches: MAIN
CVS tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +21 -4 lines
Disable hw VLAN tagging, in a similar way that it was done in OpenBSD
(src/sys/dev/ic/re.c rev. 1.15). The disabled VLAN stripping is mine.
(The OpenBSD driver forgot to do this.)

The reason is that untagged packets get sometimes tagged incorrectly.
PR 32643.

Approved by martin@.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:21:28 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base, elad-kernelauth
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -1 lines
merge ktrace-lwp.

Revision 1.6.4.6: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:04:15 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.4.5: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.4.5: +28 -10 lines
Sync with HEAD. Here we go again...

Revision 1.14.2.4: download - view: text, markup, annotated - select for diffs
Thu Aug 18 20:40:38 2005 UTC (21 years, 3 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Diff to: previous 1.14.2.3: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.3: +5 -3 lines
Pull up revision 1.21 (requested by yamt in ticket #674):
specify dma direction hints for bus_dmamap_load_mbuf.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jul 11 21:42:58 2005 UTC (21 years, 4 months ago) by yamt
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -3 lines
specify dma direction hints for bus_dmamap_load_mbuf.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 19 20:11:24 2005 UTC (21 years, 6 months ago) by briggs
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +11 -3 lines
BUS_DMASYNC_* routines are from the point of view of the memory controller,
so BUS_DMASYNC_POSTREAD should follow a device->memory transfer (like for
the rx packet data.
Also, it would be good to do a BUS_DMASYNC_PREWRITE to ensure that packet
data is flushed to memory before the chip tries to transmit data.
Tested on a PowerPC system.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun May 15 07:48:49 2005 UTC (21 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -1 lines
disable IFCAP_CSUM_IPv4_Tx and comment why.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon May 2 15:34:31 2005 UTC (21 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +9 -6 lines
split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:28:52 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +217 -185 lines
sync with -current

Revision 1.14.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 4 17:29:32 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.14.2.2: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.2: +32 -15 lines
Pull up revision 1.17 (requested by yamt in ticket #94):
- use IFQ_POLL/DEQUEUE rather than IF_DEQUEUE/PREPEND.
- handle tx queue full correctly.

Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 4 17:26:09 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.14.2.1: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.1: +16 -6 lines
Pull up revision 1.16 (requested by yamt in ticket #92):
re_encap: set RTK_TDESC_CMD_IPCSUM if any of checksum offloading is requested.
otherwise, RTK_TDESC_CMD_TCPCSUM/UDPCSUM don't seem to make any effect.

Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 4 17:23:53 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +100 -94 lines
Pull up revision 1.15 (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.

Revision 1.6.4.5: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:29:52 2005 UTC (21 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.4.4: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.4: +188 -116 lines
Sync with HEAD.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Mar 30 11:38:06 2005 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +32 -15 lines
- use IFQ_POLL/DEQUEUE rather than IF_DEQUEUE/PREPEND.
- handle tx queue full correctly.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Mar 29 09:52:31 2005 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +16 -6 lines
re_encap: set RTK_TDESC_CMD_IPCSUM if any of checksum offloading is requested.
otherwise, RTK_TDESC_CMD_TCPCSUM/UDPCSUM don't seem to make any effect.

Revision 1.6.6.2: download - view: text, markup, annotated - select for diffs
Sat Mar 26 18:19:19 2005 UTC (21 years, 7 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.6.6.1: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.6.1: +100 -94 lines
sync with head.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Mar 23 20:23:08 2005 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
CVS tags: yamt-km-base4
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +100 -94 lines
- 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.

Revision 1.6.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:34:03 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +94 -95 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 14 10:08:17 2005 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
CVS tags: yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -9 lines
move the code to drop packets in the previous version
from re_encap to re_start so that other rtk_tx_free checks are
also covered.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Mar 12 08:01:51 2005 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +64 -21 lines
re(4) driver:
- TSO support.
- fix some error handling.
- remove mysterious RTK_NTXSEGS and use more appropriate values
  for bus_dmamap_create.
- if we need more than all of our tx descriptors in order to transmit a packet,
  just drop it rather than retrying infinitely.

Revision 1.6.4.4: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:41:32 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.4.3: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.3: +27 -57 lines
Sync with HEAD.

Hi Perry!

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Feb 27 00:27:02 2005 UTC (21 years, 8 months ago) by perry
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +17 -17 lines
nuke trailing whitespace

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Feb 23 09:20:46 2005 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -5 lines
re_init: correct usage of bus_dma(9).
now re@pci works on my alpha, in the case of !RE_USEIOSPACE.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Feb 23 09:19:38 2005 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -23 lines
remove unused macros.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Feb 20 15:56:03 2005 UTC (21 years, 9 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -15 lines
use VLAN_* macros for VLAN tag extraction/addition

Revision 1.6.4.3: download - view: text, markup, annotated - select for diffs
Tue Feb 15 21:33:12 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.4.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.2: +9 -19 lines
Sync with HEAD.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Feb 13 16:04:18 2005 UTC (21 years, 9 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +9 -15 lines
don't call re_rxeof a second time when we've already done the work
pull common code out from if and else clauses

from FreeBSD if_re.c rev. 1.33

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Feb 13 15:43:33 2005 UTC (21 years, 9 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -5 lines
g/c debug printf

Revision 1.6.4.2: download - view: text, markup, annotated - select for diffs
Mon Jan 17 19:30:40 2005 UTC (21 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.4.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.1: +2046 -0 lines
Sync with HEAD.

Revision 1.6.4.1
Thu Jan 13 14:24:24 2005 UTC (21 years, 10 months ago) by skrll
Branches: ktrace-lwp
FILE REMOVED
Changes since revision 1.6: +0 -2046 lines
file rtl8169.c was added on branch ktrace-lwp on 2005-01-17 19:30:40 +0000

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jan 13 14:24:24 2005 UTC (21 years, 10 months ago) by kanaoka
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km, ktrace-lwp, kent-audio2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +9 -25 lines
 - Move re_diag() from bus independend code to PCI attachment code.

XXX: I tested cardbus device,but not PCI device.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jan 9 12:25:25 2005 UTC (21 years, 10 months ago) by kanaoka
Branches: MAIN
CVS tags: kent-audio1-beforemerge
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +165 -99 lines
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*.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jan 9 12:15:36 2005 UTC (21 years, 10 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +146 -337 lines
 - Use aprint_*.
 - Remove unnecesarry code.
 - Changes some cosmetic.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Dec 26 07:27:41 2004 UTC (21 years, 10 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +19 -44 lines
 - Use ether_ioctl().
 - Remove unnecessary re_init() in re_attach().
 - Remove notyet compile option.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Dec 26 06:48:13 2004 UTC (21 years, 10 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -2 lines
 - Sync if_re.c(rev=1.6).

    When adding/deleting multicast addresses, only whack the address
    filter if the interface is marked RUNNING.

    Fixes kern/27678.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Dec 23 06:26:30 2004 UTC (21 years, 10 months ago) by jonathan
Branches: MAIN
Snapshot of incomplete-but-working split of re(4) driver into a
bus-independent backend, with PCI and CardBus attachment code.
The committed code has two serious bugs:

1. The driver makes no attempt to recover resources when a (Cardbus)
instance is removed; bus resources are leaked.

2. In testing with a NetGear GA-511, the Cardbus card never responded
   to a reset/wakeup if the card is powered down after attachment.
   So for now, leave cardbus instances powered up at attachment
   (insertion, or at boot if a card is already present).

That aside, it acutally works on my GA-511. Committed as-is despite
the bugs, after repeated requests to make the code available for
further testing.  Also requires sys/dev/mii/miidevs rev 1.54 -> 1.55,
and consequent regen of miidevs{,_data}.h.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>