The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


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

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

Compile-tested on amd64/ALL.

Suggested by knakahara@

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Dec 20 05:08:34 2023 UTC (11 months, 3 weeks ago) by thorpej
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -3 lines
Remove unnecessary <sys/malloc.h>.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Sep 2 23:48:10 2022 UTC (2 years, 3 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.54: preferred, colored
Changes since revision 1.54: +7 -3 lines
Remove unnecessary inclusion of <net/netisr.h>.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Aug 21 14:42:24 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +6 -4 lines
jme_ifstart(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success (and fatal-to-packet errors)".

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Aug 21 14:36:15 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +9 -10 lines
Don't allow jme_encap() to modify the head-of-mbuf-chain pointer.  Instead,
act on fatal packet errors in jme_ifstart().

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Aug 21 14:12:59 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +66 -70 lines
jme_encap(): Fix up some botched formatting, and don't use (*m_head)
all over the place (just assign m = *m_head earlier).  NFCI.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Mar 16 10:08:02 2022 UTC (2 years, 8 months ago) by andvar
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
s/watchog/watchdog in comment and log message, one wording fix in comment.

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

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

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

Revision 1.35.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:09 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.35.2.1: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.2.1: +21 -20 lines
Merge changes from current as of 20200406

Revision 1.46.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.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +21 -20 lines
Sync with head.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sat Feb 8 07:20:41 2020 UTC (4 years, 10 months ago) by maxv
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +8 -9 lines
localify

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Feb 7 00:04:28 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -4 lines
Use callout_setfunc() / callout_schedule().

Revision 1.44.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 31 11:17:32 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.44.2.1: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.2.1: +3 -3 lines
Pull up following revision(s) (requested by msaitoh in ticket #672):

	sys/dev/ic/tulip.c: revision 1.198
	sys/dev/pci/if_jme.c: revision 1.45
	sys/dev/pci/agp.c: revision 1.86
	sys/dev/pci/if_lii.c: revision 1.27
	sys/dev/acpi/thinkpad_acpi.c: revision 1.47
	sys/dev/scsipi/scsipi_base.c: revision 1.183
	sys/dev/ic/aic6915reg.h: revision 1.6

 Fix undefined behavior in thinkpad_mask_init(). Found by kUBSan.

 Use unsigned when initialize the transmit completion ring to avoid undefined
behavior. Found by kUBSan.

Avoid undefined behavior when setting multicast address. found by kUBSan.

 Use unsigned to avoid undefined behavior in agpattach(). Found by kUBSan.

 Avoid undefined behavior in jme_mii_write(). Found by kUBSan.

 Use unsigned to avoid undefined behavior in lii_setmulti().

 Use unsigned to avoid undefined behavior in scsipi_{get,put}_tag().

Found by kUBSan.

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

Revision 1.31.8.3: download - view: text, markup, annotated - select for diffs
Sun Nov 10 13:34:46 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.31.8.2: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.8.2: +3 -3 lines
Pull up following revision(s) (requested by msaitoh in ticket #1430):

	sys/dev/pci/if_jme.c: revision 1.46

A * is missing here. This could cause a use-after-free.
Found by the lgtm bot.

Revision 1.44.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 24 16:25:33 2019 UTC (5 years, 1 month ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-0-RC1
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
Pull up following revision(s) (requested by msaitoh in ticket #376):

	sys/dev/pci/if_jme.c: revision 1.46

A * is missing here. This could cause a use-after-free.
Found by the lgtm bot.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Sep 23 06:50:04 2019 UTC (5 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3 lines
A * is missing here. This could cause a use-after-free.

Found by the lgtm bot.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Aug 7 15:29:02 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
 Avoid undefined behavior in jme_mii_write(). Found by kUBSan.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Jul 9 08:46:59 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.43: preferred, colored
Changes since revision 1.43: +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.35.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.35: preferred, colored
Changes since revision 1.35: +76 -69 lines
Sync with HEAD

Revision 1.43: 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.42: preferred, colored
Changes since revision 1.42: +6 -3 lines
 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue May 28 05:07:13 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -5 lines
 Fix typos. From OpenBSD r1.52.

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

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu May 23 10:57:28 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +43 -40 lines
-No functional change:
  - KNF
  - u_int*_t -> uint*_t.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Apr 22 06:35:39 2019 UTC (5 years, 7 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -4 lines
 Remove extra SIOCSIFMEDIA check.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Feb 5 06:17:03 2019 UTC (5 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
 Remove very old IFF_NOTRAILERS flag.

Revision 1.32.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.32.2.3: preferred, colored; branchpoint 1.32: preferred, colored; next MAIN 1.33: preferred, colored
Changes since revision 1.32.2.3: +20 -17 lines
Sync with HEAD

Revision 1.37: 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.36: preferred, colored
Changes since revision 1.36: +20 -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.32.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.32.2.2: preferred, colored; branchpoint 1.32: preferred, colored
Changes since revision 1.32.2.2: +4 -4 lines
Sync with HEAD, resolve a few conflicts

Revision 1.36: 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.35: preferred, colored
Changes since revision 1.35: +4 -4 lines
use pci_intr_establish_xname() everywhere

Revision 1.32.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.32.2.1: preferred, colored; branchpoint 1.32: preferred, colored
Changes since revision 1.32.2.1: +3 -3 lines
Sync with HEAD

Revision 1.31.8.2: download - view: text, markup, annotated - select for diffs
Thu Jul 26 23:55:30 2018 UTC (6 years, 4 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.31.8.1: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.8.1: +2 -4 lines
Pull up following revision(s) (requested by msaitoh in ticket #938):
	sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
	sys/arch/amiga/dev/if_es.c: revision 1.58
	sys/arch/amiga/dev/if_qn.c: revision 1.45
	sys/arch/arm/at91/at91emac.c: revision 1.20
	sys/arch/arm/ep93xx/epe.c: revision 1.37
	sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
	sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
	sys/arch/mac68k/dev/if_mc.c: revision 1.46
	sys/arch/macppc/dev/am79c950.c: revision 1.39
	sys/arch/newsmips/apbus/if_sn.c: revision 1.40
	sys/arch/next68k/dev/mb8795.c: revision 1.59
	sys/arch/playstation2/dev/if_smap.c: revision 1.25
	sys/arch/playstation2/dev/if_smap.c: revision 1.26
	sys/arch/sun2/dev/if_ec.c: revision 1.28
	sys/arch/sun3/dev/if_ie.c: revision 1.63
	sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
	sys/dev/bi/if_ni.c: revision 1.45
	sys/dev/cadence/if_cemac.c: revision 1.12
	sys/dev/ic/am7990.c: revision 1.78
	sys/dev/ic/am79900.c: revision 1.27
	sys/dev/ic/an.c: revision 1.67
	sys/dev/ic/cs89x0.c: revision 1.40
	sys/dev/ic/dm9000.c: revision 1.13
	sys/dev/ic/dm9000.c: revision 1.14
	sys/dev/ic/dp8390.c: revision 1.88
	sys/dev/ic/elink3.c: revision 1.141
	sys/dev/ic/elinkxl.c: revision 1.122
	sys/dev/ic/hme.c: revision 1.98
	sys/dev/ic/i82586.c: revision 1.77
	sys/dev/ic/lance.c: revision 1.53
	sys/dev/ic/mb86950.c: revision 1.27
	sys/dev/ic/mb86960.c: revision 1.86
	sys/dev/ic/mtd803.c: revision 1.34
	sys/dev/ic/pdq_ifsubr.c: revision 1.59
	sys/dev/ic/rrunner.c: revision 1.86
	sys/dev/ic/seeq8005.c: revision 1.58
	sys/dev/ic/sgec.c: revision 1.47
	sys/dev/ic/smc90cx6.c: revision 1.72
	sys/dev/ic/smc91cxx.c: revision 1.96
	sys/dev/ic/tropic.c: revision 1.49
	sys/dev/ic/wi.c: revision 1.245
	sys/dev/isa/if_eg.c: revision 1.93
	sys/dev/isa/if_el.c: revision 1.95
	sys/dev/isa/if_iy.c: revision 1.101
	sys/dev/ofw/ofnet.c: revision 1.58
	sys/dev/pci/if_alc.c: revision 1.27
	sys/dev/pci/if_de.c: revision 1.152
	sys/dev/pci/if_fpa.c: revision 1.61
	sys/dev/pci/if_jme.c: revision 1.34
	sys/dev/pci/if_tl.c: revision 1.108
	sys/dev/pci/if_vte.c: revision 1.19
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
	sys/dev/pcmcia/if_cnw.c: revision 1.62
	sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
	sys/dev/pcmcia/if_ray.c: revision 1.89
	sys/dev/pcmcia/if_xi.c: revision 1.81
	sys/dev/pcmcia/mhzc.c: revision 1.51
	sys/dev/pcmcia/xirc.c: revision 1.34
	sys/dev/qbus/if_de.c: revision 1.33
	sys/dev/qbus/if_qe.c: revision 1.78
	sys/dev/qbus/if_qt.c: revision 1.22
	sys/dev/sbus/be.c: revision 1.87
	sys/dev/sbus/qe.c: revision 1.68
	sys/dev/scsipi/if_se.c: revision 1.96
	sys/dev/usb/if_atu.c: revision 1.59
	sys/net/if_l2tp.c: revision 1.28 via patch
	sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.

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

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Jun 22 04:17:42 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -4 lines
 It's not required to include net/bpfdesc.h. Remove it.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Jun 1 08:56:00 2018 UTC (6 years, 6 months ago) by maxv
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -3 lines
Rename

	M_CSUM_DATA_IPv6_HL -> M_CSUM_DATA_IPv6_IPHL
	M_CSUM_DATA_IPv6_HL_SET -> M_CSUM_DATA_IPv6_SET

Reduces the diff against IPv4. Also, clarify the definitions.

Revision 1.21.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:08 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.21.2.2: preferred, colored; branchpoint 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21.2.2: +7 -10 lines
update from HEAD

Revision 1.31.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-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +5 -7 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.32: 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.31: preferred, colored
Changes since revision 1.31: +5 -7 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.26.4.5: 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.26.4.4: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.4.4: +2 -4 lines
Sync with HEAD

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

Revision 1.31: 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.30: preferred, colored
Changes since revision 1.30: +2 -4 lines
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net

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

Revision 1.30: 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.29: preferred, colored
Changes since revision 1.29: +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.26.4.3: 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.26.4.2: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.4.2: +3 -3 lines
Sync with HEAD

Revision 1.29: 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
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +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.26.4.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:59 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.26.4.1: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.4.1: +4 -3 lines
Sync with HEAD

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Sep 12 19:19:11 2015 UTC (9 years, 3 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -2 lines
missing splx() found by brainy

Revision 1.26.4.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.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Sync with HEAD

Revision 1.27: 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-20150606
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Convert sys/dev to use <sys/rndsource.h>.

Revision 1.21.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.21.2.1: preferred, colored; branchpoint 1.21: preferred, colored
Changes since revision 1.21.2.1: +3 -10 lines
Rebase to HEAD as of a few days ago.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:36 2014 UTC (10 years, 4 months ago) by tls
Branches: MAIN
CVS tags: tls-maxphys-base, 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.25: preferred, colored
Changes since revision 1.25: +3 -3 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.17.4.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:25 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.17.4.2: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.2: +6 -13 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.22.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.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +4 -11 lines
sync with head

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

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

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

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

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

Revision 1.25: 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-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +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.24: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:10 2014 UTC (10 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -8 lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Oct 17 21:06:15 2013 UTC (11 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -4 lines
- remove unused variables
- move debugging code inside debugging sections

Revision 1.21.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.21: preferred, colored
Changes since revision 1.21: +4 -4 lines
resync from head

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Mar 30 03:21:05 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.21: preferred, colored
Changes since revision 1.21: +4 -4 lines
remove trailing whitespace

Revision 1.17.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:29 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.1: +8 -10 lines
sync with head

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jul 22 14:33:02 2012 UTC (12 years, 4 months ago) by matt
Branches: MAIN
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.20: preferred, colored
Changes since revision 1.20: +4 -6 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.20: download - view: text, markup, annotated - select for diffs
Sat Jun 2 21:36:44 2012 UTC (12 years, 6 months ago) by dsl
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +6 -6 lines
Add some pre-processor magic to verify that the type of the data item
  passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.

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

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:40 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +4 -13 lines
merge to -current.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Feb 2 19:43:05 2012 UTC (12 years, 10 months ago) by tls
Branches: 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
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -13 lines
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Nov 19 22:51:23 2011 UTC (13 years ago) by tls
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

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

Revision 1.13.4.3: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:41:50 2011 UTC (13 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13.4.2: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.4.2: +45 -10 lines
sync with head

Revision 1.4.6.4: download - view: text, markup, annotated - select for diffs
Tue Apr 5 06:12:46 2011 UTC (13 years, 8 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.4.6.3: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.6.3: +45 -10 lines
Pull up following revision(s) (requested by bouyer in ticket #1588):
	sys/dev/pci/if_jme.c: revision 1.17
Some bus_dma(9)-related and memory allocation fixes:
- always bus_dmamap_unload() before recycling a receive descriptor
- make sure to not sleep from interrupt context: call bus_dmamap_load with
  M_NOWAIT, and create dma maps BUS_DMA_ALLOCNOW.
- if a receive descriptor has a NULL mbuf try to allocate a new one, don't
  try to receive it.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Mar 30 18:11:37 2011 UTC (13 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +47 -12 lines
Some bus_dma(9)-related and memory allocation fixes:
- always bus_dmamap_unload() before recycling a receive descriptor
- make sure to not sleep from interrupt context: call bus_dmamap_load with
  M_NOWAIT, and create dma maps BUS_DMA_ALLOCNOW.
- if a receive descriptor has a NULL mbuf try to allocate a new one, don't
  try to receive it.

Revision 1.13.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:42 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.13.4.1: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.4.1: +26 -4 lines
sync with head

Revision 1.4.6.3: download - view: text, markup, annotated - select for diffs
Sun Jan 16 12:51:59 2011 UTC (13 years, 10 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.4.6.2: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.6.2: +26 -3 lines
Pull up following revision(s) (requested by kochi in ticket #1525):
	sys/dev/pci/if_jme.c: revision 1.16
Try reading MAC addr from register if it fails to read from EEPROM.
Copied from FreeBSD driver.
Without this my JMC261 doesn't get MAC address properly.
OK'ed by bouyer@

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jan 9 00:12:45 2011 UTC (13 years, 11 months ago) by kochi
Branches: MAIN
CVS tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +26 -3 lines
Try reading MAC addr from register if it fails to read from EEPROM.
Copied from FreeBSD driver.

Without this my JMC261 doesn't get MAC address properly.

OK'ed by bouyer@

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Nov 13 13:52:06 2010 UTC (14 years, 1 month ago) by uebayasi
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -3 lines
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.

Revision 1.9.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:47 2010 UTC (14 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.2.4: preferred, colored; branchpoint 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.2.4: +4 -6 lines
sync with head.

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

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:36 2010 UTC (14 years, 7 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +4 -6 lines
Sync with HEAD.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Apr 5 07:20:26 2010 UTC (14 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +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.9.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:46 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.2.3: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.3: +22 -25 lines
sync with head

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:07:01 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +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.12: download - view: text, markup, annotated - select for diffs
Mon Oct 19 18:41:15 2009 UTC (15 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: matt-premerge-20091211, jym-xensuspend-nbase
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -7 lines
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Sep 27 12:52:59 2009 UTC (15 years, 2 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +20 -11 lines
Replace shutdownhook_establish(9) with pmf_device_register1(9).
Compile test only.

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:57 2009 UTC (15 years, 4 months ago) by jym
Branches: jym-xensuspend
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: +6 -5 lines
Sync with HEAD.

Revision 1.9.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 18 14:53:04 2009 UTC (15 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.9.2.2: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.2: +6 -5 lines
sync with head.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jun 26 00:24:18 2009 UTC (15 years, 5 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -5 lines
A lot of good it does, but let this build with 'no options INET'.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:20:25 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -5 lines
Sync with HEAD.

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

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

Revision 1.4.4.3: 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.4.4.2: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.4.2: +5 -5 lines
Sync with HEAD.

Revision 1.9.2.1
Sat Apr 18 14:58:03 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
FILE REMOVED
Changes since revision 1.9: +0 -2161 lines
file if_jme.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:57 +0000

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Apr 18 14:58:03 2009 UTC (15 years, 7 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4 lines
Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Mar 18 17:06:49 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -4 lines
bcopy -> memcpy

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Mar 18 16:00:19 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
bzero -> memset

Revision 1.4.4.2: 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.4.4.1: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.1: +16 -5 lines
Sync with HEAD.

Revision 1.4.6.2: download - view: text, markup, annotated - select for diffs
Mon Feb 2 20:50:11 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, 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
Diff to: previous 1.4.6.1: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.6.1: +16 -5 lines
Pull up following revision(s) (requested by bouyer in ticket #388):
	sys/dev/pci/if_jme.c: revision 1.6
Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Jan 31 13:57:03 2009 UTC (15 years, 10 months ago) by bouyer
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +16 -5 lines
Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.

Revision 1.4.4.1: 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.4: preferred, colored
Changes since revision 1.4: +5 -5 lines
Sync with HEAD.

Revision 1.4.6.1: download - view: text, markup, annotated - select for diffs
Sat Jan 17 22:51:03 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC1
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -5 lines
Pull up following revision(s) (requested by bouyer in ticket #278):
	sys/dev/pci/if_jme.c: revision 1.5
	sys/dev/pci/if_jmereg.h: revision 1.3
According to the latest datasheet I have (1.09), the transmitter and
ckecksum offload clocks needs to be programmed according to the negociated
speed; make it so. This makes the sample JME260 I have work.

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

Revision 1.5.2.1
Fri Jan 16 19:56:06 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
FILE REMOVED
Changes since revision 1.5: +0 -2150 lines
file if_jme.c was added on branch mjf-devfs2 on 2009-01-17 13:29:00 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jan 16 19:56:06 2009 UTC (15 years, 10 months ago) by bouyer
Branches: MAIN
CVS tags: mjf-devfs2-base
Branch point for: mjf-devfs2
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -5 lines
According to the latest datasheet I have (1.09), the transmitter and ckecksum
offload clocks needs to be programmed according to the negociated speed;
make it so. This makes the sample JME260 I have work.

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:16:39 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.4.2.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.1: +2150 -0 lines
Sync with HEAD.

Revision 1.4.2.1
Thu Oct 16 21:22:32 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
FILE REMOVED
Changes since revision 1.4: +0 -2150 lines
file if_jme.c was added on branch haad-dm on 2008-10-19 22:16:39 +0000

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Oct 16 21:22:32 2008 UTC (16 years, 1 month ago) by abs
Branches: MAIN
CVS tags: netbsd-5-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -2 lines
Fix compilation if !INET6

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Oct 13 17:57:32 2008 UTC (16 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +216 -131 lines
Add support for jumbo frames.
Some performances tweaks (including better defaults for interrupt mitigation)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Oct 12 11:27:12 2008 UTC (16 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +45 -46 lines
Fix reading MAC address from eeprom: don't forget to read the last
descriptor.
While there, white space fixes.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Oct 11 21:54:12 2008 UTC (16 years, 2 months ago) by bouyer
Branches: MAIN
jme(4), a driver for JMicron Technologies JME250 Gigabit Ethernet and
JME260 Fast Ethernet PCI Express controllers.
Written with a lot of cut-n-paste from the FreeBSD jme(4) driver.
No support for jumbo ethernet frames yet (but should come soon).
Thanks to JMicron Technologies for providing me sample boards and
documentation for this work.

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>