The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.73 / (download) - annotate - [select for diffs], Sat Sep 17 13:51:09 2022 UTC (18 months, 4 weeks ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, 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, HEAD
Changes since 1.72: +2 -4 lines
Diff to previous 1.72 (colored)

age_start(): Remove redundant IFQ_IS_EMPTY().  This very same condition
is checked as soon as we enter the loop 2 statements later.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Aug 22 16:18:44 2022 UTC (19 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.71: +5 -4 lines
Diff to previous 1.71 (colored)

age_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success (or fatal error)".

Revision 1.71 / (download) - annotate - [select for diffs], Mon Aug 22 16:14:31 2022 UTC (19 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.70: +28 -36 lines
Diff to previous 1.70 (colored)

age_encap(): Use m_defrag(), not m_pullup(), to compact an mbuf chain
if it has too many DMA segments.  Let the caller handle dispose of the
packet on fatal errors.

Revision 1.70 / (download) - annotate - [select for diffs], Tue May 31 08:43:15 2022 UTC (22 months, 2 weeks ago) by andvar
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

fix various typos in comments, documentation and messages.

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:26 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.53.2.1: +86 -41 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.69 / (download) - annotate - [select for diffs], Sun Mar 1 02:51:42 2020 UTC (4 years, 1 month ago) by thorpej
Branch: 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, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.68: +32 -3 lines
Diff to previous 1.68 (colored)

- Use the 64-bit PCI DMA tag if available.
- In age_dma_alloc(), ensure that all of the control data end up in the
  same 4GB segment, because the hardware requires this.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Mar 1 02:28:14 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.67: +7 -7 lines
Diff to previous 1.67 (colored)

It doesn't make any sense to pass ETHER_ALIGN as the alignment constraint
to bus_dmamem_alloc().  Use PAGE_SIZE instead.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:10 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.65: +22 -15 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with head.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Feb 4 05:44:14 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.66: +5 -5 lines
Diff to previous 1.66 (colored)

Use ifmedia_fini().

Revision 1.60.2.5 / (download) - annotate - [select for diffs], Fri Jan 31 11:14:50 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.60.2.4: +3 -3 lines
Diff to previous 1.60.2.4 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #671):

	sys/dev/pci/if_bce.c: revision 1.53
	sys/dev/pci/pccbbreg.h: revision 1.16
	sys/dev/ic/rt2860.c: revision 1.34
	sys/dev/pci/if_alc.c: revision 1.45
	sys/dev/pci/if_mcx.c: revision 1.5
	sys/dev/pci/if_pcn.c: revision 1.72
	sys/dev/pci/if_ale.c: revision 1.37
	sys/dev/pci/if_age.c: revision 1.65
	sys/dev/ieee1394/fwohcireg.h: revision 1.20
	sys/dev/ieee1394/fwohci.c: revision 1.143
	sys/dev/ieee1394/firewire.c: revision 1.49
	sys/dev/ic/am79900reg.h: revision 1.10

 Use unsigned to avoid undefined behavior. Found by kUBSan.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jan 30 13:59:24 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.65: +19 -12 lines
Diff to previous 1.65 (colored)

Adopt <net/if_stats.h>.

Revision 1.50.8.3 / (download) - annotate - [select for diffs], Thu Dec 5 16:47:17 2019 UTC (4 years, 4 months ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.50.8.2: +28 -18 lines
Diff to previous 1.50.8.2 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1462):
        sys/dev/pci/if_age.c: revision 1.61, 1.63-1.64 via patch

- Fix direction of the loop in age_get_macaddr().
- Fix multicast handling. All Atheros controllers use big-endian form
  when computing multicast hash.
- Fix a bug that IFF_ALLMULTI is almost always set.

Revision 1.65 / (download) - annotate - [select for diffs], Sun Dec 1 08:16:49 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

 Use unsigned to avoid undefined behavoir. Found by kUBSan.

Revision 1.60.2.4 / (download) - annotate - [select for diffs], Tue Nov 26 08:20:47 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RC1
Changes since 1.60.2.3: +29 -19 lines
Diff to previous 1.60.2.3 (colored) to branchpoint 1.60 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #483):

	sys/dev/pci/if_cas.c: revision 1.36
	sys/dev/pci/if_alc.c: revision 1.44
	sys/dev/pci/if_ale.c: revision 1.35
	sys/dev/pci/if_ale.c: revision 1.36
	sys/dev/pci/if_age.c: revision 1.64

Fix a bug that IFF_ALLMULTI is almost always set.
 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

 Remove accidentally committed debug code. Sorry.

Revision 1.60.2.3 / (download) - annotate - [select for diffs], Tue Nov 26 08:18:40 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
Changes since 1.60.2.2: +3 -3 lines
Diff to previous 1.60.2.2 (colored) to branchpoint 1.60 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #482):

	sys/dev/pci/if_age.c: revision 1.63

Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Nov 21 09:12:30 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.63: +29 -19 lines
Diff to previous 1.63 (colored)

Fix a bug that IFF_ALLMULTI is almost always set.

 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Nov 21 06:22:09 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

 Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.

Revision 1.50.8.2 / (download) - annotate - [select for diffs], Wed Nov 6 10:04:47 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-8
Changes since 1.50.8.1: +2 -4 lines
Diff to previous 1.50.8.1 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1427):

	sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
	sys/dev/pcmcia/if_xi.c: revision 1.91
	sys/dev/ic/aic6915.c: revision 1.40
	sys/dev/pci/if_tl.c: revision 1.117
	sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
	sys/dev/ic/elinkxl.c: revision 1.133
	sys/dev/pci/if_ste.c: revision 1.57
	sys/dev/pci/if_alc.c: revision 1.43
	sys/dev/pci/if_stge.c: revision 1.72
	sys/dev/pci/if_ale.c: revision 1.34
	sys/dev/pci/if_age.c: revision 1.62
	sys/dev/pci/if_txp.c: revision 1.60
	sys/dev/ic/i82557.c: revision 1.156
	sys/dev/pci/if_vte.c: revision 1.27
	sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
	sys/arch/arm/gemini/if_gpn.c: revision 1.13

 if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Wed Nov 6 09:59:39 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
Changes since 1.60.2.1: +2 -4 lines
Diff to previous 1.60.2.1 (colored) to branchpoint 1.60 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #403):

	sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
	sys/dev/pcmcia/if_xi.c: revision 1.91
	sys/dev/ic/aic6915.c: revision 1.40
	sys/dev/pci/if_tl.c: revision 1.117
	sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
	sys/dev/ic/elinkxl.c: revision 1.133
	sys/dev/pci/if_ste.c: revision 1.57
	sys/dev/pci/if_alc.c: revision 1.43
	sys/dev/pci/if_stge.c: revision 1.72
	sys/dev/pci/if_ale.c: revision 1.34
	sys/dev/pci/if_age.c: revision 1.62
	sys/dev/pci/if_txp.c: revision 1.60
	sys/dev/ic/i82557.c: revision 1.156
	sys/dev/pci/if_vte.c: revision 1.27
	sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
	sys/arch/arm/gemini/if_gpn.c: revision 1.13

 if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Oct 30 07:26:28 2019 UTC (4 years, 5 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.61: +2 -4 lines
Diff to previous 1.61 (colored)

 if_percpuq(9) automatically increments if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Sun Sep 22 12:15:28 2019 UTC (4 years, 6 months ago) by martin
Branch: netbsd-9
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

Pull up following revision(s) (requested by maxv in ticket #216):

	sys/dev/pci/if_age.c: revision 1.61

Fix direction of the loop.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Sep 20 08:58:25 2019 UTC (4 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

Fix direction of the loop.

Found by the lgtm bot.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jul 9 08:46:58 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

 Don't automatically set ec_capenable's ETHERCAP_VLAN_HWTAGGING bit in
vlan_config() to make it user-controllable. Instead, set the bit in
xxx_attach().

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:16 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.53: +60 -58 lines
Diff to previous 1.53 (colored)

Sync with HEAD

Revision 1.59 / (download) - annotate - [select for diffs], Tue May 28 07:41:49 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.58: +4 -2 lines
Diff to previous 1.58 (colored)

 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 23 13:10:51 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.57: +17 -17 lines
Diff to previous 1.57 (colored)

 Whitespace fix (mainly tabify).

Revision 1.57 / (download) - annotate - [select for diffs], Thu May 23 10:51:39 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.56: +22 -25 lines
Diff to previous 1.56 (colored)

No functional change:
 - Simplify MII structure initialization and reference.
 - u_int*_t -> uint*_t.
 - KNF

Revision 1.56 / (download) - annotate - [select for diffs], Tue Mar 5 08:25:02 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.55: +2 -3 lines
Diff to previous 1.55 (colored)

 Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.

Revision 1.51.2.4 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:07 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.51.2.3: +21 -17 lines
Diff to previous 1.51.2.3 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored)

Sync with HEAD

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jan 22 03:42:27 2019 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.54: +21 -17 lines
Diff to previous 1.54 (colored)

 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.51.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:50 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.51.2.2: +4 -4 lines
Diff to previous 1.51.2.2 (colored) to branchpoint 1.51 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.54 / (download) - annotate - [select for diffs], Sun Dec 9 11:14:02 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

use pci_intr_establish_xname() everywhere

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:46 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.51.2.1: +3 -3 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored)

Sync with HEAD

Revision 1.53 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:01 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: 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
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

 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.51.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:51 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

Sync with HEAD

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jun 1 09:34:39 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

Fix M_PKTHDR use in if_alc, if_age and if_ena.

if_alc and if_age always put in _rxhead a M_PKTHDR-flagged mbuf, so the
flag must always be present. Instead of manually adding the flag, add a
KASSERT to ensure it is already there. If it weren't, there would be
memory corruptions.

Same in if_ena, but this one does not compile so we don't really care.

Also, use m_remove_pkthdr to remove the flag, instead of doing it
manually. This ensures the tags get freed (even though these drivers
don't seem to be using mtags).

Revision 1.41.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:07 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.41.2.2: +7 -20 lines
Diff to previous 1.41.2.2 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

update from HEAD

Revision 1.50.8.1 / (download) - annotate - [select for diffs], Tue Oct 24 08:38:59 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: 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
Changes since 1.50: +5 -9 lines
Diff to previous 1.50 (colored)

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.51 / (download) - annotate - [select for diffs], Tue Sep 26 07:42:06 2017 UTC (6 years, 6 months ago) by knakahara
Branch: 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
Changes since 1.50: +5 -9 lines
Diff to previous 1.50 (colored)

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.44.6.4 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:29 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.44.6.3: +4 -4 lines
Diff to previous 1.44.6.3 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored)

Sync with HEAD

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:33 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.50 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: 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-20170825, 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
Changes since 1.49: +2 -3 lines
Diff to previous 1.49 (colored)

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.49 / (download) - annotate - [select for diffs], Thu Dec 8 01:12:01 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.48: +4 -3 lines
Diff to previous 1.48 (colored)

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.44.6.3 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:03 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.44.6.2: +3 -3 lines
Diff to previous 1.44.6.2 (colored) to branchpoint 1.44 (colored)

Sync with HEAD

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: 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
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

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.44.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:10 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.44.6.1: +3 -10 lines
Diff to previous 1.44.6.1 (colored) to branchpoint 1.44 (colored)

Sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Wed Feb 17 20:04:39 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.46: +2 -9 lines
Diff to previous 1.46 (colored)

PR/50817: David Binderman: Delete dead code (copy from if_et.c)

Revision 1.46 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (8 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

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.44.6.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:09 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.44: +2 -4 lines
Diff to previous 1.44 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (9 years ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.44: +2 -4 lines
Diff to previous 1.44 (colored)

Convert sys/dev to use <sys/rndsource.h>.

Revision 1.41.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:42 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.41.2.1: +3 -2 lines
Diff to previous 1.41.2.1 (colored) to branchpoint 1.41 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:40:24 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.40.2.1: +56 -55 lines
Diff to previous 1.40.2.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

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.42.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:40 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.42: +5 -4 lines
Diff to previous 1.42 (colored) next main 1.43 (colored)

sync with head

Revision 1.44 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:24 2014 UTC (10 years ago) by christos
Branch: 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-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, 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, netbsd-7
Branch point for: nick-nhusb
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored)

make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Feb 21 02:10:40 2014 UTC (10 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:18 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.41: +53 -53 lines
Diff to previous 1.41 (colored)

resync from head

Revision 1.42 / (download) - annotate - [select for diffs], Sat Mar 30 03:21:02 2013 UTC (11 years ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.41: +53 -53 lines
Diff to previous 1.41 (colored)

remove trailing whitespace

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Tue Oct 30 17:21:25 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.40: +6 -9 lines
Diff to previous 1.40 (colored)

sync with head

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jul 22 14:33:00 2012 UTC (11 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.40: +6 -9 lines
Diff to previous 1.40 (colored)

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.28.2.6 / (download) - annotate - [select for diffs], Fri Nov 18 23:25:40 2011 UTC (12 years, 4 months ago) by sborrill
Branch: 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
Changes since 1.28.2.5: +130 -99 lines
Diff to previous 1.28.2.5 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1694):
	sys/dev/pci/if_age.c:	revision 1.40 via patch

- age_init() is called from age_watchdog() which is in interrupt context; we
can't sleep here or we get a DIAGNOSTIC panic when age_watchdog() fires.
- More correct bus_dma(9) usage in age_encap()
- Introduce a age_shutdown() to be called by pmf(9) at shutdown time,
to stop the DMA engine.
- Be consistent in WAIT/NOWAIT use in init routines
- Use BUS_DMA_COHERENT where appropriate
- Rework the interrupt routine a bit, and ACK but do not disable interrupts
here. There seems to be a race where interrupts would not be properly
reenabled after this, leading do watchdog timeouts.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Oct 25 21:47:38 2011 UTC (12 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, 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, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, 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, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.39: +130 -99 lines
Diff to previous 1.39 (colored)

age_init() is called from age_watchdog() which is interrupt context, we
can't sleep here or we get a DIAGNOSTIC panic when age_watchdog() fires.
More correct bus_dma(9) usage in age_encap()
Introduce a age_shutdown() to be called by pmf(9) at shutdown time,
to stop the DMA engine. My system would't properly reboot without this.
Be consistent in WAIT/NOWAIT use in init routines
Use BUS_DMA_COHERENT where appropriate
Rework the interrupt routine a bit, and ACK but do not disable interrupts
here. There seems to be a race where interrupts would not be properly
reenabled after this, leading do watchdog timeouts.

With these changes, the on-board age(4) on ftp.fr.netbsd.org seems to
be finally working properly.

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:37 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.37.2.1: +3 -3 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

sync with head

Revision 1.36.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:46:24 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.36.2.1: +1 -1 lines
Diff to previous 1.36.2.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

Sync with HEAD.

Revision 1.28.4.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:45 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.4.5: +5 -7 lines
Diff to previous 1.28.4.5 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync with head.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jul 20 09:17:24 2010 UTC (13 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: 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, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

PR kern/38871: Fix VLAN

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:32 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.37: +4 -6 lines
Diff to previous 1.37 (colored)

sync with head

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:33 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.36: +6 -8 lines
Diff to previous 1.36 (colored)

Sync with HEAD.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:40 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.38.2.1: +2291 -0 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

sync to netbsd-5

Revision 1.38.2.1, Mon Apr 5 07:20:24 2010 UTC (14 years ago) by matt
Branch: matt-nb5-mips64
Changes since 1.38: +0 -2285 lines
FILE REMOVED

file if_age.c was added on branch matt-nb5-mips64 on 2010-04-21 00:27:40 +0000

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:24 2010 UTC (14 years ago) by joerg
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Branch point for: matt-nb5-mips64
Changes since 1.37: +4 -6 lines
Diff to previous 1.37 (colored)

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.28.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:44 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.4.4: +9 -37 lines
Diff to previous 1.28.4.4 (colored) to branchpoint 1.28 (colored)

sync with head

Revision 1.37 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:00 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:00 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.35: +4 -11 lines
Diff to previous 1.35 (colored)

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.35 / (download) - annotate - [select for diffs], Fri Jan 8 19:56:51 2010 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Expand PMF_FN_* macros.

Revision 1.28.2.5 / (download) - annotate - [select for diffs], Sun Nov 8 22:03:32 2009 UTC (14 years, 5 months ago) by snj
Branch: 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
Changes since 1.28.2.4: +5 -26 lines
Diff to previous 1.28.2.4 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by cegger in ticket #1124):
	sys/dev/pci/if_age.c: revision 1.34
	sys/dev/pci/if_ale.c: revision 1.9
Use m_pullup to handle defragmentation.
Reinject mbuf into TX queue when it couldn't be loaded.
diff for age(4) reviewed/discussed with plunky@ several weeks ago.

Revision 1.28.2.4 / (download) - annotate - [select for diffs], Sun Nov 8 21:58:02 2009 UTC (14 years, 5 months ago) by snj
Branch: netbsd-5
Changes since 1.28.2.3: +90 -117 lines
Diff to previous 1.28.2.3 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by cegger in ticket #1124):
	sys/dev/pci/if_age.c: revision 1.30
- Don't access VPD even if hardware advertised the capability.
  It seems that some revisions of the controllers hang while accessing
  the VPD. Because VPD access routine is now unused, nuke it.
- Let TWSI reload EEPROM if VPD capability is detected. Reloading
  the EEPROM will also set the Ethernet address, so age(4) now reads
  AGE_PAR0 and AGE_PAR1 register to get the Ethernet address. This removes
  removes a lot of hacks and enhance readability a lot.
- Double PHY reset timeout as it takes more time to take the PHY out of
  power-saving state.
- Explicitly check power-saving state by checking undocumented PHY
  registers. If link is not up, poke undocumented registers to take
  PHY out of power-saving state. This is the same thing done by the
  Linux driver.
- Don't rely on auto-clearing feature of master reset bit, just wait
  1ms and check idle status of MAC.
From FreeBSD via OpenBSD.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Sun Nov 8 21:55:46 2009 UTC (14 years, 5 months ago) by snj
Branch: netbsd-5
Changes since 1.28.2.2: +3 -5 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by cegger in ticket #1124):
	sys/dev/pci/if_age.c: revision 1.29
support flow control. from OpenBSD.
tested by hans@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Oct 8 08:57:19 2009 UTC (14 years, 6 months ago) by cegger
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.33: +5 -26 lines
Diff to previous 1.33 (colored)

Use m_pullup to handle defragmentation.
Reinject mbuf into TX queue when it couldn't be loaded.

diff for age(4) reviewed/discussed with plunky@ several weeks ago.

Revision 1.28.4.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:50 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.4.3: +5 -5 lines
Diff to previous 1.28.4.3 (colored) to branchpoint 1.28 (colored)

sync with head

Revision 1.33 / (download) - annotate - [select for diffs], Sat Sep 5 14:09:55 2009 UTC (14 years, 7 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored)

Invert logic around nested pmf(9) registrations for readability.

Revision 1.28.4.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:47:10 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.4.2: +97 -123 lines
Diff to previous 1.28.4.2 (colored) to branchpoint 1.28 (colored)

sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Aug 5 15:29:51 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.31: +8 -5 lines
Diff to previous 1.31 (colored)

make RX hw checksum available by default.
TX hw checksum locks up interface.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Aug 5 14:41:12 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

fix typo

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 5 12:07:16 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
Changes since 1.29: +90 -117 lines
Diff to previous 1.29 (colored)

- Don't access VPD even if hardware advertised the capability.
  It seems that some revisions of the controllers hang while accessing
  the VPD. Because VPD access routine is now unused, nuke it.
- Let TWSI reload EEPROM if VPD capability is detected. Reloading
  the EEPROM will also set the Ethernet address, so age(4) now reads
  AGE_PAR0 and AGE_PAR1 register to get the Ethernet address. This removes
  removes a lot of hacks and enhance readability a lot.
- Double PHY reset timeout as it takes more time to take the PHY out of
  power-saving state.
- Explicitly check power-saving state by checking undocumented PHY
  registers. If link is not up, poke undocumented registers to take
  PHY out of power-saving state. This is the same thing done by the
  Linux driver.
- Don't rely on auto-clearing feature of master reset bit, just wait
  1ms and check idle status of MAC.

From FreeBSD via OpenBSD.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Aug 4 13:17:55 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
Changes since 1.28: +3 -5 lines
Diff to previous 1.28 (colored)

support flow control. from OpenBSD.
tested by hans@

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:20:24 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.20: +75 -42 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Sync with HEAD.

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

Revision 1.28.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:55 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28.4.1: +2341 -0 lines
Diff to previous 1.28.4.1 (colored) to branchpoint 1.28 (colored)

sync with head.

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Sun May 3 23:45:47 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.28.2.1: +2341 -0 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by cegger in ticket #735):
	sys/dev/pci/if_age.c: revisions 1.1-1.28
	sys/dev/pci/if_agereg.h: revisions 1.1-1.2
	sys/dev/pci/if_ale.c: revisions 1.1-1.3
	sys/dev/pci/if_alereg.h: revisions 1.1-1.2
	sys/dev/pci/files.pci: revisions 1.310-1.313
	sys/dev/mii/atphy.c: revisions 1.1-1.5
	sys/dev/mii/files.mii: revision 1.42
	share/man/man4/age.4: revisions 1.1-1.3
	share/man/man4/ale.4: revisions 1.1-1.2
	share/man/man4/atphy.4: revisions 1.1-1.2
	share/man/man4/Makefile: revisions 1.486, 1.489
	distrib/sets/lists/man/mi: revisions 1.1118, 1.1132
	sys/arch/i386/conf/GENERIC: revisions 1.928, 1.933
	sys/arch/i386/conf/XEN2_DOM0: revisions 1.57, 1.60
	sys/arch/amd64/conf/GENERIC: revisions 1.239, 1.241
	sys/arch/amd64/conf/XEN3_DOM0: revisions 1.38, 1.42
Add the age(4) and ale(4) drivers for Attansic L1 and Atheros
AR8121/AR8113/AR8114 devices respectively.

Revision 1.28.4.1, Tue Apr 28 11:47:56 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.28: +0 -2341 lines
FILE REMOVED

file if_age.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:55 +0000

Revision 1.28.2.1, Tue Apr 28 11:47:56 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.28: +0 -2341 lines
FILE REMOVED

file if_age.c was added on branch netbsd-5 on 2009-05-03 23:45:47 +0000

Revision 1.28 / (download) - annotate - [select for diffs], Tue Apr 28 11:47:56 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, jymxensuspend-base, jym-xensuspend-base
Branch point for: yamt-nfs-mp, netbsd-5
Changes since 1.27: +7 -3 lines
Diff to previous 1.27 (colored)

on detach, deregister from pmf and free resource

Revision 1.8.2.4 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:56 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.8.2.3: +55 -37 lines
Diff to previous 1.8.2.3 (colored) next main 1.9 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Apr 26 07:01:29 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.26: +8 -3 lines
Diff to previous 1.26 (colored)

age_intr: don't return w/o ack. the interrupt.
Add a comment when this special case can happen.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 21 13:16:36 2009 UTC (14 years, 11 months ago) by tsutsui
Branch: MAIN
Changes since 1.25: +12 -12 lines
Diff to previous 1.25 (colored)

Fix wrong arguments of bus_dmamem_free(9).

XXX: not all resouces are freed properly on error path in age_dma_alloc().

Revision 1.25 / (download) - annotate - [select for diffs], Tue Mar 3 23:28:44 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.24: +20 -7 lines
Diff to previous 1.24 (colored)

mimic fix from nfe(4):
when bus_dmamap_create fails, then the map pointer is undefined.
age_dma_free() assumes, the map pointer is NULL. Make the assumption
always true by setting the map pointer to NULL in bus_dmamap_create()
error path in order to prevent age_dma_free() to call bus_dmamap_destroy()
on an invalid map.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Mar 3 22:26:41 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.23: +21 -21 lines
Diff to previous 1.23 (colored)

make multicast working.
Diff from OpenBSD's if_age.c rev. 1.2.

Revision 1.8.2.3 / (download) - annotate - [select for diffs], Tue Mar 3 18:31:07 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.8.2.2: +123 -109 lines
Diff to previous 1.8.2.2 (colored)

Sync with HEAD.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Feb 23 13:39:41 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.22: +9 -4 lines
Diff to previous 1.22 (colored)

when attach routine fails, also free DMA memory and interrupt mapping.
Diff from OpenBSD's if_age.c rev. 1.2.
ok cube@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Feb 16 09:38:41 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.21: +6 -4 lines
Diff to previous 1.21 (colored)

make this compile w/o VLAN

Revision 1.21 / (download) - annotate - [select for diffs], Wed Feb 11 16:15:59 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.20: +6 -2 lines
Diff to previous 1.20 (colored)

age_dma_free: set smb pointers to NULL for consistency
age_stop: call mii_down()
ok cube@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 5 23:56:57 2009 UTC (15 years, 2 months ago) by dyoung
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.19: +2 -6 lines
Diff to previous 1.19 (colored)

If the bus_dmamap_load_mbuf() status was non-zero, then the DMA
map is undefined, so do not try to unload it.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Feb 5 21:40:46 2009 UTC (15 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.18: +11 -20 lines
Diff to previous 1.18 (colored)

Initialize ec_mii, and re-use more ethernet common code for media
handling.

Replace an anonymous constant by PCI_COMMAND_INTERRUPT_DISABLE.

These changes have been compile-tested, only.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Feb 3 16:13:34 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.17: +9 -8 lines
Diff to previous 1.17 (colored)

Adapt age_stop() as our ethernet stack expects it.
This makes 'ifconfig age0 down' working.
Ok cube@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 30 16:16:36 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.16: +7 -7 lines
Diff to previous 1.16 (colored)

age_dma_alloc(): Don't allocate more than really required.
It is less likely to fail with ENOMEM when we are short on dma-safe memory.
This happens more likely when running NetBSD as Xen Dom0.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 30 08:57:35 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.15: +26 -25 lines
Diff to previous 1.15 (colored)

age_dma_alloc(): print error code to figure out why it failed.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 30 08:46:25 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.14: +31 -31 lines
Diff to previous 1.14 (colored)

remove brackets from return statements.
No functional change.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 29 17:03:37 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.13: +7 -3 lines
Diff to previous 1.13 (colored)

fix error path: don't crash when age_dma_alloc() fails.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jan 24 08:31:03 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

- fix test for IPv4 csum.
- No need to double negate TCP/UDP csum test

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 23 22:59:30 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.11: +15 -8 lines
Diff to previous 1.11 (colored)

Improve handling of transmitting large packets.
Sending large packets works better, but still needs investigations.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jan 22 09:39:28 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

struct device -> device_t

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 22 09:37:44 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.9: +7 -5 lines
Diff to previous 1.9 (colored)

fix crash when bringing up the device and no cable is plugged in

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 21 07:48:54 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.8: +6 -5 lines
Diff to previous 1.8 (colored)

Roll our own ETHER_ALIGN #define like many other driver do.
Use ETHER_ALIGN to calculate number of segments correctly (actually the same way as FreeBSD and OpenBSD do).
Also use ETHER_ALIGN to correctly adjust new mbufs.
This makes the driver finally work. Tested by Jochen Kunz:
ping -nf 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes

----192.168.2.1 PING Statistics----
28949 packets transmitted, 28949 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.157/0.364/2.272/0.023 ms
  2710.6 packets/sec sent,  2710.6 packets/sec received


XXX Shouldn't if_ether.h provide ETHER_ALIGN instead of defining it in all drivers?

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Mon Jan 19 13:18:25 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.8.2.1: +2305 -0 lines
Diff to previous 1.8.2.1 (colored)

Sync with HEAD.

Revision 1.8.2.1, Sun Jan 18 21:24:44 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.8: +0 -2305 lines
FILE REMOVED

file if_age.c was added on branch nick-hppapmap on 2009-01-19 13:18:25 +0000

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 18 21:24:44 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Branch point for: nick-hppapmap
Changes since 1.7: +8 -40 lines
Diff to previous 1.7 (colored)

fix botched age_ioctl(): don't try to roll its own handling when ether_ioctl() is doing all of it right.
Tested by Jochen Kunz.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jan 18 18:55:38 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

beautify dmesg output

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:59 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.6.2.1: +2337 -0 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD.

Revision 1.6.2.1, Sat Jan 17 00:02:40 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.6: +0 -2337 lines
FILE REMOVED

file if_age.c was added on branch mjf-devfs2 on 2009-01-17 13:28:59 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 17 00:02:40 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: mjf-devfs2
Changes since 1.5: +3 -22 lines
Diff to previous 1.5 (colored)

Until we do WOL, the PCI power management suspend code is a noop.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 16 23:58:05 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
Changes since 1.4: +2 -7 lines
Diff to previous 1.4 (colored)

don't call age_stop and age_init in suspend/resume.
pmf network class is already doing that.
pointed out by jmcneill

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 16 23:23:34 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

rename PCI_PMCSR_PME to PCI_PMCSR_PME_STS.
Per request from jmcneill

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jan 16 23:10:32 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
Changes since 1.2: +58 -9 lines
Diff to previous 1.2 (colored)

- fix age_read_vpd_word().
- add power management support. From FreeBSD.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 16 21:47:56 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
Changes since 1.1: +4 -1 lines
Diff to previous 1.1 (colored)

add RCSID

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 16 20:18:08 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN

Driver for Attansic L1 gigabit ethernet driver.

Written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD
by Sepherosa Ziehau, ported to OpenBSD by Kevin Lo and then
ported to NetBSD by me.

XXX Driver needs testing.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>