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


Keyword substitution: kv
Default branch: MAIN


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

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

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

PR kern/58377

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Sep 17 13:51:09 2022 UTC (2 years, 2 months ago) by thorpej
Branches: 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
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 22 16:18:44 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -4 lines
age_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success (or fatal error)".

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Aug 22 16:14:31 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +28 -36 lines
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 - view: text, markup, annotated - select for diffs
Tue May 31 08:43:15 2022 UTC (2 years, 6 months ago) by andvar
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -3 lines
fix various typos in comments, documentation and messages.

Revision 1.53.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:26 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.53.2.1: preferred, colored; branchpoint 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53.2.1: +86 -41 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:51:42 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, 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
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +32 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Mar 1 02:28:14 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +7 -7 lines
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 - 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.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65: +22 -15 lines
Sync with head.

Revision 1.67: 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
CVS tags: ad-namecache-base3
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +5 -5 lines
Use ifmedia_fini().

Revision 1.60.2.5: download - view: text, markup, annotated - select for diffs
Fri Jan 31 11:14:50 2020 UTC (4 years, 10 months 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
Diff to: previous 1.60.2.4: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.2.4: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 30 13:59:24 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +19 -12 lines
Adopt <net/if_stats.h>.

Revision 1.50.8.3: download - view: text, markup, annotated - select for diffs
Thu Dec 5 16:47:17 2019 UTC (5 years ago) by bouyer
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.50.8.2: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.8.2: +28 -18 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 1 08:16:49 2019 UTC (5 years ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -3 lines
 Use unsigned to avoid undefined behavoir. Found by kUBSan.

Revision 1.60.2.4: download - view: text, markup, annotated - select for diffs
Tue Nov 26 08:20:47 2019 UTC (5 years ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-0-RC1
Diff to: previous 1.60.2.3: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.3: +29 -19 lines
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 - view: text, markup, annotated - select for diffs
Tue Nov 26 08:18:40 2019 UTC (5 years ago) by martin
Branches: netbsd-9
Diff to: previous 1.60.2.2: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.2: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 21 09:12:30 2019 UTC (5 years ago) by msaitoh
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +29 -19 lines
Fix a bug that IFF_ALLMULTI is almost always set.

 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Nov 21 06:22:09 2019 UTC (5 years ago) by msaitoh
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3 lines
 Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.

Revision 1.50.8.2: download - view: text, markup, annotated - select for diffs
Wed Nov 6 10:04:47 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-8
Diff to: previous 1.50.8.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.8.1: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Nov 6 09:59:39 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-9
Diff to: previous 1.60.2.1: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.1: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Oct 30 07:26:28 2019 UTC (5 years, 1 month ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -4 lines
 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 - view: text, markup, annotated - select for diffs
Sun Sep 22 12:15:28 2019 UTC (5 years, 2 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Sep 20 08:58:25 2019 UTC (5 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
Fix direction of the loop.

Found by the lgtm bot.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue Jul 9 08:46:58 2019 UTC (5 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -2 lines
 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 - 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.53: preferred, colored
Changes since revision 1.53: +60 -58 lines
Sync with HEAD

Revision 1.59: 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
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +4 -2 lines
 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu May 23 13:10:51 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +17 -17 lines
 Whitespace fix (mainly tabify).

Revision 1.57: 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.56: preferred, colored
Changes since revision 1.56: +22 -25 lines
No functional change:
 - Simplify MII structure initialization and reference.
 - u_int*_t -> uint*_t.
 - KNF

Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Mar 5 08:25:02 2019 UTC (5 years, 9 months ago) by msaitoh
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -3 lines
 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 - 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.51.2.3: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.3: +21 -17 lines
Sync with HEAD

Revision 1.55: 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.54: preferred, colored
Changes since revision 1.54: +21 -17 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.51.2.3: 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.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.2: +4 -4 lines
Sync with HEAD, resolve a few conflicts

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Dec 9 11:14:02 2018 UTC (6 years ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +4 -4 lines
use pci_intr_establish_xname() everywhere

Revision 1.51.2.2: 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.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +3 -3 lines
Sync with HEAD

Revision 1.53: 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.52: preferred, colored
Changes since revision 1.52: +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.51.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:51 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
Sync with HEAD

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Jun 1 09:34:39 2018 UTC (6 years, 6 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
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 - 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.41.2.2: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.2: +7 -20 lines
update from HEAD

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

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

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

XXX need pullup to -8 branch

Revision 1.44.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.44.6.3: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.6.3: +4 -4 lines
Sync with HEAD

Revision 1.48.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.48: preferred, colored; next MAIN 1.49: preferred, colored
Changes since revision 1.48: +4 -4 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.50: 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-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
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -3 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.49: 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.48: preferred, colored
Changes since revision 1.48: +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.44.6.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:03 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.44.6.2: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.6.2: +3 -3 lines
Sync with HEAD

Revision 1.48: 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.47: preferred, colored
Changes since revision 1.47: +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.44.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.44.6.1: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.6.1: +3 -10 lines
Sync with HEAD

Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Feb 17 20:04:39 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.46: preferred, colored
Changes since revision 1.46: +2 -9 lines
PR/50817: David Binderman: Delete dead code (copy from if_et.c)

Revision 1.46: 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.45: preferred, colored
Changes since revision 1.45: +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.44.6.1: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:09 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -4 lines
Sync with HEAD

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Apr 13 16:33:25 2015 UTC (9 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -4 lines
Convert sys/dev to use <sys/rndsource.h>.

Revision 1.41.2.2: 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.41.2.1: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.1: +3 -2 lines
Rebase to HEAD as of a few days ago.

Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:24 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.1: +56 -55 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.42.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.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42: +5 -4 lines
sync with head

Revision 1.44: 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-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
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +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.43: download - view: text, markup, annotated - select for diffs
Fri Feb 21 02:10:40 2014 UTC (10 years, 9 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.

Revision 1.41.2.1: 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.41: preferred, colored
Changes since revision 1.41: +53 -53 lines
resync from head

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

Revision 1.40.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:25 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +6 -9 lines
sync with head

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Jul 22 14:33:00 2012 UTC (12 years, 4 months ago) by matt
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +6 -9 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.28.2.6: download - view: text, markup, annotated - select for diffs
Fri Nov 18 23:25:40 2011 UTC (13 years ago) by sborrill
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.28.2.5: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.5: +130 -99 lines
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 - view: text, markup, annotated - select for diffs
Tue Oct 25 21:47:38 2011 UTC (13 years, 1 month ago) by bouyer
Branches: 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
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +130 -99 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:37 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.37.2.1: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.1: +3 -3 lines
sync with head

Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:46:24 2010 UTC (14 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.1: +1 -1 lines
Sync with HEAD.

Revision 1.28.4.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:45 2010 UTC (14 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.28.4.5: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.4.5: +5 -7 lines
sync with head.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Jul 20 09:17:24 2010 UTC (14 years, 4 months ago) by cegger
Branches: 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
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
PR kern/38871: Fix VLAN

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

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

Revision 1.38.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:27:40 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.38.2.1: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.2.1: +2291 -0 lines
sync to netbsd-5

Revision 1.38.2.1
Mon Apr 5 07:20:24 2010 UTC (14 years, 8 months ago) by matt
Branches: matt-nb5-mips64
FILE REMOVED
Changes since revision 1.38: +0 -2285 lines
file if_age.c was added on branch matt-nb5-mips64 on 2010-04-21 00:27:40 +0000

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Apr 5 07:20:24 2010 UTC (14 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: uebayasi-xip-base1
Branch point for: matt-nb5-mips64
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -6 lines
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.28.4.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:44 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.28.4.4: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.4.4: +9 -37 lines
sync with head

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

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

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

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Jan 8 19:56:51 2010 UTC (14 years, 11 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -4 lines
Expand PMF_FN_* macros.

Revision 1.28.2.5: download - view: text, markup, annotated - select for diffs
Sun Nov 8 22:03:32 2009 UTC (15 years, 1 month ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.28.2.4: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.4: +5 -26 lines
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 - view: text, markup, annotated - select for diffs
Sun Nov 8 21:58:02 2009 UTC (15 years, 1 month ago) by snj
Branches: netbsd-5
Diff to: previous 1.28.2.3: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.3: +90 -117 lines
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 - view: text, markup, annotated - select for diffs
Sun Nov 8 21:55:46 2009 UTC (15 years, 1 month ago) by snj
Branches: netbsd-5
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.2: +3 -5 lines
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 - view: text, markup, annotated - select for diffs
Thu Oct 8 08:57:19 2009 UTC (15 years, 2 months ago) by cegger
Branches: MAIN
CVS tags: matt-premerge-20091211, jym-xensuspend-nbase
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +5 -26 lines
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 - view: text, markup, annotated - select for diffs
Wed Sep 16 13:37:50 2009 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.28.4.3: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.4.3: +5 -5 lines
sync with head

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Sep 5 14:09:55 2009 UTC (15 years, 3 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base8
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +5 -5 lines
Invert logic around nested pmf(9) registrations for readability.

Revision 1.28.4.3: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:47:10 2009 UTC (15 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.28.4.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.4.2: +97 -123 lines
sync with head.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Aug 5 15:29:51 2009 UTC (15 years, 4 months ago) by cegger
Branches: MAIN
CVS tags: yamt-nfs-mp-base7
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +8 -5 lines
make RX hw checksum available by default.
TX hw checksum locks up interface.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Aug 5 14:41:12 2009 UTC (15 years, 4 months ago) by cegger
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -3 lines
fix typo

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Aug 5 12:07:16 2009 UTC (15 years, 4 months ago) by cegger
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +90 -117 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Aug 4 13:17:55 2009 UTC (15 years, 4 months ago) by cegger
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -5 lines
support flow control. from OpenBSD.
tested by hans@

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:20:24 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +75 -42 lines
Sync with HEAD.

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

Revision 1.28.4.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:55 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.28.4.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.4.1: +2341 -0 lines
sync with head.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Sun May 3 23:45:47 2009 UTC (15 years, 7 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +2341 -0 lines
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 (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
FILE REMOVED
Changes since revision 1.28: +0 -2341 lines
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 (15 years, 7 months ago) by snj
Branches: netbsd-5
FILE REMOVED
Changes since revision 1.28: +0 -2341 lines
file if_age.c was added on branch netbsd-5 on 2009-05-03 23:45:47 +0000

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Apr 28 11:47:56 2009 UTC (15 years, 7 months ago) by cegger
Branches: 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
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +7 -3 lines
on detach, deregister from pmf and free resource

Revision 1.8.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:35:56 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.8.2.3: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.3: +55 -37 lines
Sync with HEAD.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Apr 26 07:01:29 2009 UTC (15 years, 7 months ago) by cegger
Branches: MAIN
CVS tags: nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +8 -3 lines
age_intr: don't return w/o ack. the interrupt.
Add a comment when this special case can happen.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Apr 21 13:16:36 2009 UTC (15 years, 7 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +12 -12 lines
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 - view: text, markup, annotated - select for diffs
Tue Mar 3 23:28:44 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +20 -7 lines
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 - view: text, markup, annotated - select for diffs
Tue Mar 3 22:26:41 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +21 -21 lines
make multicast working.
Diff from OpenBSD's if_age.c rev. 1.2.

Revision 1.8.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:31:07 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.8.2.2: preferred, colored
Changes since revision 1.8.2.2: +123 -109 lines
Sync with HEAD.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Feb 23 13:39:41 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
CVS tags: nick-hppapmap-base2
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +9 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 16 09:38:41 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +6 -4 lines
make this compile w/o VLAN

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Feb 11 16:15:59 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -2 lines
age_dma_free: set smb pointers to NULL for consistency
age_stop: call mii_down()
ok cube@

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Feb 5 23:56:57 2009 UTC (15 years, 10 months ago) by dyoung
Branches: MAIN
Branch point for: jym-xensuspend
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -6 lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 5 21:40:46 2009 UTC (15 years, 10 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +11 -20 lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 3 16:13:34 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +9 -8 lines
Adapt age_stop() as our ethernet stack expects it.
This makes 'ifconfig age0 down' working.
Ok cube@

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Jan 30 16:16:36 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +7 -7 lines
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 - view: text, markup, annotated - select for diffs
Fri Jan 30 08:57:35 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +26 -25 lines
age_dma_alloc(): print error code to figure out why it failed.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Jan 30 08:46:25 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +31 -31 lines
remove brackets from return statements.
No functional change.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Jan 29 17:03:37 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -3 lines
fix error path: don't crash when age_dma_alloc() fails.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Jan 24 08:31:03 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -5 lines
- fix test for IPv4 csum.
- No need to double negate TCP/UDP csum test

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Jan 23 22:59:30 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +15 -8 lines
Improve handling of transmitting large packets.
Sending large packets works better, but still needs investigations.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Jan 22 09:39:28 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
struct device -> device_t

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jan 22 09:37:44 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -5 lines
fix crash when bringing up the device and no cable is plugged in

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jan 21 07:48:54 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -5 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 19 13:18:25 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.8.2.1: preferred, colored
Changes since revision 1.8.2.1: +2305 -0 lines
Sync with HEAD.

Revision 1.8.2.1
Sun Jan 18 21:24:44 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
FILE REMOVED
Changes since revision 1.8: +0 -2305 lines
file if_age.c was added on branch nick-hppapmap on 2009-01-19 13:18:25 +0000

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Jan 18 21:24:44 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Branch point for: nick-hppapmap
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -40 lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 18 18:55:38 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
beautify dmesg output

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:59 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.1: +2337 -0 lines
Sync with HEAD.

Revision 1.6.2.1
Sat Jan 17 00:02:40 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
FILE REMOVED
Changes since revision 1.6: +0 -2337 lines
file if_age.c was added on branch mjf-devfs2 on 2009-01-17 13:28:59 +0000

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Jan 17 00:02:40 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
CVS tags: mjf-devfs2-base
Branch point for: mjf-devfs2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -22 lines
Until we do WOL, the PCI power management suspend code is a noop.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jan 16 23:58:05 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -7 lines
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 - view: text, markup, annotated - select for diffs
Fri Jan 16 23:23:34 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3 lines
rename PCI_PMCSR_PME to PCI_PMCSR_PME_STS.
Per request from jmcneill

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Jan 16 23:10:32 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +58 -9 lines
- fix age_read_vpd_word().
- add power management support. From FreeBSD.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Jan 16 21:47:56 2009 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
add RCSID

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Jan 16 20:18:08 2009 UTC (15 years, 10 months ago) by cegger
Branches: 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.

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>