The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.87 / (download) - annotate - [select for diffs], Fri Feb 9 22:08:36 2024 UTC (3 weeks, 3 days ago) by andvar
Branch: MAIN
CVS Tags: triaxx-drm, HEAD
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

fix spelling mistakes, mainly in comments and log messages.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Sep 24 18:12:43 2022 UTC (17 months, 1 week 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-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
Changes since 1.85: +2 -3 lines
Diff to previous 1.85 (colored)

Remove unnecessary include of <sys/malloc.h>.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Sep 17 15:44:15 2022 UTC (17 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.84: +5 -20 lines
Diff to previous 1.84 (colored)

Eliminate use of IFF_OACTIVE.

Revision 1.84 / (download) - annotate - [select for diffs], Mon May 23 13:53:37 2022 UTC (21 months, 1 week ago) by rin
Branch: MAIN
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored)

Audit unload/unmap v.s. free against DMA buffer for sys/dev/pci;
make sure that bus_dmamap_unload(9) [or bus_dmamap_destroy(9)] or
bus_dmamem_unmap(9) are preceding to freeing DMA buffer, if it is
loaded or mapped, respectively.

This is mandatory for some archs. See, e.g.:

http://www.nerv.org/netbsd/?q=id:20210511T013030Z.013443cc790088147e4beed43f53dedabeaf9312
http://www.nerv.org/netbsd/?q=id:20220511T172220Z.561179f0b6fcc5b9cd73e274f69d74e2ce9e4c93

XXX XXX XXX
Compile test only (for amd64/ALL).

Thanks riastradh@ for double check.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Jan 22 19:09:21 2022 UTC (2 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

Explicitly cast a __MASK(48) to bus_addr_t (for 32bit bus_addr_t archs)

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jan 22 15:10:32 2022 UTC (2 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.

Revision 1.80.8.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:25 2021 UTC (2 years, 7 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

Sync with HEAD.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jul 24 21:31:37 2021 UTC (2 years, 7 months ago) by andvar
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:26 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.63.2.1: +110 -44 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.80 / (download) - annotate - [select for diffs], Sat Mar 21 16:56:00 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, 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
Branch point for: thorpej-i2c-spi-conf
Changes since 1.79: +37 -12 lines
Diff to previous 1.79 (colored)

Use the 64-bit DMA tag, if available, with some constraints:
- The data buffers can come from anywhere in the 64-bit region, but
  the upper 16 bits of the data buffer address is stored in a single
  register, so just treat that as 0 and create a 48-bit restricted
  DMA tag.
- The descriptor address registers share a single register for the
  upper 32-bits, so enforce a 4G boundary when allocating memory
  for the descriptors.

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:11 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.78: +10 -8 lines
Diff to previous 1.78 (colored) next main 1.79 (colored)

Sync with head.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jan 30 05:24:53 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.78: +10 -8 lines
Diff to previous 1.78 (colored)

Adopt <net/if_stats.h>.

Revision 1.78 / (download) - annotate - [select for diffs], Fri Dec 27 07:41:23 2019 UTC (4 years, 2 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.77: +3 -3 lines
Diff to previous 1.77 (colored)

s/opration/operation/

Revision 1.73.2.2 / (download) - annotate - [select for diffs], Mon Nov 25 16:47:16 2019 UTC (4 years, 3 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, netbsd-9-0-RC1
Changes since 1.73.2.1: +32 -25 lines
Diff to previous 1.73.2.1 (colored) to branchpoint 1.73 (colored) next main 1.74 (colored)

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

	sys/dev/pci/if_vge.c: revision 1.76
	sys/dev/pci/if_vge.c: revision 1.77

 Fixes a bug that "ifmedia vge0 media 1000baseT-FDX" causes device timeout.

If the interface's media is NOT in the "best" mode (i.e. other than IFM_AUTO),
control VGE_DIAGCTL_GMII bit.

- Set duplex correctly when user setting is not IFM_AUTO.
- When the link is up, set VGE_DIAGCTL not from user media setting but from
  the current active link status.

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

- Set duplex correctly when user setting is not IFM_AUTO.
- When the link is up, set VGE_DIAGCTL not from user media setting but from
  the current active link status.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Nov 19 09:54:07 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.75: +18 -12 lines
Diff to previous 1.75 (colored)

 Fixes a bug that "ifmedia vge0 media 1000baseT-FDX" causes device timeout.

If the interface's media is NOT in the "best" mode (i.e. other than IFM_AUTO),
control VGE_DIAGCTL_GMII bit.

Revision 1.73.2.1 / (download) - annotate - [select for diffs], Thu Oct 17 18:58:33 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
Changes since 1.73: +33 -2 lines
Diff to previous 1.73 (colored)

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

	sys/dev/pci/if_vgereg.h: revision 1.5
	sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.

Revision 1.60.8.3 / (download) - annotate - [select for diffs], Thu Oct 17 18:27:36 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.60.8.2: +33 -2 lines
Diff to previous 1.60.8.2 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

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

	sys/dev/pci/if_vgereg.h: revision 1.5
	sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Oct 8 14:26:27 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.74: +33 -2 lines
Diff to previous 1.74 (colored)

 Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Sep 13 07:55:07 2019 UTC (4 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

 if_flags is neither int nor short. It's unsigned short.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jul 9 08:46:59 2019 UTC (4 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.72: +3 -2 lines
Diff to previous 1.72 (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.63.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:16 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.63: +87 -76 lines
Diff to previous 1.63 (colored)

Sync with HEAD

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

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

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

 Whitespace fix (mainly tabify).

Revision 1.70 / (download) - annotate - [select for diffs], Thu May 23 10:40:39 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.69: +46 -46 lines
Diff to previous 1.69 (colored)

-No functional change:
  - Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
  - Simplify MII structure initialization.
  - u_int*_t -> uint*_t.
  - KNF

Revision 1.60.8.2 / (download) - annotate - [select for diffs], Mon May 13 12:40:13 2019 UTC (4 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.60.8.1: +3 -3 lines
Diff to previous 1.60.8.1 (colored) to branchpoint 1.60 (colored)

Pull up the following, via patch, requested by msaitoh in ticket #1263:

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

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

Revision 1.69 / (download) - annotate - [select for diffs], Thu Apr 11 08:50:59 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

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

Revision 1.68 / (download) - annotate - [select for diffs], Tue Mar 5 08:25:02 2019 UTC (5 years ago) by msaitoh
Branch: MAIN
Changes since 1.67: +2 -3 lines
Diff to previous 1.67 (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.62.2.4 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:07 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.62.2.3: +20 -17 lines
Diff to previous 1.62.2.3 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jan 22 03:42:27 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.66: +20 -17 lines
Diff to previous 1.66 (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.62.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:50 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.62.2.2: +4 -3 lines
Diff to previous 1.62.2.2 (colored) to branchpoint 1.62 (colored)

Sync with HEAD, resolve a few conflicts

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

use pci_intr_establish_xname() everywhere

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:51 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.62.2.1: +3 -3 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.65 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:32 2018 UTC (5 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:46 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Sync with HEAD

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 18 23:10:28 2018 UTC (5 years, 7 months ago) by sevan
Branch: MAIN
CVS Tags: pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Be consistent among ethernet drivers on the convention for printing ethernet
addresses.

NFC

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:01 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base
Branch point for: phil-wifi
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (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.62 / (download) - annotate - [select for diffs], Sun Jan 14 17:43:55 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.61: +2 -60 lines
Diff to previous 1.61 (colored)

Dedup. m_defrag is already a common function, no need to reimplement it
there. Meanwhile this should fix two bugs (that I couldn't investigate
more than that since I don't have this hardware): the mbuf passed to
vge_m_defrag was leaked, and the tags were not copied in the returned
mbuf.

Revision 1.53.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:08 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.53.2.2: +8 -16 lines
Diff to previous 1.53.2.2 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored)

update from HEAD

Revision 1.60.8.1 / (download) - annotate - [select for diffs], Tue Oct 24 08:38:59 2017 UTC (6 years, 4 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.60: +5 -8 lines
Diff to previous 1.60 (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.61 / (download) - annotate - [select for diffs], Tue Sep 26 07:42:06 2017 UTC (6 years, 5 months ago) by knakahara
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.60: +5 -8 lines
Diff to previous 1.60 (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.56.6.3 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:30 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.56.6.2: +5 -10 lines
Diff to previous 1.56.6.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

Sync with HEAD

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:33 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.58: +5 -10 lines
Diff to previous 1.58 (colored) next main 1.59 (colored)

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

Revision 1.60 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (7 years, 2 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.59: +2 -8 lines
Diff to previous 1.59 (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.59 / (download) - annotate - [select for diffs], Thu Dec 8 01:12:01 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.58: +5 -4 lines
Diff to previous 1.58 (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.56.6.2 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:04 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.56.6.1: +3 -3 lines
Diff to previous 1.56.6.1 (colored) to branchpoint 1.56 (colored)

Sync with HEAD

Revision 1.58 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (7 years, 8 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.57: +3 -3 lines
Diff to previous 1.57 (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.56.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:10 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Sync with HEAD

Revision 1.57 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (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.53.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:42 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.53.2.1: +2 -3 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.51.8.3 / (download) - annotate - [select for diffs], Thu May 22 11:40:25 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.51.8.2: +6 -7 lines
Diff to previous 1.51.8.2 (colored) to branchpoint 1.51 (colored) next main 1.52 (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.54.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:40 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.54: +4 -5 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

sync with head

Revision 1.56 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:25 2014 UTC (9 years, 11 months 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-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, 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.55: +4 -3 lines
Diff to previous 1.55 (colored)

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

Revision 1.55 / (download) - annotate - [select for diffs], Fri Sep 13 21:14:58 2013 UTC (10 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.54: +2 -4 lines
Diff to previous 1.54 (colored)

Remove unused variable

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

resync from head

Revision 1.54 / (download) - annotate - [select for diffs], Sat Mar 30 03:21:08 2013 UTC (10 years, 11 months 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.53: +4 -4 lines
Diff to previous 1.53 (colored)

remove trailing whitespace

Revision 1.51.8.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:21:33 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.51.8.1: +7 -10 lines
Diff to previous 1.51.8.1 (colored) to branchpoint 1.51 (colored)

sync with head

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jul 22 14:33:04 2012 UTC (11 years, 7 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.52: +7 -10 lines
Diff to previous 1.52 (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.51.8.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:48 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.51: +3 -4 lines
Diff to previous 1.51 (colored)

sync with head

Revision 1.51.12.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:42 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.51: +3 -4 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

merge to -current.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jan 30 19:41:21 2012 UTC (12 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, 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-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
Changes since 1.51: +3 -4 lines
Diff to previous 1.51 (colored)

Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.

Revision 1.41.4.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:49 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.41.4.4: +4 -6 lines
Diff to previous 1.41.4.4 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

sync with head.

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:35 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.50: +4 -6 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

sync with head

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:38 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.50: +4 -6 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

Sync with HEAD.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:27 2010 UTC (13 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.50: +4 -6 lines
Diff to previous 1.50 (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.41.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:48 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.41.4.3: +4 -9 lines
Diff to previous 1.41.4.3 (colored) to branchpoint 1.41 (colored)

sync with head

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:02 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.49: +4 -9 lines
Diff to previous 1.49 (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.41.4.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:51 2009 UTC (14 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.41.4.2: +12 -10 lines
Diff to previous 1.41.4.2 (colored) to branchpoint 1.41 (colored)

sync with head

Revision 1.49 / (download) - annotate - [select for diffs], Mon Sep 7 12:44:29 2009 UTC (14 years, 6 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.48: +12 -10 lines
Diff to previous 1.48 (colored)

Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on VT6122.

Revision 1.43.4.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:58 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.43.4.1: +53 -37 lines
Diff to previous 1.43.4.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Sync with HEAD.

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:35 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.41.4.1: +71 -55 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored)

sync with head

Revision 1.48 / (download) - annotate - [select for diffs], Sat May 16 07:34:05 2009 UTC (14 years, 9 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base
Changes since 1.47: +53 -37 lines
Diff to previous 1.47 (colored)

Split device_t/softc split, tested on VT6212L.

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Wed May 13 17:20:26 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.43: +21 -21 lines
Diff to previous 1.43 (colored)

Sync with HEAD.

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

Revision 1.47 / (download) - annotate - [select for diffs], Tue May 12 08:23:01 2009 UTC (14 years, 9 months ago) by cegger
Branch: MAIN
CVS Tags: jym-xensuspend-base
Changes since 1.46: +6 -6 lines
Diff to previous 1.46 (colored)

use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 6 10:34:32 2009 UTC (14 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.45: +16 -16 lines
Diff to previous 1.45 (colored)

struct device * -> device_t, no functional changes intended.

Revision 1.45 / (download) - annotate - [select for diffs], Wed May 6 09:25:16 2009 UTC (14 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

struct cfdata * -> cfdata_t, no functional changes intended.

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:12:58 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.41: +36 -48 lines
Diff to previous 1.41 (colored)

sync with head.

Revision 1.41.12.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:31:07 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.41.12.1: +3 -3 lines
Diff to previous 1.41.12.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Feb 9 12:11:16 2009 UTC (15 years ago) by nonaka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

fix comment.

Revision 1.41.12.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:18:26 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.41: +35 -47 lines
Diff to previous 1.41 (colored)

Sync with HEAD.

Revision 1.40.6.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:00 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.40.6.1: +33 -45 lines
Diff to previous 1.40.6.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

Sync with HEAD.

Revision 1.41.10.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:14:35 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.41: +35 -47 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.41.14.4 / (download) - annotate - [select for diffs], Sun Dec 7 19:10:53 2008 UTC (15 years, 3 months ago) by bouyer
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, 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, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.41.14.3: +12 -12 lines
Diff to previous 1.41.14.3 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Pull up following revision(s) (requested by joerg in ticket #143):
	sys/dev/pci/if_vge.c: revision 1.43 via patch
- ifconfig down support
- ALTQ support

Revision 1.41.14.3 / (download) - annotate - [select for diffs], Sun Nov 30 16:41:17 2008 UTC (15 years, 3 months ago) by bouyer
Branch: netbsd-5
Changes since 1.41.14.2: +11 -11 lines
Diff to previous 1.41.14.2 (colored) to branchpoint 1.41 (colored)

Back out ticket 143, it doesn't build.

Revision 1.41.14.2 / (download) - annotate - [select for diffs], Sun Nov 30 12:49:22 2008 UTC (15 years, 3 months ago) by bouyer
Branch: netbsd-5
Changes since 1.41.14.1: +3 -3 lines
Diff to previous 1.41.14.1 (colored) to branchpoint 1.41 (colored)

Apply patch, requested by joerg in ticket 143:
Fix build failure, vge_stop() needs 2 arguments in netbsd-5.

Revision 1.41.14.1 / (download) - annotate - [select for diffs], Sat Nov 29 20:55:24 2008 UTC (15 years, 3 months ago) by bouyer
Branch: netbsd-5
Changes since 1.41: +10 -10 lines
Diff to previous 1.41 (colored)

Pull up following revision(s) (requested by joerg in ticket #143):
	sys/dev/pci/if_vge.c: revision 1.43
- ifconfig down support
- ALTQ support

Revision 1.43 / (download) - annotate - [select for diffs], Wed Nov 26 21:34:07 2008 UTC (15 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.42: +10 -10 lines
Diff to previous 1.42 (colored)

- ifconfig down support
- ALTQ support

Revision 1.42 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:07 2008 UTC (15 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.41: +27 -39 lines
Diff to previous 1.41 (colored)

*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.

Revision 1.40.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:40 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.40: +31 -48 lines
Diff to previous 1.40 (colored)

Sync with HEAD.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Apr 10 19:13:37 2008 UTC (15 years, 10 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: yamt-nfs-mp, nick-hppapmap, netbsd-5, haad-dm
Changes since 1.40: +31 -48 lines
Diff to previous 1.40 (colored)

use aprint_*_dev and device_xname

Revision 1.36.8.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:48 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.36.8.1: +23 -56 lines
Diff to previous 1.36.8.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

sync with HEAD

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:57 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.38: +23 -56 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Sync with HEAD.

Revision 1.5.2.6 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:39 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.2.5: +13 -7 lines
Diff to previous 1.5.2.5 (colored) next main 1.6 (colored)

sync with head.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 7 01:21:58 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.39: +13 -7 lines
Diff to previous 1.39 (colored)

Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

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

Revision 1.5.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:44:02 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.2.4: +12 -51 lines
Diff to previous 1.5.2.4 (colored)

sync with head

Revision 1.38.8.1 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:39 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.38: +12 -51 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jan 19 22:10:19 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.38: +12 -51 lines
Diff to previous 1.38 (colored)

Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

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

I have made a few miscellaneous changes, too:

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

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

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

Revision 1.36.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:29:09 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.36: +4 -8 lines
Diff to previous 1.36 (colored)

sync with HEAD

Revision 1.5.2.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:33:04 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.2.3: +3 -3 lines
Diff to previous 1.5.2.3 (colored)

sync with head.

Revision 1.36.6.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:46:24 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.36.6.1: +3 -3 lines
Diff to previous 1.36.6.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

Sync with HEAD.

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

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:39:06 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync with HEAD.

Revision 1.34.2.4 / (download) - annotate - [select for diffs], Tue Oct 23 20:09:03 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.34.2.3: +3 -3 lines
Diff to previous 1.34.2.3 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Oct 19 12:00:49 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs, bouyer-xeni386
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 13:41:47 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.34.2.2: +3 -7 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored)

Sync with head.

Revision 1.36.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:19 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.36: +3 -7 lines
Diff to previous 1.36 (colored)

Sync with HEAD.

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:37:05 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.2.2: +11 -15 lines
Diff to previous 1.5.2.2 (colored)

sync with head.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:21:03 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.36: +3 -7 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

Sync with HEAD.

Revision 1.33.8.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:04:32 2007 UTC (16 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.37 / (download) - annotate - [select for diffs], Sat Sep 1 07:32:30 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: bouyer-xenamd64
Changes since 1.36: +3 -7 lines
Diff to previous 1.36 (colored)

Change a bazillion occurrences of code resembling this,

	error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:47 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.34.2.1: +3 -3 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

Sync with head.

Revision 1.34.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:07:44 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

Sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jul 9 21:00:56 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, matt-armv6, jmcneill-pm
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Merge some of the less invasive changes from the vmlocking branch:

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

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Sun Jul 1 21:48:12 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Adapt to callout API change.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Mon Jun 18 09:59:23 2007 UTC (16 years, 8 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #731):
	sys/dev/pci/if_vge.c: revision 1.35
Fix one more bug I introduced in rev 1.21:
Clear sc->sc_rx_consumed before allocating RX mbufs by vge_newbuf()
in vge_intr() otherwise vge_newbuf() might get KASSERT() failure
on DIAGNOSTIC kernel when the interface is reinitialized during RX.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jun 12 14:32:36 2007 UTC (16 years, 8 months ago) by tsutsui
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

Fix one more bug I introduced in rev 1.21:
Clear sc->sc_rx_consumed before allocating RX mbufs by vge_newbuf()
in vge_intr() otherwise vge_newbuf() might get KASSERT() failure
on DIAGNOSTIC kernel when the interface is reinitialized during RX.

Revision 1.33.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:55:22 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Sync with HEAD.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:23 2007 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.9.10.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:41 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.9.10.1: +149 -105 lines
Diff to previous 1.9.10.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:48:45 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.2.1: +855 -869 lines
Diff to previous 1.5.2.1 (colored)

sync with head.

Revision 1.9.12.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:17:44 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.9.12.1: +570 -502 lines
Diff to previous 1.9.12.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

sync with head.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Dec 1 11:30:55 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, wrstuden-fixsa, netbsd-4
Changes since 1.32: +31 -8 lines
Diff to previous 1.32 (colored)

Free resouces on failure in vge_allocmem().

Revision 1.32 / (download) - annotate - [select for diffs], Fri Dec 1 11:06:59 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.31: +14 -15 lines
Diff to previous 1.31 (colored)

- vge_probe() -> vge_match()
- KNF, unwrap lines

Revision 1.31 / (download) - annotate - [select for diffs], Sun Nov 26 16:11:51 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.30: +2 -10 lines
Diff to previous 1.30 (colored)

Fix stupid bugs found on sparc64:
- checking if dmamap != NULL is not valid because dmamap is not cleared
  in bus_dmamap_unload(9)
- no need check RX mbufs and call m_freem() and bus_dmamap_unload()
  in vge_init() since it's done in prior vge_stop()

Now vge(4) works fine on Ultra5.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Nov 26 15:40:14 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Include <sys/device.h> for struct device.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Nov 26 15:04:15 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.28: +87 -59 lines
Diff to previous 1.28 (colored)

- prepare inline functions to set 48 bit DMA address which avoid 64 bit
  arithmetic on ILP32 (sizeof(bus_addr_t) == 4, exactly) hosts
- prepare and use VGE_PREV_TXDESC() macro
- use VGE_[TR]XDESCSYNC() calls more efficiently
- wrap a sanity check against VGE_RDSTS_OWN in vge_newbuf()
  with #ifdef DIAGNOSTIC since it should not happen
- use sc->sc_tx_free (number of free TX descs) to check if TX packets are
  queued or sent
- call vge_start() only if the interupt is actually handled by this driver
- some misc cosmetics

Revision 1.28 / (download) - annotate - [select for diffs], Sun Nov 26 13:09:32 2006 UTC (17 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.27: +22 -21 lines
Diff to previous 1.27 (colored)

Introduce a new VGE_RX_BUFSIZE macro which represent default RX mbuf
length and define VGE_RX_PAD (which is 4 bytes) for ETHER_ALIGN (2 bytes)
padding only in !__NO_STRICT_ALIGNMENT case to avoid confusion.
As per comments from Murata Shuuichirou in PR kern/31323.
Tested on i386 and macppc.

Revision 1.9.10.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:31 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.9: +776 -834 lines
Diff to previous 1.9 (colored)

Sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:09 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

__unused removal on arguments; approved by core.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Nov 4 05:07:16 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.25: +12 -8 lines
Diff to previous 1.25 (colored)

Rather than copying m_pkthdr.csum_flags in m_defrag() (which was
committed in rev 1.22), save it before calling m_defrag().

I haven't confirmed whether the m_pkthdr.csum_flags is preserved during
m_defrag(), but the previous way sometimes makes vge(4) chip mad...

Revision 1.25 / (download) - annotate - [select for diffs], Sat Nov 4 04:40:00 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Return a proper error from vge_encap() if m_defrag() fails.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 1 18:11:18 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.23: +11 -9 lines
Diff to previous 1.23 (colored)

Fix another botch in rev 1.14:
vge_encap() should bail out if there is not enough free
TX descriptor _OR_ TX descriptor is still owned by the chip.

Anyway, we already check if the TX descriptor already has an mbuf
to be sent in vge_start() so no need to bother to check sc_tx_free
and VGE_TDSTS_OWN in the descriptor in normal case, then make it use
KASSERT(9) or wrap with #ifdef DIAGNOSTIC.

XXX1: I don't know why original FreeBSD driver checks
      if a number of free TX descriptors is more than two, not zero.
XXX2: Is it better to check a number of free descriptors in vge_start()
      like other our drivers rather than mbuf chain for each descriptor?

Revision 1.23 / (download) - annotate - [select for diffs], Wed Nov 1 17:13:37 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.22: +2 -3 lines
Diff to previous 1.22 (colored)

Remove a debug statement which was slipped in rev 1.21.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 1 16:26:27 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Also copy csum_flags and csum_data in vge_m_defrag().
Fix checksum error problem on sending fragmented large packets,
which was introduced in rev 1.14.

BTW, should we have m_defrag() in MI for other drivers?

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 31 14:13:30 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.20: +458 -441 lines
Diff to previous 1.20 (colored)

Make vge(4) look a NetBSD native driver like pcn(4) or epic(4) etc:
- merge if_vgevar.h into if_vge.c since no other file refers it
- rename some macro (VGE_TX_DESC_CNT -> VGE_NTXDESC etc.) and structs
- change prefixes of structure members to represent parents
- put TX and RX descriptors into single struct vge_control_data and
  allocate DMA memory at once
- no need to specify BUS_DMA_ALLOCNOW
- define appropriate macro for offsets and addresses of DMA descriptors
- define struct vge_txsoft and vge_rxsoft, and put common data for
  each descriptor into them
- remove struct vge_list_data and move its members into struct vge_softc
- remove #ifdef DEVICE_POLLING code we don't support
- merge vge_[tr]x_list_init() functions into vge_init()
- use aprint_error() to print errors
- put splnet(9) where appropriate and remove unused VGE_{LOCK,UNLOCK}() macro
- clear TX timeout only if there is no pending descriptor
- check dm_nsegs properly otherwise padding short packets could fail
- prepare zero'ed DMA memory to pad short packets rather than putting
  random data
- fix a wrong VGE_TXDESCSYNC() usage which should be VGE_TXFRAGSYNC()

Tested on my i386 which is my development machine.
(more bus_dmamap_sync(9) cleanup will be done later)

Revision 1.9.12.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:17 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.9: +422 -504 lines
Diff to previous 1.9 (colored)

sync with head

Revision 1.20 / (download) - annotate - [select for diffs], Sat Oct 21 16:26:35 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.19: +19 -7 lines
Diff to previous 1.19 (colored)

Fix hardware VLAN tagging support on vge(4):

- On TX, vge(4) seems to assume that tags are written in little endian.
  We already use htole32() to write values into descriptors,
  so extra byteswap by htons() is not needed there.

- On RX, vge(4) seems to store tags in network byteorder.
  We have to swap byteorder regardless of host's byteorder
  (i.e. we have to use bswap16() rather than ntohs())
  because we already use le32toh() to read values from descriptors.

Anyway, no need to use htons()/ntohs() because there is no stream data.

Tested on both i386 and macppc, and OK'ed by Pavel Cahyna.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Oct 17 09:55:12 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Fix a typo in comment.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Oct 15 11:52:36 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

In vge_newbuf(), don't adjust packet length twice by m_adj(9)
in case of __NO_STRICT_ALIGNMENT. We can adjust m_data directly
since it's allocated by MCLGET(9) just above.
(though the length is not used anyway)

Revision 1.17 / (download) - annotate - [select for diffs], Sun Oct 15 10:54:15 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

Umm, remove a DELAY() added in previous. It seems to cause another problem.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 15 10:33:25 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.15: +9 -2 lines
Diff to previous 1.15 (colored)

On sgimips (R5000 O2), it seems that the first EEPROM read data
right after vge_reset() could be corrupted. For workaround, add a
dummy EEPROM read in vge_reset() so that MAC address is properly
set on the machine.
While here, add a DELAY() in busy loop in vge_read_eeprom().

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 14 19:53:51 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.14: +239 -269 lines
Diff to previous 1.14 (colored)

- use MGETHDR() and MCLGET() rather than m_gethdr() and m_clget()
- KNF, ANSIfy, remove register decls
- some more cosmetics

Revision 1.14 / (download) - annotate - [select for diffs], Sat Oct 14 19:10:35 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.13: +140 -181 lines
Diff to previous 1.13 (colored)

- call bus_dmamap_sync() properly  (sigh)
- merge vge_dma_map_rx_desc() and vge_dma_map_tx_desc() into callers
- declare DMA descs volatile
- remove unused macro/declarations
- bzero -> memset
- some more cosmetics

Revision 1.13 / (download) - annotate - [select for diffs], Sat Oct 14 16:45:46 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.12: +16 -24 lines
Diff to previous 1.12 (colored)

- use correct dmamap size for TX/RX DMA descriptors
- use __NO_STRICT_ALIGNMENT directly rather than local VGE_FIXUP_RX
- no need to use BUS_DMA_ALLOCNOW
- remove unneeded members from softc

XXX: Is vge_fixup_rx() really more efficient than memmove(9),
XXX: or allocating a new buffer and memcpy(9) into it?
XXX: Anyway, vge(4) is not recommended for non-x86 hosts at all
XXX: because it requires copying buffers by CPU on RX.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Oct 14 15:53:23 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.11: +4 -3 lines
Diff to previous 1.11 (colored)

Umm, set Ethernet address into softc properly.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 14 11:29:15 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.10: +22 -45 lines
Diff to previous 1.10 (colored)

- fix eeprom read function so that MAC address can be read correctly
  on big endian machines
- add some missed byteswap functions for DMA descriptors

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:30 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.9: +5 -4 lines
Diff to previous 1.9 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.8.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:52:18 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

sync with head

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:05:05 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5: +39 -17 lines
Diff to previous 1.5 (colored)

sync with head.

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:14 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

Sync with head.

Revision 1.8.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:25:35 2006 UTC (17 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

sync with head.

Revision 1.8.8.1 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:26 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

sync with head.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Mar 8 23:46:27 2006 UTC (18 years ago) by lukem
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Dec 24 20:27:42 2005 UTC (18 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, elad-kernelauth
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.2.2.5 / (download) - annotate - [select for diffs], Sun Dec 11 10:28:58 2005 UTC (18 years, 2 months ago) by christos
Branch: ktrace-lwp
Changes since 1.2.2.4: +3 -3 lines
Diff to previous 1.2.2.4 (colored) next main 1.3 (colored)

Sync with head.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:11 2005 UTC (18 years, 3 months ago) by yamt
Branch: yamt-readahead
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 21 20:25:15 2005 UTC (18 years, 3 months ago) by martin
Branch: MAIN
CVS Tags: yamt-readahead-base3, yamt-readahead-base2, ktrace-lwp-base
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

This driver does only access the bus_space_tag via bus_space_* functions,
so there is no need to map it linear. From Garrett D'Amore in
PR kern/32137.

Revision 1.2.2.4 / (download) - annotate - [select for diffs], Thu Nov 10 14:06:02 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.2.2.3: +39 -15 lines
Diff to previous 1.2.2.3 (colored)

Sync with HEAD. Here we go again...

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Sun Sep 11 22:06:32 2005 UTC (18 years, 5 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.4: +35 -13 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Pull up following revision(s) (requested by christos in ticket #756):
	sys/dev/pci/if_vge.c: revision 1.6
PR/31130: FUKAUMI Naoki: Fix vge(4) SIOC{ADD,DEL}MULTI handling

Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 8 18:18:10 2005 UTC (18 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.5: +35 -13 lines
Diff to previous 1.5 (colored)

PR/31130: FUKAUMI Naoki: Fix vge(4) SIOC{ADD,DEL}MULTI handling

Revision 1.5 / (download) - annotate - [select for diffs], Mon May 2 15:34:32 2005 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.4: +6 -4 lines
Diff to previous 1.4 (colored)

split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx.

Revision 1.4.6.2 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:06 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.4.6.1: +2262 -0 lines
Diff to previous 1.4.6.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

sync with -current

Revision 1.4.4.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:11 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.4.4.1: +2262 -0 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Tue Mar 8 13:53:10 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.2.2.2: +103 -94 lines
Diff to previous 1.2.2.2 (colored)

Sync with HEAD.

Revision 1.4.6.1, Sat Mar 5 14:51:21 2005 UTC (19 years ago) by kent
Branch: kent-audio2
Changes since 1.4: +0 -2262 lines
FILE REMOVED

file if_vge.c was added on branch kent-audio2 on 2005-04-29 11:29:06 +0000

Revision 1.4.4.1, Sat Mar 5 14:51:21 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.4: +0 -2262 lines
FILE REMOVED

file if_vge.c was added on branch yamt-km on 2005-03-19 08:35:11 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 5 14:51:21 2005 UTC (19 years ago) by jdolecek
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: yamt-km, netbsd-3, kent-audio2
Changes since 1.3: +3 -8 lines
Diff to previous 1.3 (colored)

g/c debugging printf

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 5 14:37:15 2005 UTC (19 years ago) by jdolecek
Branch: MAIN
Changes since 1.2: +102 -88 lines
Diff to previous 1.2 (colored)

modify vge_m_defrag() to support > MCLBYTES chains, by allocating appropriate
number of mbuf clusters; also don't free the original mbuf chain

simplify vge_encap() and make error reporting more consistent

normalize vge_start() (including use of IFQ_* macros), and handle the case
when the input mbuf chain is defragmented

JUMBO packets seem to work fine now

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Fri Mar 4 16:45:19 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.2.2.1: +2253 -0 lines
Diff to previous 1.2.2.1 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.2.2.1, Sun Feb 27 00:27:33 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.2: +0 -2253 lines
FILE REMOVED

file if_vge.c was added on branch ktrace-lwp on 2005-03-04 16:45:19 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:33 2005 UTC (19 years ago) by perry
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

nuke trailing whitespace

Revision 1.1 / (download) - annotate - [select for diffs], Sun Feb 20 18:34:33 2005 UTC (19 years ago) by jdolecek
Branch: MAIN

Add device driver support for the VIA Networking Technologies VT6122
gigabit ethernet chip and integrated 10/100/1000 copper PHY.

Obtained from: FreeBSD

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>