The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


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

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

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

PR kern/58377

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Sep 24 18:12:42 2022 UTC (2 years, 7 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-1-RELEASE, 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.46: preferred, colored
Changes since revision 1.46: +2 -3 lines
Remove unnecessary include of <sys/malloc.h>.

Revision 1.44.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:29 2021 UTC (3 years, 10 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.44.6.1: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.6.1: +4 -4 lines
Sync w/ HEAD.

Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:18 2021 UTC (3 years, 11 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +4 -4 lines
sync with head

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun May 30 00:17:20 2021 UTC (3 years, 11 months ago) by joerg
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
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -4 lines
Unindent code to match the logical structure, ignoring the commented out if.

This code should be rewritten to use BUS_DMA_WAITOK, but that's a
project of its own.

Revision 1.44.6.1: download - view: text, markup, annotated - select for diffs
Thu May 13 00:47:31 2021 UTC (4 years ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +18 -31 lines
Sync with HEAD.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat May 8 00:27:02 2021 UTC (4 years ago) by thorpej
Branches: MAIN
CVS tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +18 -31 lines
Use pci_compatible_match().

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Sep 15 08:33:40 2020 UTC (4 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -3 lines
mii_detach() must come before ifmedia_fini(), otherwise mii_detach()
will have a NULL mutex and fault.

this appears to have been introduced in february, and may be a problem
in other drivers converted to use ifmedia_fini().  i've only fixed the
two that were faulting for me on sunblade 2000 during reboot.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu Jul 2 09:02:04 2020 UTC (4 years, 10 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
prop_data_data_nocopy -> prop_data_value

Revision 1.27.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:09 2020 UTC (5 years, 1 month ago) by martin
Branches: phil-wifi
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.1: +215 -98 lines
Merge changes from current as of 20200406

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Mar 8 03:16:20 2020 UTC (5 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +13 -10 lines
Use BUS_ADDR_{HI,LO}32().

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Mar 1 05:39:05 2020 UTC (5 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +7 -3 lines
Use the 64-bit PCI DMA tag if avalable.

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:10 2020 UTC (5 years, 2 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +20 -15 lines
Sync with head.

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

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

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Jan 30 05:24:53 2020 UTC (5 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +16 -12 lines
Adopt <net/if_stats.h>.

Revision 1.35.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 21 11:55:58 2020 UTC (5 years, 3 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.35.2.1: preferred, colored; branchpoint 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35.2.1: +134 -39 lines
Pull up following revision(s) (requested by msaitoh in ticket #626):

	sys/arch/amd64/conf/GENERIC: revision 1.552
	sys/dev/pci/if_casreg.h: revision 1.2
	sys/dev/pci/if_cas.c: revision 1.37
	share/man/man4/cas.4: revision 1.4
	sys/dev/pci/if_casvar.h: revision 1.7

 Update supported device list with part number. From FreeBSD.

 Fix a bug that the driver sometimes incorrectly attach gentbi(4) instead of
gphyter(4) on non-fiber device.

Tested with Sun Quad GigaSwift Ethernet UTP (QGE) (part no. 501-6522) on
amd64. On this environment, the problem frequently had occurred. I also
tested with other 4 cas(4) variants.

 Add cas(4).

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Dec 26 17:51:08 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +134 -39 lines
 Fix a bug that the driver sometimes incorrectly attach gentbi(4) instead of
gphyter(4) on non-fiber device.

Tested with Sun Quad GigaSwift Ethernet UTP (QGE) (part no. 501-6522) on
amd64. On this environment, the problem frequently had occurred. I also
tested with other 4 cas(4) variants.

Revision 1.26.8.1: download - view: text, markup, annotated - select for diffs
Thu Dec 5 16:50:54 2019 UTC (5 years, 5 months ago) by bouyer
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26: +77 -66 lines
Pull up following revision(s) (requested by msaitoh in ticket #1464):
	sys/dev/pci/if_alc.c                    1.44 via patch
	sys/dev/pci/if_ale.c                    1.35-1.36 via patch
	sys/dev/pci/if_cas.c                    1.36 via patch
- Fix a bug that IFF_ALLMULTI is almost always set.
- Whitespace fixes.

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 26 08:20:47 2019 UTC (5 years, 5 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-0-RC1
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +49 -39 lines
Pull up following revision(s) (requested by msaitoh in ticket #483):

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

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

 Remove accidentally committed debug code. Sorry.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Nov 21 09:12:30 2019 UTC (5 years, 5 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +49 -39 lines
Fix a bug that IFF_ALLMULTI is almost always set.

 OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

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

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

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

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

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Feb 6 04:14:03 2019 UTC (6 years, 3 months ago) by msaitoh
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +23 -5 lines
 Fix a bug that all ports' MAC address become the last port's address on
Non-OF environment.

 The Saturn multi port card has only one VPD ROM and all ports share it.
If the card has four port, it has four "local-mac-address" entries.
Before this commit, the code keep the last one and use it for all ports.
The Saturn four port card has three bridge.

e.g.
----------------
003:02:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:00:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
004:04:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge)
005:00:0: National Semiconductor Saturn (ethernet network, revision 0x30)
005:01:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:02:0: National Semiconductor Saturn (ethernet network, revision 0x30)
006:03:0: National Semiconductor Saturn (ethernet network, revision 0x30)
----------------

The card assign each port's PCI device number to match the port number.
Use it as the offset of "local-mac-address". Almost the same as FreeBSD.

OK'd by mrg and martin.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Feb 5 06:17:03 2019 UTC (6 years, 3 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -4 lines
 Remove very old IFF_NOTRAILERS flag.

Revision 1.26.14.4: download - view: text, markup, annotated - select for diffs
Sat Jan 26 22:00:07 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.26.14.3: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.14.3: +28 -21 lines
Sync with HEAD

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

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

Revision 1.26.14.2: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:32 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.26.14.1: preferred, colored; branchpoint 1.26: preferred, colored
Changes since revision 1.26.14.1: +4 -4 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Nov 15 10:56:29 2018 UTC (6 years, 5 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
Remove the 'copy' argument from m_devget(), unused. While here rename
off0->off.

Revision 1.26.14.1: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:46 2018 UTC (6 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
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
Tue Jun 26 06:48:01 2018 UTC (6 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base, 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.26: preferred, colored
Changes since revision 1.26: +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.18.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:07 2017 UTC (7 years, 5 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.18.2.2: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.2: +5 -10 lines
update from HEAD

Revision 1.22.4.3: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:29 2017 UTC (8 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.22.4.2: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.4.2: +4 -9 lines
Sync with HEAD

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

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Dec 15 09:28:05 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, 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, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -8 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.25: download - view: text, markup, annotated - select for diffs
Thu Dec 8 01:12:01 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -3 lines
Apply deferred if_start framework

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

Revision 1.22.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:10 2016 UTC (9 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.22.4.1: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.4.1: +4 -4 lines
Sync with HEAD

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:11 2016 UTC (9 years, 3 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, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -4 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.22.4.1: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:09 2015 UTC (9 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3 lines
Sync with HEAD

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

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:42 2014 UTC (10 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored
Changes since revision 1.18.2.1: +4 -6 lines
Rebase to HEAD as of a few days ago.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:36 2014 UTC (10 years, 9 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.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.14.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:25 2014 UTC (10 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.14.2.2: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.2: +10 -12 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.19.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:40 2014 UTC (10 years, 11 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +5 -7 lines
sync with head

Revision 1.21.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 7 03:37:33 2014 UTC (11 years, 1 month ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +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.21: download - view: text, markup, annotated - select for diffs
Sat Mar 29 19:28:24 2014 UTC (11 years, 1 month 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.20: preferred, colored
Changes since revision 1.20: +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.20: download - view: text, markup, annotated - select for diffs
Fri Sep 13 20:56:17 2013 UTC (11 years, 8 months ago) by martin
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -6 lines
Remove unused variables

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

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Mar 30 03:21:04 2013 UTC (12 years, 1 month 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.18: preferred, colored
Changes since revision 1.18: +7 -7 lines
remove trailing whitespace

Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:27 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.14.2.1: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.2.1: +5 -5 lines
sync with head

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Jul 22 14:33:02 2012 UTC (12 years, 9 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.17: preferred, colored
Changes since revision 1.17: +5 -5 lines
Fix mii_statchg to take a 'struct ifnet *' instead of device_t.  This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.

Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:46 2012 UTC (13 years, 1 month ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -11 lines
sync with head

Revision 1.14.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:38 2012 UTC (13 years, 2 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +4 -11 lines
merge to -current.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Feb 3 10:11:07 2012 UTC (13 years, 3 months ago) by martin
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.16: preferred, colored
Changes since revision 1.16: +3 -2 lines
Add missing <sys/rnd.h> include, ack: jdc@

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Feb 2 19:43:05 2012 UTC (13 years, 3 months ago) by tls
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -8 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.15: download - view: text, markup, annotated - select for diffs
Mon Jan 30 19:41:19 2012 UTC (13 years, 3 months ago) by drochner
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -5 lines
Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Aug 29 14:47:08 2011 UTC (13 years, 8 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
have pci register itself as a module, and make PCI driver modules depend on it

Revision 1.7.4.3: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:40 2011 UTC (14 years, 2 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.7.4.2: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.4.2: +44 -6 lines
sync with head

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jan 7 11:17:22 2011 UTC (14 years, 4 months ago) by jmcneill
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +34 -2 lines
support building cas(4) as a module

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Nov 13 13:52:06 2010 UTC (14 years, 6 months ago) by uebayasi
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -4 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.5.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:46:25 2010 UTC (14 years, 9 months ago) by uebayasi
Branches: uebayasi-xip
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: +13 -2 lines
Sync with HEAD.

Revision 1.7.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:46 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.7.2.2: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.2: +19 -10 lines
sync with head.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jul 14 09:52:39 2010 UTC (14 years, 10 months ago) by jnemeth
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +9 -3 lines
When searching PROM data to get a MAC address, search for National
Semiconductor Saturn data as well as Sun Cassini data.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jul 14 04:50:28 2010 UTC (14 years, 10 months ago) by jnemeth
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +5 -3 lines
Don't leak kernel stack data when an enaddr can't be found.

Revision 1.7.4.2: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:36 2010 UTC (14 years, 10 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.7.4.1: preferred, colored
Changes since revision 1.7.4.1: +5 -2 lines
sync with head

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Jun 17 06:41:05 2010 UTC (14 years, 11 months ago) by mrg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -2 lines
disable interrupts when resetting the device.

Revision 1.7.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:33 2010 UTC (14 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -8 lines
sync with head

Revision 1.5.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:34 2010 UTC (15 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +10 -12 lines
Sync with HEAD.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Apr 5 07:20:25 2010 UTC (15 years, 1 month ago) by joerg
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -8 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.7.2.2: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:45 2010 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.7.2.1: preferred, colored
Changes since revision 1.7.2.1: +2059 -0 lines
sync with head

Revision 1.7.2.1
Thu Mar 11 04:00:36 2010 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
FILE REMOVED
Changes since revision 1.7: +0 -2060 lines
file if_cas.c was added on branch yamt-nfs-mp on 2010-03-11 15:03:45 +0000

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Mar 11 04:00:36 2010 UTC (15 years, 2 months ago) by mrg
Branches: MAIN
Branch point for: yamt-nfs-mp, rmind-uvmplock
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -2 lines
various aprint_* fixes.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Feb 24 22:38:00 2010 UTC (15 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base9
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -6 lines
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jan 22 14:34:34 2010 UTC (15 years, 3 months ago) by jdc
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -43 lines
Remove port-specific code for determining MAC address, and use device
properties instead (c.f. gem(4) and hme(4)).

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:07:00 2010 UTC (15 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -14 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.3: download - view: text, markup, annotated - select for diffs
Sun Jan 17 11:57:29 2010 UTC (15 years, 3 months ago) by jdc
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +50 -38 lines
Mask out (disable) cas interrupts on detach and suspend.
(Re-)enable interrupts on resume.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jan 9 13:34:33 2010 UTC (15 years, 4 months ago) by martin
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -6 lines
adapt to recent pmf changes

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jan 7 09:19:55 2010 UTC (15 years, 4 months ago) by jdc
Branches: MAIN
Driver for Sun Cassini/Cassini+ (GigaSwift) Ethernet (also known as
National Semiconductor Saturn).
Based on the OpenBSD driver written by Mark Kettenis:
  detach support added
  MAC address lookup modified (only tested on sparc64)

Tested on single GigaSwift (UTP and MMF) and quad GigaSwift PCI cards.

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>