The NetBSD Project

CVS log for src/sys/dev/pci/if_et.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Aug 1 20:46:01 2023 UTC (16 months, 1 week ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -3 lines
s/diabled/disabled/ in comments.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Sep 10 14:56:26 2021 UTC (3 years, 3 months ago) by jakllsch
Branches: MAIN
CVS tags: netbsd-10-base, 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, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -12 lines
if_et.c: nothing in this driver needs netinet includes now,
so drop #include "opt_inet.h" and the includes of netinet headers
conditioned on it.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Sep 10 14:43:04 2021 UTC (3 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -3 lines
No need to #include "vlan.h", as NVLAN is not used in these drivers now.

Revision 1.32.10.1: download - view: text, markup, annotated - select for diffs
Thu May 13 00:47:31 2021 UTC (3 years, 7 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32: +16 -19 lines
Sync with HEAD.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat May 8 00:27:02 2021 UTC (3 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +16 -19 lines
Use pci_compatible_match().

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:26 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.1: +236 -180 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Mar 1 15:15:49 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +7 -3 lines
Use the 64-bit PCI DMA tag if available.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:10 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +14 -28 lines
Sync with head.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Feb 28 05:13:19 2020 UTC (4 years, 9 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base3
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -19 lines
 Move PHY_RESET() in the media change path from if_et.c to etphy.c.

 I don't know if the reset is required or not. I tested some media
transitions without the reset and it worked. It might be OK to remove
but Linux does it only in et1011c_config_aneg(). So move the reset to
etphy_service(,,MII_MEDIACHG)'s autonego case. This change is also
required for future locking changes.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Feb 4 05:44:14 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -5 lines
Use ifmedia_fini().

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Jan 30 05:42:00 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +8 -8 lines
Adopt <net/if_stats.h>.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Nov 28 17:09:10 2019 UTC (5 years ago) by maxv
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +105 -104 lines
localify

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Thu Oct 17 19:02:54 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.24.2.1: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.1: +3 -10 lines
Pull up following revision(s) (requested by msaitoh in ticket #346):

	sys/dev/pci/if_et.c: revision 1.27

Fix a bug that multicast address filter doesn't work correctly.
XXX pullup-[789].

Revision 1.14.8.4: download - view: text, markup, annotated - select for diffs
Thu Oct 17 18:36:44 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.14.8.3: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.8.3: +3 -11 lines
Pull up the following revision, requested by msaitoh in ticket #1407:

	sys/dev/pci/if_et.c				1.27 via patch

Fix a bug that multicast address filter doesn't work correctly.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Oct 12 06:00:52 2019 UTC (5 years, 2 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -10 lines
 Fix a bug that multicast address filter doesn't work correctly.

XXX pullup-[789].

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 9 16:03:13 2019 UTC (5 years, 4 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +135 -63 lines
Pull up following revision(s) (requested by msaitoh in ticket #36):

	sys/dev/pci/if_et.c: revision 1.25
	sys/dev/pci/if_et.c: revision 1.26
	sys/dev/pci/if_etreg.h: revision 1.2
	sys/dev/pci/if_etreg.h: revision 1.3

Avoid undefined behavior when reset the chip. found by kUBSan.

 Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable.

Make et(4) work:
- Enabling TX/RX in et_init() will always fail when cable is not plugged in,
  if this happens, we delay TX/RX enablement until link is up. From FreeBSD.
- Modify flow control stuff a little (from FrerBSD). It still doesn't work.
- KNF. Part of OpenBSD 1.12.

Revision 1.14.8.3: download - view: text, markup, annotated - select for diffs
Tue Aug 6 16:10:17 2019 UTC (5 years, 4 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.14.8.2: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.8.2: +148 -77 lines
Pull up the following revisions, requested by msaitoh in ticket #1329:

	sys/dev/pci/if_etreg.h				1.2-1.3
	sys/dev/pci/if_et.c				1.23,1.25 and 1.26
							via patch

Make et(4) work:
- Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags
  controllable.
- Enabling TX/RX in et_init() will always fail when cable is not
  plugged in. If this happens, we delay TX/RX enablement until link is
  up.
- Modify flow control stuff a little. It still doesn't work.
- Avoid undefined behavior when reset the chip.
- Code cleanup.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Aug 1 13:36:37 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +133 -63 lines
Make et(4) work:
- Enabling TX/RX in et_init() will always fail when cable is not plugged in,
  if this happens, we delay TX/RX enablement until link is up. From FreeBSD.
- Modify flow control stuff a little (from FrerBSD). It still doesn't work.
- KNF. Part of OpenBSD 1.12.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jul 31 16:08:23 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -2 lines
 Add missing ifioctl_common() for SIOCSIFFLAGS to make if_flags controllable.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:16 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +47 -44 lines
Sync with HEAD

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue May 28 07:41:49 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -2 lines
 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu May 23 10:51:39 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +15 -16 lines
No functional change:
 - Simplify MII structure initialization and reference.
 - u_int*_t -> uint*_t.
 - KNF

Revision 1.14.8.2: download - view: text, markup, annotated - select for diffs
Mon May 13 12:40:13 2019 UTC (5 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.14.8.1: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.8.1: +3 -3 lines
Pull up the following, via patch, requested by msaitoh in ticket #1263:

	sys/dev/mii/brgphy.c				1.84
	sys/dev/mii/ciphy.c				1.33 via patch
	sys/dev/mii/rgephy.c				1.53
	sys/arch/arm/imx/if_enet.c			1.18
	sys/arch/mips/adm5120/dev/if_admsw.c		1.19-1.20
	sys/dev/pci/if_bge.c				1.329
	sys/dev/pci/if_bnx.c				1.81
	sys/dev/pci/if_et.c				1.21
	sys/dev/pci/if_lii.c				1.22
	sys/dev/pci/if_msk.c				1.87
	sys/dev/pci/if_nfe.c				1.68
	sys/dev/pci/if_sk.c				1.95
	sys/dev/pci/if_ti.c				1.107
	sys/dev/pci/if_txp.c				1.52
	sys/dev/pci/if_vge.c				1.69
	sys/dev/usb/if_axen.c				1.38
	sys/dev/usb/if_aue.c				1.149

Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Apr 22 08:05:01 2019 UTC (5 years, 7 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -7 lines
 On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Apr 11 08:50:59 2019 UTC (5 years, 8 months ago) by msaitoh
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

Revision 1.16.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 26 22:00:07 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.16.2.2: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.2.2: +28 -22 lines
Sync with HEAD

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jan 22 03:42:27 2019 UTC (5 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-compat-20190127
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +28 -22 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.16.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:01:50 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.16.2.1: preferred, colored; branchpoint 1.16: preferred, colored
Changes since revision 1.16.2.1: +5 -4 lines
Sync with HEAD, resolve a few conflicts

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Dec 22 14:07:53 2018 UTC (5 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Dec 9 11:14:02 2018 UTC (6 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -3 lines
use pci_intr_establish_xname() everywhere

Revision 1.16.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:46 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
Sync with HEAD

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Jun 26 06:48:01 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1126, 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.16: preferred, colored
Changes since revision 1.16: +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.16: download - view: text, markup, annotated - select for diffs
Thu Feb 8 07:53:47 2018 UTC (6 years, 10 months ago) by mrg
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0625, 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.15: preferred, colored
Changes since revision 1.15: +3 -4 lines
update for GCC 6:

- fix an array bounds violation and pass the right address to ether_crc32_be().

(i assume this actually makes et(4) multicast work.)

Revision 1.4.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:07 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.4.2.3: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.3: +8 -13 lines
update from HEAD

Revision 1.8.6.5: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:05 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8.6.4: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.6.4: +6 -2 lines
Sync with HEAD

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 18 15:00:53 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.1: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1474):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.3.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 18 15:00:32 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6-1
Diff to: previous 1.3.2.1: preferred, colored; next MAIN 1.3.2.2: preferred, colored
Changes since revision 1.3.2.1: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1474):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.3.6.1: download - view: text, markup, annotated - select for diffs
Fri Aug 18 15:00:13 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6-0
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1474):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.8.4.2: download - view: text, markup, annotated - select for diffs
Sat Aug 12 03:27:48 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.8.4.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.4.1: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1470):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.8.4.1.6.1: download - view: text, markup, annotated - select for diffs
Sat Aug 12 03:26:39 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-1
CVS tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Diff to: previous 1.8.4.1: preferred, colored; next MAIN 1.8.4.2: preferred, colored
Changes since revision 1.8.4.1: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1470):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.8.4.1.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 12 03:26:20 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.8.4.1: preferred, colored; next MAIN 1.8.4.2: preferred, colored
Changes since revision 1.8.4.1: +6 -2 lines
Pull up following revision(s) (requested by mrg in ticket #1470):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.14.8.1: download - view: text, markup, annotated - select for diffs
Sat Aug 5 04:36:56 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -2 lines
Pull up following revision(s) (requested by spz in ticket #183):
	sys/dev/pci/if_et.c: revision 1.15
Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Jul 29 01:47:48 2017 UTC (7 years, 4 months ago) by riastradh
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, nick-nhusb-base-20170825
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -2 lines
Check for MCLGET failure in et_newbuf.

From Ilja Van Sprundel.

Revision 1.8.6.4: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:29 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8.6.3: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.6.3: +4 -6 lines
Sync with HEAD

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:33 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +4 -6 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Dec 15 09:28:05 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170204, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -5 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.13: download - view: text, markup, annotated - select for diffs
Thu Dec 8 01:12:01 2016 UTC (8 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -3 lines
Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.

Revision 1.8.6.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:04 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8.6.2: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.6.2: +3 -3 lines
Sync with HEAD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:14 2016 UTC (8 years, 6 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.11: preferred, colored
Changes since revision 1.11: +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.8.6.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:10 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8.6.1: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.6.1: +3 -8 lines
Sync with HEAD

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Feb 17 20:02:41 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -7 lines
PR/50819: David Binderman: Delete dead code.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:11 2016 UTC (8 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +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.8.6.1: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:59 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -4 lines
Sync with HEAD

Revision 1.8.4.1: download - view: text, markup, annotated - select for diffs
Tue Aug 4 21:16:43 2015 UTC (9 years, 4 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -4 lines
Pull up following revision(s) (requested by maxv in ticket #914):
	sys/dev/pci/if_et.c: revision 1.9
Use-after-free.
ok christos@
Found by Brainy.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Jun 29 12:27:41 2015 UTC (9 years, 5 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -4 lines
Use-after-free.

ok christos@

Found by Brainy.

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

Revision 1.2.4.4: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:25 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.2.4.3: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.4.3: +15 -14 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.7.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:40 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +4 -3 lines
sync with head

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Mar 29 19:28:24 2014 UTC (10 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: nick-nhusb, netbsd-7
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -3 lines
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:18 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.4.2.1: preferred, colored
Changes since revision 1.4.2.1: +13 -13 lines
resync from head

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Mar 30 03:21:04 2013 UTC (11 years, 8 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +13 -13 lines
remove trailing whitespace

Revision 1.2.4.3: download - view: text, markup, annotated - select for diffs
Wed Jan 16 05:33:18 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.2.4.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.2: +17 -36 lines
sync with (a bit old) head

Revision 1.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:02:16 2012 UTC (12 years ago) by tls
Branches: tls-maxphys
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +19 -46 lines
Resync to 2012-11-19 00:00:00 UTC

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 18:41:59 2012 UTC (12 years ago) by riz
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
Branch point for: netbsd-6-1
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -12 lines
Pull up following revision(s) (requested by msaitoh in ticket #655):
	sys/dev/pci/if_et.c: revision 1.5
Don't use old NBPFILTER macro and use new bpf_mtap() API.
It fixes a bug that et(4) can't use bpf.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Nov 8 20:36:16 2012 UTC (12 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, agc-symver-base, agc-symver
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +17 -36 lines
Use native NetBSD macros instead of compatibility macros.

This change compiles, but I don't have an et(4) with which to test.

Revision 1.2.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:28 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.2.4.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.1: +7 -15 lines
sync with head

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Oct 29 01:36:33 2012 UTC (12 years, 1 month ago) by msaitoh
Branches: MAIN
CVS tags: yamt-pagecache-base6
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -12 lines
Don't use old NBPFILTER macro and use new bpf_mtap() API.
It fixes a bug that et(4) can't use bpf.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jul 22 14:33:02 2012 UTC (12 years, 4 months ago) by matt
Branches: MAIN
Branch point for: tls-maxphys
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -5 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.2.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:46 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -6 lines
sync with head

Revision 1.2.8.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:39 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +3 -6 lines
merge to -current.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jan 30 19:41:20 2012 UTC (12 years, 10 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6-0, netbsd-6
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -6 lines
Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:08:13 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +3 -3 lines
Sync with HEAD.

Revision 1.1.6.3: download - view: text, markup, annotated - select for diffs
Tue May 31 03:04:40 2011 UTC (13 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.1.6.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.6.2: +1 -1 lines
sync with head

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 18 01:02:43 2011 UTC (13 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
#include <sys/bus.h>, not <machine/bus.h>.

Revision 1.1.6.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:40 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.1.6.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.6.1: +2127 -0 lines
sync with head

Revision 1.1.6.1
Sat Nov 13 00:47:25 2010 UTC (14 years, 1 month ago) by rmind
Branches: rmind-uvmplock
FILE REMOVED
Changes since revision 1.1: +0 -2127 lines
file if_et.c was added on branch rmind-uvmplock on 2011-03-05 20:53:40 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Nov 13 00:47:25 2010 UTC (14 years, 1 month ago) by jnemeth
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) network driver

The et(4) driver supports PCI Express Ethernet adapters based on
the Agere/LSI ET1310/ET1301 integrated MAC/PHY.

The et(4) driver was written by Sepherosa Ziehau for DragonFlyBSD,
ported to OpenBSD by Jonathan Gray and subsequently ported to NetBSD
by Kaspar Brand.

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>