The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.191 / (download) - annotate - [select for diffs], Sat Feb 10 09:30:06 2024 UTC (6 weeks, 5 days ago) by andvar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.190: +3 -3 lines
Diff to previous 1.190 (colored) to selected 1.68 (colored)

s/alloted/allotted/ in comments.

Revision 1.190 / (download) - annotate - [select for diffs], Fri Jun 2 08:51:47 2023 UTC (9 months, 3 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.189: +3 -3 lines
Diff to previous 1.189 (colored) to selected 1.68 (colored)

follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.
also s/beyound/beyond/ and few others along the way, mainly in comments.

Revision 1.189 / (download) - annotate - [select for diffs], Sat Sep 24 18:12:42 2022 UTC (18 months ago) by thorpej
Branch: MAIN
CVS Tags: 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
Changes since 1.188: +2 -3 lines
Diff to previous 1.188 (colored) to selected 1.68 (colored)

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

Revision 1.188 / (download) - annotate - [select for diffs], Sun Sep 11 15:23:39 2022 UTC (18 months, 2 weeks ago) by ryo
Branch: MAIN
Changes since 1.187: +6 -4 lines
Diff to previous 1.187 (colored) to selected 1.68 (colored)

Packets larger than 1518 bytes (1522 bytes if VLAN tag is included) are no longer received.
Previously, those packets were received as truncated (incomplete) packets.

Revision 1.187 / (download) - annotate - [select for diffs], Sat Aug 6 15:38:42 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.186: +9 -7 lines
Diff to previous 1.186 (colored) to selected 1.68 (colored)

sip(4): Tidy up DMA syncs.

- No membar_producer in sip_init_rxdesc -- use bus_dmamap_sync with
  BUS_DMASYNC_PREWRITE to order updates to the DMA descriptors.

- Omit needless membar_producer in sip_init_txdesc -- the hardware
  will not look at any of these descriptors until we set CMDSTS_OWN
  on the first one in the sequence, which is done later in the
  caller, sipcom_start.

- In gsip_rxintr, make sure to read cmdsts _before_ extsts, by
  separating them with BUS_DMASYNC_PREREAD.  Otherwise, the CPU might
  reorder the loads and read a stale extsts first before witnessing
  an updated cmdsts with the CMDSTS_OWN bit that transfers ownership
  of the rx packet to us.

Revision 1.186 / (download) - annotate - [select for diffs], Tue May 24 20:50:19 2022 UTC (22 months ago) by andvar
Branch: MAIN
Changes since 1.185: +4 -4 lines
Diff to previous 1.185 (colored) to selected 1.68 (colored)

fix various typos in comment, documentation and log messages.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Feb 16 22:00:56 2022 UTC (2 years, 1 month ago) by andvar
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.68 (colored)

fix various typos, mainly in comments.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Dec 31 14:25:23 2021 UTC (2 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored) to selected 1.68 (colored)

sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Oct 21 13:21:54 2021 UTC (2 years, 5 months ago) by andvar
Branch: MAIN
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored) to selected 1.68 (colored)

fix various typos, mainly in comments, but also in man pages and log messages.

Revision 1.168.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:26 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.168.2.2: +3 -2 lines
Diff to previous 1.168.2.2 (colored) to branchpoint 1.168 (colored) next main 1.169 (colored) to selected 1.68 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.168.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:09 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.168.2.1: +214 -143 lines
Diff to previous 1.168.2.1 (colored) to branchpoint 1.168 (colored) to selected 1.68 (colored)

Merge changes from current as of 20200406

Revision 1.182 / (download) - annotate - [select for diffs], Mon Mar 16 01:54:23 2020 UTC (4 years ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.181: +3 -13 lines
Diff to previous 1.181 (colored) to selected 1.68 (colored)

Do the "have transmit resources available" check before checking that
there is a packet in the send queue.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Mar 15 22:20:31 2020 UTC (4 years ago) by thorpej
Branch: MAIN
Changes since 1.180: +6 -24 lines
Diff to previous 1.180 (colored) to selected 1.68 (colored)

Don't bother with IFF_OACTIVE.

Revision 1.180 / (download) - annotate - [select for diffs], Fri Mar 13 00:45:59 2020 UTC (4 years ago) by thorpej
Branch: MAIN
Changes since 1.179: +32 -16 lines
Diff to previous 1.179 (colored) to selected 1.68 (colored)

Adjust the logic for enabling the 64-bit data path when a 64-bit slot
is detected:
- If DATA64_EN isn't set in CFG after a reset, don't use 64-bit data path
  at all (it's been disabled by an EEPROM setting).
- Provide a hook for force-disabling the 64-bit data path.
- Otherwise, perform the "known 64-bit cards" check as done previously
  (because dodgy-vendor-EEPROM-settings still applies).

Revision 1.179 / (download) - annotate - [select for diffs], Sun Mar 8 02:44:12 2020 UTC (4 years ago) by thorpej
Branch: MAIN
Changes since 1.178: +159 -82 lines
Diff to previous 1.178 (colored) to selected 1.68 (colored)

Support 64-bit DMA addressing on the DP83820, used only when a 64-bit
DMA tag is available.

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:10 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.175: +22 -16 lines
Diff to previous 1.175 (colored) next main 1.176 (colored) to selected 1.68 (colored)

Sync with head.

Revision 1.178 / (download) - annotate - [select for diffs], Fri Feb 7 00:04:28 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.177: +5 -4 lines
Diff to previous 1.177 (colored) to selected 1.68 (colored)

Use callout_setfunc() / callout_schedule().

Revision 1.177 / (download) - annotate - [select for diffs], Tue Feb 4 05:44:14 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.176: +3 -2 lines
Diff to previous 1.176 (colored) to selected 1.68 (colored)

Use ifmedia_fini().

Revision 1.176 / (download) - annotate - [select for diffs], Thu Jan 30 05:42:00 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.175: +18 -14 lines
Diff to previous 1.175 (colored) to selected 1.68 (colored)

Adopt <net/if_stats.h>.

Revision 1.175 / (download) - annotate - [select for diffs], Fri Sep 13 07:55:07 2019 UTC (4 years, 6 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.174: +4 -4 lines
Diff to previous 1.174 (colored) to selected 1.68 (colored)

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

Revision 1.174 / (download) - annotate - [select for diffs], Tue Jul 9 08:46:59 2019 UTC (4 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.173: +3 -2 lines
Diff to previous 1.173 (colored) to selected 1.68 (colored)

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

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:16 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.168: +235 -226 lines
Diff to previous 1.168 (colored) to selected 1.68 (colored)

Sync with HEAD

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

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

Revision 1.172 / (download) - annotate - [select for diffs], Thu May 23 10:51:39 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.171: +61 -57 lines
Diff to previous 1.171 (colored) to selected 1.68 (colored)

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

Revision 1.171 / (download) - annotate - [select for diffs], Fri Apr 26 06:33:34 2019 UTC (4 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.170: +121 -127 lines
Diff to previous 1.170 (colored) to selected 1.68 (colored)

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.

Revision 1.170 / (download) - annotate - [select for diffs], Fri Apr 26 04:58:40 2019 UTC (4 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.169: +4 -3 lines
Diff to previous 1.169 (colored) to selected 1.68 (colored)

 Fix a bug that read value of MII_EXTSR register on TBI mode always fails.
This bug was added in rev. 1.169.

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:07 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.167.2.1: +54 -47 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.169 / (download) - annotate - [select for diffs], Tue Jan 22 03:42:27 2019 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, isaki-audio2-base, isaki-audio2
Changes since 1.168: +54 -47 lines
Diff to previous 1.168 (colored) to selected 1.68 (colored)

 Change MII PHY read/write API from:

	int (*mii_readreg_t)(device_t, int, int);
	void (*mii_writereg_t)(device_t, int, int, int);
to:

	int (*mii_readreg_t)(device_t, int, int, uint16_t *);
	int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

 In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

 Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

	arm/at91/at91emac.c
	arm/ep93xx/epe.c
	arm/omap/omapl1x_emac.c
	mips/ralink/ralink_eth.c
	arch/powerpc/booke/dev/pq3etsec.c(read)
	dev/cadence/if_cemac.c <- hkenken
	dev/ic/lan9118.c


Tested with the following device:

	axe+ukphy
	axe+rgephy
	axen+rgephy	(tested by Andrius V)
	wm+atphy
	wm+ukphy
	wm+igphy
	wm+ihphy
	wm+makphy
	sk+makphy
	sk+brgphy
	sk+gentbi
	msk+makphy
	sip+icsphy
	sip+ukphy
	re+rgephy
	bge+brgphy
	bnx+brgphy
	gsip+gphyter
	rtk+rlphy
	fxp+inphy	(tested by Andrius V)
	tlp+acphy
	ex+exphy
	epic+qsphy
	vge+ciphy	(tested by Andrius V)
	vr+ukphy	(tested by Andrius V)
	vte+ukphy	(tested by Andrius V)

Not tested (MAC):
	arm:at91emac
	arm:cemac
	arm:epe
	arm:geminigmac
	arm:enet
	arm:cpsw
	arm:emac(omac)
	arm:emac(sunxi)
	arm:npe
	evbppc:temac
	macppc:bm
	macppc:gm
	mips:aumac
	mips:ae
	mips:cnmac
	mips:reth
	mips:sbmac
	playstation2:smap
	powerpc:tsec
	powerpc:emac(ibm4xx)
	sgimips:mec
	sparc:be
	sf
	ne(ax88190, dl10019)
	awge
	ep
	gem
	hme
	smsh
	mtd
	sm
	age
	alc
	ale
	bce
	cas
	et
	jme
	lii
	nfe
	pcn
	ste
	stge
	tl
	xi
	aue
	mue
	smsc
	udav
	url

Not tested (PHY):
	amhphy
	bmtphy
	dmphy
	etphy
	glxtphy
	ikphy
	iophy
	lxtphy
	nsphyter
	pnaphy
	rdcphy
	sqphy
	tlphy
	tqphy
	urlphy

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

Sync with HEAD

Revision 1.168 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:01 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored) to selected 1.68 (colored)

 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

Revision 1.154.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:08 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.154.2.3: +40 -52 lines
Diff to previous 1.154.2.3 (colored) next main 1.155 (colored) to selected 1.68 (colored)

update from HEAD

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Tue Oct 24 08:38:59 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.166: +5 -7 lines
Diff to previous 1.166 (colored) next main 1.167 (colored) to selected 1.68 (colored)

Pull up following revision(s) (requested by knakahara in ticket #302):
	sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31
	sys/arch/x86/pci/if_vmx.c: 1.20
	sys/dev/ic/i82557.c: 1.148
	sys/dev/ic/rtl8169.c: 1.152
	sys/dev/pci/cxgb/cxgb_sge.c: 1.5
	sys/dev/pci/if_age.c: 1.51
	sys/dev/pci/if_alc.c: 1.25
	sys/dev/pci/if_ale.c: 1.23
	sys/dev/pci/if_bge.c: 1.311
	sys/dev/pci/if_bge.c: 1.312
	sys/dev/pci/if_bnx.c: 1.62
	sys/dev/pci/if_jme.c: 1.32
	sys/dev/pci/if_nfe.c: 1.64
	sys/dev/pci/if_sip.c: 1.167
	sys/dev/pci/if_stge.c: 1.63-1.64
	sys/dev/pci/if_ti.c: 1.102
	sys/dev/pci/if_txp.c: 1.48
	sys/dev/pci/if_vge.c: 1.61
	sys/dev/pci/if_wm.c: 1.538
	sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch
	sys/net/agr/if_agrether_hash.c: 1.4
	sys/net/if_ether.h: 1.67-1.68
	sys/net/if_ethersubr.c: 1.244
	sys/net/if_vlan.c: 1.100
	sys/net80211/ieee80211_input.c: 1.89
	sys/net80211/ieee80211_output.c: 1.59
	sys/sys/mbuf.h: 1.171
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.
I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html
--
only get vtag when we have vtag like the other drivers.
--
- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag
--
- add a constant for the vlan mask.
- enforce that we have a tag before we get it.
only get vtag when we have vtag like the other drivers.
like if_bge.c:1.312 and if_stge.c:1.64.
fixed by s-yamaguchi@IIJ, thanks.

Revision 1.167 / (download) - annotate - [select for diffs], Tue Sep 26 07:42:06 2017 UTC (6 years, 6 months ago) by knakahara
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.166: +5 -7 lines
Diff to previous 1.166 (colored) to selected 1.68 (colored)

VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.

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

XXX need pullup to -8 branch

Revision 1.158.4.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:05 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.158.4.5: +4 -3 lines
Diff to previous 1.158.4.5 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.165.6.1 / (download) - annotate - [select for diffs], Thu May 11 02:58:38 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.165: +4 -3 lines
Diff to previous 1.165 (colored) next main 1.166 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.166 / (download) - annotate - [select for diffs], Wed May 10 02:46:33 2017 UTC (6 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.165: +4 -3 lines
Diff to previous 1.165 (colored) to selected 1.68 (colored)

 Use pci_intr_establish_xname().

Revision 1.158.4.5 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:30 2017 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.158.4.4: +4 -17 lines
Diff to previous 1.158.4.4 (colored) to branchpoint 1.158 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:33 2017 UTC (7 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.163: +4 -17 lines
Diff to previous 1.163 (colored) next main 1.164 (colored) to selected 1.68 (colored)

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

Revision 1.165 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2
Changes since 1.164: +2 -16 lines
Diff to previous 1.164 (colored) to selected 1.68 (colored)

Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net

Revision 1.164 / (download) - annotate - [select for diffs], Thu Dec 8 01:12:01 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.163: +4 -3 lines
Diff to previous 1.163 (colored) to selected 1.68 (colored)

Apply deferred if_start framework

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

Revision 1.158.4.4 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:43 2016 UTC (7 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.158.4.3: +26 -26 lines
Diff to previous 1.158.4.3 (colored) to branchpoint 1.158 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.163 / (download) - annotate - [select for diffs], Thu Jul 14 10:19:06 2016 UTC (7 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.162: +26 -26 lines
Diff to previous 1.162 (colored) to selected 1.68 (colored)

- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.

Revision 1.158.4.3 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:04 2016 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.158.4.2: +13 -11 lines
Diff to previous 1.158.4.2 (colored) to branchpoint 1.158 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.162 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:41 2016 UTC (7 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907
Changes since 1.161: +11 -9 lines
Diff to previous 1.161 (colored) to selected 1.68 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.161 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.160: +4 -4 lines
Diff to previous 1.160 (colored) to selected 1.68 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.158.4.2 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:10 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.158.4.1: +4 -4 lines
Diff to previous 1.158.4.1 (colored) to branchpoint 1.158 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.160 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (8 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.159: +4 -4 lines
Diff to previous 1.159 (colored) to selected 1.68 (colored)

Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!

Revision 1.158.4.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:09 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.159 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (8 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored) to selected 1.68 (colored)

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

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

Rebase to HEAD as of a few days ago.

Revision 1.158 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:36 2014 UTC (9 years, 7 months ago) by tls
Branch: 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
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored) to selected 1.68 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.150.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:40:25 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.150.2.2: +6 -5 lines
Diff to previous 1.150.2.2 (colored) to branchpoint 1.150 (colored) next main 1.151 (colored) to selected 1.68 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.156.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:40 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.156: +4 -3 lines
Diff to previous 1.156 (colored) next main 1.157 (colored) to selected 1.68 (colored)

sync with head

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:33 2014 UTC (9 years, 11 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored) next main 1.158 (colored) to selected 1.68 (colored)

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.157 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:25 2014 UTC (10 years ago) by christos
Branch: 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
Changes since 1.156: +4 -3 lines
Diff to previous 1.156 (colored) to selected 1.68 (colored)

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

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

resync from head

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

remove trailing whitespace

Revision 1.153.2.1 / (download) - annotate - [select for diffs], Thu Nov 22 17:48:16 2012 UTC (11 years, 4 months ago) by riz
Branch: netbsd-6
CVS Tags: 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
Changes since 1.153: +7 -4 lines
Diff to previous 1.153 (colored) next main 1.154 (colored) to selected 1.68 (colored)

Pull up following revision(s) (requested by chs in ticket #691):
	sys/dev/pci/aac_pci.c: revision 1.34
	sys/dev/pci/if_sip.c: revision 1.155
	sys/dev/pci/if_tlp_pci.c: revision 1.122
	sys/dev/pci/if_an_pci.c: revision 1.34
match some more devices.

Revision 1.154.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:17 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.154: +7 -4 lines
Diff to previous 1.154 (colored) to selected 1.68 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.150.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:21:31 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.150.2.1: +17 -14 lines
Diff to previous 1.150.2.1 (colored) to branchpoint 1.150 (colored) to selected 1.68 (colored)

sync with head

Revision 1.155 / (download) - annotate - [select for diffs], Sun Sep 23 01:10:59 2012 UTC (11 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Changes since 1.154: +7 -4 lines
Diff to previous 1.154 (colored) to selected 1.68 (colored)

match some more devices.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Jul 22 14:33:03 2012 UTC (11 years, 8 months ago) by matt
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.153: +12 -12 lines
Diff to previous 1.153 (colored) to selected 1.68 (colored)

Fix mii_statchg to take a 'struct ifnet *' instead of device_t.  This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.

Revision 1.150.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:48 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.150: +6 -17 lines
Diff to previous 1.150 (colored) to selected 1.68 (colored)

sync with head

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:41 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.151: +5 -16 lines
Diff to previous 1.151 (colored) next main 1.152 (colored) to selected 1.68 (colored)

merge to -current.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:05 2012 UTC (12 years, 1 month ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, 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, 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
Branch point for: netbsd-6
Changes since 1.152: +4 -15 lines
Diff to previous 1.152 (colored) to selected 1.68 (colored)

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.152 / (download) - annotate - [select for diffs], Mon Dec 12 02:44:14 2011 UTC (12 years, 3 months ago) by jakllsch
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored) to selected 1.68 (colored)

Using BUS_DMA_NOCACHE for bus_dmamem_map() causes issues on (at least) sparc64.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:23 2011 UTC (12 years, 4 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored) to selected 1.68 (colored)

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.150 / (download) - annotate - [select for diffs], Sat Oct 15 19:50:20 2011 UTC (12 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.149: +6 -4 lines
Diff to previous 1.149 (colored) to selected 1.68 (colored)

"return f();" where both f and the enclosing function return void is
sometimes convenient. But, it's not standard, so don't do it.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:43 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.147.2.1: +2 -4 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored) to selected 1.68 (colored)

sync with head

Revision 1.149 / (download) - annotate - [select for diffs], Sat Nov 13 13:52:06 2010 UTC (13 years, 4 months ago) by uebayasi
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.148: +2 -4 lines
Diff to previous 1.148 (colored) to selected 1.68 (colored)

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.132.4.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:48 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132.4.5: +5 -8 lines
Diff to previous 1.132.4.5 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:34 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.147: +5 -8 lines
Diff to previous 1.147 (colored) to selected 1.68 (colored)

sync with head

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:37 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.145: +11 -14 lines
Diff to previous 1.145 (colored) next main 1.146 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:26 2010 UTC (13 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.147: +5 -8 lines
Diff to previous 1.147 (colored) to selected 1.68 (colored)

Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.132.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:47 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132.4.4: +23 -25 lines
Diff to previous 1.132.4.4 (colored) to branchpoint 1.132 (colored) to selected 1.68 (colored)

sync with head

Revision 1.147 / (download) - annotate - [select for diffs], Wed Feb 24 23:52:49 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored) to selected 1.68 (colored)

Use device_suspensor_t.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:00 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.145: +7 -7 lines
Diff to previous 1.145 (colored) to selected 1.68 (colored)

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

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

Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

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

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

Revision 1.144 / (download) - annotate - [select for diffs], Fri Jan 8 19:56:52 2010 UTC (14 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.143: +6 -6 lines
Diff to previous 1.143 (colored) to selected 1.68 (colored)

Expand PMF_FN_* macros.

Revision 1.143 / (download) - annotate - [select for diffs], Thu Nov 26 15:17:10 2009 UTC (14 years, 4 months ago) by njoly
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.142: +5 -5 lines
Diff to previous 1.142 (colored) to selected 1.68 (colored)

Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.

Revision 1.142 / (download) - annotate - [select for diffs], Wed Sep 16 16:34:50 2009 UTC (14 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.141: +13 -6 lines
Diff to previous 1.141 (colored) to selected 1.68 (colored)

In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together.  Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
   #include it from <sys/pmf.h> instead of <sys/device.h> to break the
   circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
   suspend/resume call.  Start to replace instances of PMF_FN_PROTO,
   PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
   device in suspension.  More than one suspensor may hold a device
   at once.  A device stays suspended as long as at least one
   suspensor holds it.  A device resumes when the last suspensor
   releases it.

   Currently, the kernel defines three suspensors,

   3a the system-suspensor: for system suspension, initiated
      by 'sysctl -w machdep.sleep_state=3', by lid closure, by
      power-button press, et cetera,

   3b the drvctl-suspensor: for device suspension by /dev/drvctl
      ioctl, e.g., drvctl -S sip0.

   3c the system self-suspensor: for device drivers that suspend
      themselves and their children.  Several drivers for network
      interfaces put the network device to sleep while it is not
      administratively up, that is, after the kernel calls if_stop(,
      1).  The self-suspensor should not be used directly.  See
      the description of suspensor delegates, below.

   A suspensor can have one or more "delegates".  A suspensor can
   release devices that its delegates hold suspended.  Right now,
   only the system self-suspensor has delegates.  For each device
   that a self-suspending driver attaches, it creates the device's
   self-suspensor, a delegate of the system self-suspensor.

   Suspensors stop a system-wide suspend/resume cycle from waking
   devices that the operator put to sleep with drvctl before the cycle.
   They also help self-suspension to work more simply, safely, and in
   accord with expectations.

4. Add the notion of device activation level, devact_level_t,
   and a routine for checking the current activation level,
   device_activation().  Current activation levels are DEVACT_LEVEL_BUS,
   DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
   indicate that the device's bus is active, that the bus and device are
   active, and that the bus, device, and the functions of the device's
   class (network, audio) are active.

   Suspend/resume calls can be qualified with a devact_level_t.
   The power-management framework treats a devact_level_t that
   qualifies a device suspension as the device's current activation
   level; it only runs hooks to reduce the activation level from
   the presumed current level to the fully suspended state.  The
   framework treats a devact_level_t qualifying device resumption
   as the target activation level; it only runs hooks to raise the
   activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
   drivers.

6. Temporarily add an unused power-management workqueue that I will
   remove or replace, soon.

Revision 1.132.4.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:51 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132.4.3: +5 -5 lines
Diff to previous 1.132.4.3 (colored) to branchpoint 1.132 (colored) to selected 1.68 (colored)

sync with head

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

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

Revision 1.132.4.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:35 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132.4.2: +75 -74 lines
Diff to previous 1.132.4.2 (colored) to branchpoint 1.132 (colored) to selected 1.68 (colored)

sync with head

Revision 1.135.4.1 / (download) - annotate - [select for diffs], Wed May 13 17:20:26 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.135: +92 -82 lines
Diff to previous 1.135 (colored) next main 1.136 (colored) to selected 1.68 (colored)

Sync with HEAD.

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

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 5 21:34:13 2009 UTC (14 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base, jym-xensuspend-base
Changes since 1.139: +4 -4 lines
Diff to previous 1.139 (colored) to selected 1.68 (colored)

Change struct cfdata * to cfdata_t.  No functional change intended.

Revision 1.139 / (download) - annotate - [select for diffs], Tue May 5 21:33:21 2009 UTC (14 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.138: +73 -72 lines
Diff to previous 1.138 (colored) to selected 1.68 (colored)

device_t/softc split
tested by and ok dyoung@

Revision 1.132.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:57 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132.4.1: +50 -42 lines
Diff to previous 1.132.4.1 (colored) to branchpoint 1.132 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.134.8.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:57 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.134.8.1: +23 -14 lines
Diff to previous 1.134.8.1 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.138 / (download) - annotate - [select for diffs], Thu Apr 2 00:09:33 2009 UTC (15 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.137: +8 -6 lines
Diff to previous 1.137 (colored) to selected 1.68 (colored)

During shutdown, detach devices in an orderly fashion.

Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Mar 27 16:45:53 2009 UTC (15 years ago) by dyoung
Branch: MAIN
Changes since 1.136: +7 -2 lines
Diff to previous 1.136 (colored) to selected 1.68 (colored)

If a sip(4) is powered down, then so is its PHY, so don't try to read
media status from the PHY.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Mar 7 00:56:04 2009 UTC (15 years ago) by dyoung
Branch: MAIN
Changes since 1.135: +12 -10 lines
Diff to previous 1.135 (colored) to selected 1.68 (colored)

Don't try to write the registers of the NIC to stop it if it is
already powered down.  This change prevents PCI bus exceptions
(indicated by NMI) when, for example, I detach the whole device
tree on a Soekris net4521:

com1: detached
NMI ... going to debugger
Stopped in pid 0.1 (system) at  netbsd:sipcom_stop+0x4d:        pushl   $0
db{0}> continue
NMI ... going to debugger
Stopped in pid 0.1 (system) at  netbsd:sipcom_stop+0x149:       addl    $0x10,%e
sp
db{0}> continue
sip0: detached

(On the AMD Elan SC520, the NMI occurs at the instruction after
the write or, if the write was posted, at either that instruction
or some later one.)

Revision 1.134.8.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:18:26 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.134: +29 -30 lines
Diff to previous 1.134 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.127.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:00 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.127.6.2: +27 -28 lines
Diff to previous 1.127.6.2 (colored) to branchpoint 1.127 (colored) next main 1.128 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.134.6.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:14:35 2008 UTC (15 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.134: +29 -30 lines
Diff to previous 1.134 (colored) next main 1.135 (colored) to selected 1.68 (colored)

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

Revision 1.135 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:07 2008 UTC (15 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.134: +29 -30 lines
Diff to previous 1.134 (colored) to selected 1.68 (colored)

*** Summary ***

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

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

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

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

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Let ifioctl_common() handle SIOCGIFADDR.

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

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

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

Revision 1.127.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:40 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.127.6.1: +74 -80 lines
Diff to previous 1.127.6.1 (colored) to branchpoint 1.127 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:34:20 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.132: +12 -17 lines
Diff to previous 1.132 (colored) next main 1.133 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.132.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:24:43 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.132: +12 -17 lines
Diff to previous 1.132 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Mon May 5 20:19:09 2008 UTC (15 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, 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, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: nick-hppapmap, haad-dm
Changes since 1.133: +12 -10 lines
Diff to previous 1.133 (colored) to selected 1.68 (colored)

Make PCI power re-activation DTRT:  pass pci_activate_null instead
of NULL to pci_activate()

Call the variable where we store the PCI Command & Status Register
'csr' instead of 'pmreg'.

In sipcom_intr(), get out if the device is inactive.  Otherwise
sip(4) may inadvertently try to handle a shared interrupt before
the driver state is completely set up.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:55 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.132: +2 -9 lines
Diff to previous 1.132 (colored) to selected 1.68 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.132 / (download) - annotate - [select for diffs], Thu Apr 10 19:13:37 2008 UTC (15 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.131: +67 -68 lines
Diff to previous 1.131 (colored) to selected 1.68 (colored)

use aprint_*_dev and device_xname

Revision 1.127.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:51 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.127: +69 -59 lines
Diff to previous 1.127 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.102.2.8 / (download) - annotate - [select for diffs], Mon Mar 24 09:38:51 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.7: +4 -4 lines
Diff to previous 1.102.2.7 (colored) to branchpoint 1.102 (colored) next main 1.103 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.127.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:15:48 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.127: +69 -59 lines
Diff to previous 1.127 (colored) next main 1.128 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.113.8.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:48 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.113.8.2: +88 -116 lines
Diff to previous 1.113.8.2 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored) to selected 1.68 (colored)

sync with HEAD

Revision 1.131 / (download) - annotate - [select for diffs], Fri Mar 21 07:47:43 2008 UTC (16 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored) to selected 1.68 (colored)

pci_activate() expects for its void * argument to be a device_t,
so change the type of the argument to device_t.  Update each use
of pci_activate().

Use device_t and accessors.  Use aprint_*_dev().

Revision 1.102.2.7 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:11 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.6: +67 -57 lines
Diff to previous 1.102.2.6 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Mar 12 18:02:21 2008 UTC (16 years ago) by dyoung
Branch: MAIN
Changes since 1.129: +23 -13 lines
Diff to previous 1.129 (colored) to selected 1.68 (colored)

Use device_t and its accessors throughout.  Use aprint_*_dev().

Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Mar 11 22:26:14 2008 UTC (16 years ago) by dyoung
Branch: MAIN
Changes since 1.128: +44 -44 lines
Diff to previous 1.128 (colored) to selected 1.68 (colored)

Use device_t and accessors.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Feb 29 06:13:39 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored) to selected 1.68 (colored)

Use PMF_FN_ARGS, PMF_FN_PROTO.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:57 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.115: +307 -111 lines
Diff to previous 1.115 (colored) next main 1.116 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.102.2.6 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:39 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.5: +13 -7 lines
Diff to previous 1.102.2.5 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Feb 7 01:21:57 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.126: +13 -7 lines
Diff to previous 1.126 (colored) to selected 1.68 (colored)

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

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

Revision 1.102.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:43:59 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.4: +1003 -840 lines
Diff to previous 1.102.2.4 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head

Revision 1.115.8.3 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:37 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.115.8.2: +2 -4 lines
Diff to previous 1.115.8.2 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.126 / (download) - annotate - [select for diffs], Sat Jan 19 22:23:35 2008 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.125: +4 -6 lines
Diff to previous 1.125 (colored) to selected 1.68 (colored)

Let ether_ioctl() handle default SIOCSIFMEDIA/SIOCGIFMEDIA actions.

Revision 1.115.8.2 / (download) - annotate - [select for diffs], Thu Jan 10 23:44:24 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.115.8.1: +6 -48 lines
Diff to previous 1.115.8.1 (colored) to branchpoint 1.115 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.125 / (download) - annotate - [select for diffs], Thu Jan 10 07:25:33 2008 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.124: +8 -50 lines
Diff to previous 1.124 (colored) to selected 1.68 (colored)

Re-use ether_mediachange(), ether_mediastatus().  Stop using
shutdownhook_establish(9).

Revision 1.113.8.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:53:49 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.113.8.1: +1022 -815 lines
Diff to previous 1.113.8.1 (colored) to branchpoint 1.113 (colored) to selected 1.68 (colored)

sync with HEAD

Revision 1.115.8.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:54:46 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.115: +1022 -815 lines
Diff to previous 1.115 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:46:55 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.115: +1022 -815 lines
Diff to previous 1.115 (colored) next main 1.116 (colored) to selected 1.68 (colored)

Sync with head.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Dec 16 21:17:00 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base
Changes since 1.123: +64 -58 lines
Diff to previous 1.123 (colored) to selected 1.68 (colored)

Convert many macros to inline subroutines.  Some of the subroutines
probably should not be inline.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Dec 15 23:04:57 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.122: +4 -6 lines
Diff to previous 1.122 (colored) to selected 1.68 (colored)

sip_copy_small and gsip_copy_small should not be static any longer.
Make it so.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Dec 15 21:51:45 2007 UTC (16 years, 3 months ago) by he
Branch: MAIN
Changes since 1.121: +4 -2 lines
Diff to previous 1.121 (colored) to selected 1.68 (colored)

Only declare sip_copy_small under __NO_STRICT_ALIGNMENT, to afoid
a "defined but not used" warning turned into error by compiler options.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Dec 15 07:05:57 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.120: +55 -9 lines
Diff to previous 1.120 (colored) to selected 1.68 (colored)

Take care to release all resources.  Now I can 'drvctl -d sip0;
drvctl -r pci0' to to detach / re-attach a sip0.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Dec 15 05:46:21 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.119: +235 -94 lines
Diff to previous 1.119 (colored) to selected 1.68 (colored)

Finish making the sip(4) and gsip(4) drivers share compiled code.

Revision 1.119 / (download) - annotate - [select for diffs], Sat Dec 15 01:27:13 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.118: +15 -14 lines
Diff to previous 1.118 (colored) to selected 1.68 (colored)

Attach sip to 10/100 variants, gsip to gigabit variants.  Thanks
Izumi Tsutsui for the bug report.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Dec 14 08:14:27 2007 UTC (16 years, 3 months ago) by dogcow
Branch: MAIN
Changes since 1.117: +5 -2 lines
Diff to previous 1.117 (colored) to selected 1.68 (colored)

fix KDASSERTs by defining ifp

Revision 1.117 / (download) - annotate - [select for diffs], Fri Dec 14 03:38:19 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.116: +5 -21 lines
Diff to previous 1.116 (colored) to selected 1.68 (colored)

Simplify suspend/resume using device_has_power().

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 14 01:55:35 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.115: +701 -675 lines
Diff to previous 1.115 (colored) to selected 1.68 (colored)

Take a step toward sharing compiled code between sip(4) and gsip(4):
get rid of SIP_DECL() and reduce #ifdef DP83820 code.  Next step
is to move a bunch of shared code to a new file (if_sipcom.c, say)
and compile it *once*.

While I am here, add suspend/resume handling to sip(4) and to
gsip(4).

Tested with the NatSemi sip(4) on the Soekris net4521.  I don't
have any gsip(4) to test with, and it seems that the few holders
of gsip(4) in the world keep them in their attic, anyway.

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

sync with HEAD

Revision 1.102.2.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:33:01 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.3: +4 -4 lines
Diff to previous 1.102.2.3 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.113.6.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:46:18 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.1: +4 -4 lines
Diff to previous 1.113.6.1 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored) to selected 1.68 (colored)

Sync with HEAD.

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

Revision 1.114.4.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:39:04 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored) next main 1.115 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.112.2.3 / (download) - annotate - [select for diffs], Tue Oct 23 20:09:02 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.112.2.2: +4 -4 lines
Diff to previous 1.112.2.2 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored) to selected 1.68 (colored)

Sync with head.

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

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

Revision 1.112.2.2 / (download) - annotate - [select for diffs], Tue Oct 9 13:41:45 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.112.2.1: +6 -6 lines
Diff to previous 1.112.2.1 (colored) to branchpoint 1.112 (colored) to selected 1.68 (colored)

Sync with head.

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

Sync with HEAD.

Revision 1.102.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:37:01 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.2: +18 -18 lines
Diff to previous 1.102.2.2 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:21:02 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.113: +6 -6 lines
Diff to previous 1.113 (colored) next main 1.114 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Aug 29 22:33:43 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: bouyer-xenamd64
Changes since 1.113: +6 -6 lines
Diff to previous 1.113 (colored) to selected 1.68 (colored)

Constify: LLADDR() -> CLLADDR().

Revision 1.112.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:07:40 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored) next main 1.113 (colored) to selected 1.68 (colored)

Sync with head.

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

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

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

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Sun Jul 1 21:48:10 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored) to selected 1.68 (colored)

Adapt to callout API change.

Revision 1.110.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:55:20 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.110: +12 -12 lines
Diff to previous 1.110 (colored) next main 1.111 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.112 / (download) - annotate - [select for diffs], Sun Mar 4 15:05:24 2007 UTC (17 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) to selected 1.68 (colored)

fix fallout from caddr_t changes.

Revision 1.111 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:22 2007 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.110: +12 -12 lines
Diff to previous 1.110 (colored) to selected 1.68 (colored)

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

Revision 1.102.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:48:45 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102.2.1: +4 -3 lines
Diff to previous 1.102.2.1 (colored) to branchpoint 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.108.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:17:44 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.108.6.1: +7 -7 lines
Diff to previous 1.108.6.1 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.108.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:30 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.108: +4 -3 lines
Diff to previous 1.108 (colored) next main 1.109 (colored) to selected 1.68 (colored)

Sync with head.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:09 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.109: +7 -7 lines
Diff to previous 1.109 (colored) to selected 1.68 (colored)

__unused removal on arguments; approved by core.

Revision 1.108.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:17 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.108: +8 -7 lines
Diff to previous 1.108 (colored) to selected 1.68 (colored)

sync with head

Revision 1.109 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:30 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.108: +8 -7 lines
Diff to previous 1.108 (colored) to selected 1.68 (colored)

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

Revision 1.103.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:52:17 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.103: +65 -28 lines
Diff to previous 1.103 (colored) next main 1.104 (colored) to selected 1.68 (colored)

sync with head

Revision 1.107.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:27 2006 UTC (17 years, 8 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.107: +9 -23 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.68 (colored)

Merge from HEAD.

Revision 1.104.2.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:51:21 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104.2.3: +9 -23 lines
Diff to previous 1.104.2.3 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:05:05 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.102: +65 -28 lines
Diff to previous 1.102 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:01:36 2006 UTC (17 years, 9 months ago) by chap
Branch: chap-midi
Changes since 1.107: +9 -23 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.68 (colored)

Sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jun 17 23:34:27 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, rpaulo-netinet-merge-pcb-base, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.107: +9 -23 lines
Diff to previous 1.107 (colored) to selected 1.68 (colored)

re-factor the pci powestate api. reviewed by gimpy

Revision 1.104.6.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:28 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.104.6.1: +52 -6 lines
Diff to previous 1.104.6.1 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored) to selected 1.68 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.104.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:58:01 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104.2.2: +26 -5 lines
Diff to previous 1.104.2.2 (colored) to branchpoint 1.104 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.103.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:14 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.103: +58 -7 lines
Diff to previous 1.103 (colored) next main 1.104 (colored) to selected 1.68 (colored)

Sync with head.

Revision 1.101.2.3 / (download) - annotate - [select for diffs], Fri Apr 21 12:03:38 2006 UTC (17 years, 11 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.101.2.2: +26 -1 lines
Diff to previous 1.101.2.2 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored) to selected 1.68 (colored)

Pull up following revision(s) (requested by pavel in ticket #1280):
	sys/dev/pci/if_sip.c: revision 1.106
In rev. 1.98, the ioctl method of the (g)sip drivers was optimized for
SIOCSIFFLAGS: it compares the new flags with the old flags and avoids
reset if there are only certain changes. This was done to fix PR 29126.
It does not take into account, though, that there is other state which
can change and SIOCSIFFLAGS is called to inform about it.  Namely,
if_capenable, ec_capenable and ec_nvlans. For all three, the _init
method must program the hardware specially. Not doing it resulted in:
- VLAN frames getting truncated
- hw checksumming not working
- outgoing VLAN frames not being tagged when they should
- incoming VLAN frames being treated as untagged.
Fix by keeping all the old state in the softc and initializing the
hardware if any of it changes.
Tested on gsip. Also tested by Nino Dehne and Martin J. Laubach
on sip, thanks.
Fixes PRs 32900 and 33216.
Approved by martin@ .

Revision 1.101.2.2 / (download) - annotate - [select for diffs], Fri Apr 21 11:57:35 2006 UTC (17 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.101.2.1: +24 -3 lines
Diff to previous 1.101.2.1 (colored) to branchpoint 1.101 (colored) to selected 1.68 (colored)

Pull up following revision(s) (requested by pavel in ticket #1279):
	sys/dev/pci/if_sip.c: revision 1.107
VLAN tags were sent byte-swapped by the gsip driver, because the driver
forgets to convert them from the host to the network byte order. Use
bswap16 to convert them. (Not htons, because on a big-endian machine, they
are in the correct byte order initially, but then, they are byte-swapped
by a htole32 call when written to the transmit descriptor. So
byte-swapping is needed in this case too, to compensate for this htole32
call.)
For a similar reason, tags were seen byte-swapped when received on a
big-endian machine. Replace ntohs by bswap16 in the input path too.
(Again, it is needed to compensate for a le32toh call when the receive
descriptor is read.)
Fixes PR 32644.
Tested on 3.0/i386, 3.0/sgimips and current/alpha.
OK by martin@.

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:25:35 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.104: +57 -6 lines
Diff to previous 1.104 (colored) next main 1.105 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Apr 18 13:07:03 2006 UTC (17 years, 11 months ago) by pavel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, elad-kernelauth-base
Branch point for: gdamore-uart, chap-midi
Changes since 1.106: +26 -5 lines
Diff to previous 1.106 (colored) to selected 1.68 (colored)

VLAN tags were sent byte-swapped by the gsip driver, because the driver
forgets to convert them from the host to the network byte order. Use
bswap16 to convert them. (Not htons, because on a big-endian machine, they
are in the correct byte order initially, but then, they are byte-swapped
by a htole32 call when written to the transmit descriptor. So
byte-swapping is needed in this case too, to compensate for this htole32
call.)

For a similar reason, tags were seen byte-swapped when received on a
big-endian machine. Replace ntohs by bswap16 in the input path too.
(Again, it is needed to compensate for a le32toh call when the receive
descriptor is read.)

Fixes PR 32644.

Tested on 3.0/i386, 3.0/sgimips and current/alpha.

OK by martin@.

Revision 1.104.2.2 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:17 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104.2.1: +28 -3 lines
Diff to previous 1.104.2.1 (colored) to branchpoint 1.104 (colored) to selected 1.68 (colored)

sync with head

Revision 1.106 / (download) - annotate - [select for diffs], Mon Apr 10 16:37:22 2006 UTC (17 years, 11 months ago) by pavel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4
Changes since 1.105: +28 -3 lines
Diff to previous 1.105 (colored) to selected 1.68 (colored)

In rev. 1.98, the ioctl method of the (g)sip drivers was optimized for
SIOCSIFFLAGS: it compares the new flags with the old flags and avoids
reset if there are only certain changes. This was done to fix PR 29126.

It does not take into account, though, that there is other state which
can change and SIOCSIFFLAGS is called to inform about it.  Namely,
if_capenable, ec_capenable and ec_nvlans. For all three, the _init
method must program the hardware specially. Not doing it resulted in:
- VLAN frames getting truncated
- hw checksumming not working
- outgoing VLAN frames not being tagged when they should
- incoming VLAN frames being treated as untagged.

Fix by keeping all the old state in the softc and initializing the
hardware if any of it changes.

Tested on gsip. Also tested by Nino Dehne and Martin J. Laubach
on sip, thanks.

Fixes PRs 32900 and 33216.

Approved by martin@ .

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:15 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104: +7 -2 lines
Diff to previous 1.104 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.104.6.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:13 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.104: +7 -2 lines
Diff to previous 1.104 (colored) to selected 1.68 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Mar 27 18:45:03 2006 UTC (18 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3
Changes since 1.104: +7 -2 lines
Diff to previous 1.104 (colored) to selected 1.68 (colored)

MCLAIM() mbufs allocated here.

Revision 1.103.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:08 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored) next main 1.104 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.101.2.1 / (download) - annotate - [select for diffs], Wed Feb 8 21:10:28 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored) to selected 1.68 (colored)

Pull up following revision(s) (requested by thorpej in ticket #1161):
	sys/dev/pci/if_wm.c: revision 1.111
	sys/dev/pci/if_sip.c: revision 1.104
In the receive interrupt handler, compute the packet length before
resetting
m to point to the first buffer in the packet.  The bug would cause the
length of jumbo frames to be incorrect.

Revision 1.104 / (download) - annotate - [select for diffs], Tue Feb 7 06:20:04 2006 UTC (18 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored) to selected 1.68 (colored)

In the receive interrupt handler, compute the packet length before resetting
m to point to the first buffer in the packet.  The bug would cause the
length of jumbo frames to be incorrect.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Dec 11 12:22:49 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored) to selected 1.68 (colored)

merge ktrace-lwp.

Revision 1.78.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:06:01 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.9: +18 -12 lines
Diff to previous 1.78.2.9 (colored) next main 1.79 (colored) to selected 1.68 (colored)

Sync with HEAD. Here we go again...

Revision 1.102 / (download) - annotate - [select for diffs], Mon May 2 15:34:32 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.101: +18 -12 lines
Diff to previous 1.101 (colored) to selected 1.68 (colored)

split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx.

Revision 1.96.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:06 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.96: +56 -55 lines
Diff to previous 1.96 (colored) next main 1.97 (colored) to selected 1.68 (colored)

sync with -current

Revision 1.96.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:11 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.96.6.1: +21 -34 lines
Diff to previous 1.96.6.1 (colored) to branchpoint 1.96 (colored) next main 1.97 (colored) to selected 1.68 (colored)

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

Revision 1.78.2.9 / (download) - annotate - [select for diffs], Fri Mar 4 16:45:18 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.8: +21 -34 lines
Diff to previous 1.78.2.8 (colored) to selected 1.68 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.101 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:33 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.100: +13 -13 lines
Diff to previous 1.100 (colored) to selected 1.68 (colored)

nuke trailing whitespace

Revision 1.100 / (download) - annotate - [select for diffs], Sun Feb 20 15:56:03 2005 UTC (19 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.99: +10 -23 lines
Diff to previous 1.99 (colored) to selected 1.68 (colored)

use VLAN_* macros for VLAN tag extraction/addition

Revision 1.96.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:47 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.96: +37 -23 lines
Diff to previous 1.96 (colored) to selected 1.68 (colored)

sync with head.

Revision 1.78.2.8 / (download) - annotate - [select for diffs], Sun Feb 6 09:02:36 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.7: +3 -2 lines
Diff to previous 1.78.2.7 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.78.2.7 / (download) - annotate - [select for diffs], Sun Feb 6 08:59:23 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.6: +23 -3 lines
Diff to previous 1.78.2.6 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Feb 6 08:52:08 2005 UTC (19 years, 1 month ago) by cube
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.98: +3 -2 lines
Diff to previous 1.98 (colored) to selected 1.68 (colored)

Initialize 'error' in all cases in ioctl handler, otherwise it doesn't
compile (and of course might return garbage).  [hi kim!]

Revision 1.98 / (download) - annotate - [select for diffs], Sun Feb 6 03:15:14 2005 UTC (19 years, 1 month ago) by kim
Branch: MAIN
Changes since 1.97: +23 -3 lines
Diff to previous 1.97 (colored) to selected 1.68 (colored)

If the interface is up and running, only modify the receive filter
when setting promiscuous or debug mode.  This avoids resetting the
chip unnecessarily.

Fixes PR kern/29126.

Revision 1.78.2.6 / (download) - annotate - [select for diffs], Fri Feb 4 11:46:38 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.5: +15 -22 lines
Diff to previous 1.78.2.5 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Jan 30 18:56:34 2005 UTC (19 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.96: +15 -22 lines
Diff to previous 1.96 (colored) to selected 1.68 (colored)

- Fix some logic errors in multi-descriptor packet reception case for
  DP83820.
- Eliminate use of M_HASFCS.

Revision 1.87.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jan 24 21:41:52 2005 UTC (19 years, 2 months ago) by he
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.87.2.1: +2 -1 lines
Diff to previous 1.87.2.1 (colored) next main 1.88 (colored) to selected 1.68 (colored)

Pull up revision 1.96 (requested by thorpej in ticket #939):
  When adding or deleting multicast addresses, only change
  the address filter if the interface is marked RUNNING.
  Fixes PR#27678.

Revision 1.78.2.5 / (download) - annotate - [select for diffs], Tue Nov 2 07:52:10 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.4: +4 -3 lines
Diff to previous 1.78.2.4 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Oct 30 18:09:22 2004 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.95: +4 -3 lines
Diff to previous 1.95 (colored) to selected 1.68 (colored)

When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.

Revision 1.78.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:31:03 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.3: +2 -2 lines
Diff to previous 1.78.2.3 (colored) to selected 1.68 (colored)

Fix the sync with head I botched.

Revision 1.78.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:49:03 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.2: +2 -2 lines
Diff to previous 1.78.2.2 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.78.2.2 / (download) - annotate - [select for diffs], Wed Aug 25 06:58:05 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78.2.1: +82 -81 lines
Diff to previous 1.78.2.1 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Aug 21 22:48:18 2004 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.94: +82 -81 lines
Diff to previous 1.94 (colored) to selected 1.68 (colored)

Use ANSI function decls and make use of static.

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:49:08 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.78: +339 -54 lines
Diff to previous 1.78 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Fri May 28 07:10:38 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.87: +8 -6 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.68 (colored)

Pull up revision 1.91 (requested by fair in ticket #296):
Two changes:
1. ifdef out the restriction that the SiS 900 has only one PHY
This is demonstrably false; the SiS 960 super south bridge in
PR 18590 has a SiS 900 rev 1 core in it.
2. bitbang the MII for all versions of the SiS 900; this is the
only way that the PHYs on this system answer.
Also, I suspect that SIS900_REV_960 constant in if_sipreg.h is
incorrectly labelled - there were later revisions of the super
south bridge (e.g. the 961, 962, and 963), and I suspect the
SiS 900 revision code there refers to one of those.

Revision 1.94 / (download) - annotate - [select for diffs], Sat May 15 22:33:13 2004 UTC (19 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.93: +26 -3 lines
Diff to previous 1.93 (colored) to selected 1.68 (colored)

Add PAUSE-related event counters for sip(4) and gsip(4), slightly modified
from a patch supplied by HITOSHI Osada.

Revision 1.93 / (download) - annotate - [select for diffs], Sat May 15 22:26:49 2004 UTC (19 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored) to selected 1.68 (colored)

Patch from HITOSHI Osada:
* On the DP83820, don't set PCR_PS_DA if the PAUSE packet address is
  not registered in the multicast filter.

Revision 1.92 / (download) - annotate - [select for diffs], Sat May 15 22:24:51 2004 UTC (19 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.91: +21 -2 lines
Diff to previous 1.91 (colored) to selected 1.68 (colored)

Patch from HITOSHI Osada:
* SiS900 chips require the address of the PAUSE packet to be registered
  in the multicast filter.

Revision 1.91 / (download) - annotate - [select for diffs], Sun May 9 03:03:55 2004 UTC (19 years, 10 months ago) by fair
Branch: MAIN
Changes since 1.90: +8 -6 lines
Diff to previous 1.90 (colored) to selected 1.68 (colored)

Two changes:
1. ifdef out the restriction that the SiS 900 has only one PHY
This is demonstrably false; the SiS 960 super south bridge in
PR 18590 has a SiS 900 rev 1 core in it.

2. bitbang the MII for all versions of the SiS 900; this is the
only way that the PHYs on this system answer.

Also, I suspect that SIS900_REV_960 constant in if_sipreg.h is
incorrectly labelled - there were later revisions of the super
south bridge (e.g. the 961, 962, and 963), and I suspect the
SiS 900 revision code there refers to one of those.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Apr 22 06:11:38 2004 UTC (19 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.68 (colored)

If defined(DP83820), (always) drop IFF_OACTIVE if we got txintr.
Otherwise, the driver simply stuck once we face tx resource shortage.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Apr 11 21:16:00 2004 UTC (19 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.88: +112 -23 lines
Diff to previous 1.88 (colored) to selected 1.68 (colored)

Flow control support for DP83820 and SiS900.  From HITOSHI Osada.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Apr 11 16:57:44 2004 UTC (19 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.87: +69 -9 lines
Diff to previous 1.87 (colored) to selected 1.68 (colored)

Improvements to DP83820 support, from HITOSHI Osada:
- Fix jumbo frame support.
- Disable interrupts at the chip in sip_intr().
- Disable checksum offloading if MTU > 8109 - the hardware is broken
  in this case.
- Use the interrupt hold-off timer.
- Correct the Tx FIFO size.
- Add Pause Control/Status register definitions.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jan 11 09:07:56 2004 UTC (20 years, 2 months ago) by cube
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.86: +3 -2 lines
Diff to previous 1.86 (colored) to selected 1.68 (colored)

The limitation for TX/RX DMA of rev. 900B and 635 os the SiS chips also
applies to rev. 0x91 for 96x chipsets.  Needed to fix PR 24043, but more
stressing testing has to be performed before closing it.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Dec 5 22:34:44 2003 UTC (20 years, 3 months ago) by cube
Branch: MAIN
Changes since 1.85: +53 -187 lines
Diff to previous 1.85 (colored) to selected 1.68 (colored)

Remove bitbang code that was taken from FreeBSD to support recent SiS
chipsets and use mii_bitbang interface instead.  Reflect sip dependency in
the config file.

Support for SiS96x needs broader testing.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Dec 4 13:57:31 2003 UTC (20 years, 3 months ago) by keihan
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored) to selected 1.68 (colored)

netbsd.org -> NetBSD.org

This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Dec 3 21:58:49 2003 UTC (20 years, 3 months ago) by cube
Branch: MAIN
Changes since 1.83: +235 -21 lines
Diff to previous 1.83 (colored) to selected 1.68 (colored)

o Add support for accessing the PHY through MDIO for recent SiS chips
o Add support for the recent SiS96x chipsets that have a new revision.
  That includes a new bit of code to access the EEPROM, since it is
  shared with the ieee1394 controller on those chipsets.

Mostly taken from FreeBSD (rev. 1.62 and 1.64 of sys/pci/if_sip.c).  I
tried to make the code look less ugly, but couldn't invent documentation.

Fix PR #23481.  Thanks to Stephane ENGEL <sengel AT melshake DOT com> for
the report and the cheerful testing.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Oct 29 03:31:22 2003 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.82: +7 -4 lines
Diff to previous 1.82 (colored) to selected 1.68 (colored)

Fix the real cause of the uninitialized warning -- we were looking for the VLAN
tag in the wrong place!

Revision 1.82 / (download) - annotate - [select for diffs], Sat Oct 25 18:31:11 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored) to selected 1.68 (colored)

Fix uninitialized variable warnings

Revision 1.52.4.10 / (download) - annotate - [select for diffs], Thu Oct 2 10:02:00 2003 UTC (20 years, 6 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Changes since 1.52.4.9: +1 -1 lines
Diff to previous 1.52.4.9 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.68 (colored)

Pull up revision 1.81 (requested by martin in ticket #1490):
Fix typo (DP83020 -> DP83820) from HITOSHI Osada in PR kern/23023.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Sep 30 21:21:34 2003 UTC (20 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.68 (colored)

Fix typo (DP83020 -> DP83820) from HITOSHI Osada in PR kern/23023.

Revision 1.11.4.9 / (download) - annotate - [select for diffs], Mon Sep 8 07:08:56 2003 UTC (20 years, 6 months ago) by msaitoh
Branch: netbsd-1-5
Changes since 1.11.4.8: +7 -1 lines
Diff to previous 1.11.4.8 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored) to selected 1.68 (colored)

Pull up revision 1.79 via patch (requested by itojun in ticket #69):
 Accept 1518-byte frames (needed for vlan).  Valtteri Vuorikoski

Revision 1.80 / (download) - annotate - [select for diffs], Mon Aug 25 20:36:47 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.79: +5 -5 lines
Diff to previous 1.79 (colored) to selected 1.68 (colored)

KNF

Revision 1.52.4.9 / (download) - annotate - [select for diffs], Fri Aug 15 12:49:28 2003 UTC (20 years, 7 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.8: +8 -0 lines
Diff to previous 1.52.4.8 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.79 (requested by itojun in ticket #1413):
accept 1518-byte frames (needed for vlan).  Valtteri Vuorikoski

Revision 1.79 / (download) - annotate - [select for diffs], Fri Aug 15 07:29:34 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.78: +10 -2 lines
Diff to previous 1.78 (colored) to selected 1.68 (colored)

accept 1518-byte frames (needed for vlan).  Valtteri Vuorikoski

Revision 1.52.4.8 / (download) - annotate - [select for diffs], Sun Jun 15 12:42:45 2003 UTC (20 years, 9 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.7: +40 -10 lines
Diff to previous 1.52.4.7 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.78 (requested by thorpej in ticket #1228):
Add a work-around for the "short cable problem" that some DP83815
revisions have, as discussed on the soekris-tech mailing list a
while ago, whereby one can experience excessive recieve erros when
using < 30m cables.  The patch detects overflow in a DSP filter
parameter, and corrects it by writing a known good value.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Mar 23 00:56:15 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.77: +40 -10 lines
Diff to previous 1.77 (colored) to selected 1.68 (colored)

Add a work-around for the "short cable problem" that some DP83815
revisions have, as discussed on the soekris-tech mailing list a
while ago, whereby one can experience excessive recieve erros when
using < 30m cables.  The patch detects overflow in a DSP filter
parameter, and corrects it by writing a known good value.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Mar 13 13:57:01 2003 UTC (21 years ago) by briggs
Branch: MAIN
Changes since 1.76: +5 -2 lines
Diff to previous 1.76 (colored) to selected 1.68 (colored)

Detect SMC EZ Card as 64-bit.  Patch from Pavel Cahyna in kern/20680.

Revision 1.24.2.16 / (download) - annotate - [select for diffs], Fri Jan 17 16:31:42 2003 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.24.2.15: +8 -7 lines
Diff to previous 1.24.2.15 (colored) next main 1.25 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Jan 17 08:11:50 2003 UTC (21 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.75: +8 -7 lines
Diff to previous 1.75 (colored) to selected 1.68 (colored)

switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation.  it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized.  from Joel Wilsson

Revision 1.24.2.15 / (download) - annotate - [select for diffs], Sun Dec 29 20:49:23 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.24.2.14: +8 -6 lines
Diff to previous 1.24.2.14 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Dec 23 02:58:37 2002 UTC (21 years, 3 months ago) by tsutsui
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.74: +8 -6 lines
Diff to previous 1.74 (colored) to selected 1.68 (colored)

Replace magic numbers for power management control with PCI_PMCSR* macros.

XXX Should we use pci_get_powerstate() and pci_set_powerstate() in pci.c?

Revision 1.24.2.14 / (download) - annotate - [select for diffs], Wed Dec 11 06:38:17 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.24.2.13: +1 -1 lines
Diff to previous 1.24.2.13 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Nov 24 12:06:12 2002 UTC (21 years, 4 months ago) by scw
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored) to selected 1.68 (colored)

Fix uninitialised variable warnings.

Revision 1.52.4.7 / (download) - annotate - [select for diffs], Thu Nov 21 18:28:15 2002 UTC (21 years, 4 months ago) by he
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.52.4.6: +24 -5 lines
Diff to previous 1.52.4.6 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.62 (requested by tls in ticket #1007):
  Do not treat the ``reset complete'' interrupts as errors.
  Doing so causes us to go into a reset/interrupt/reset loop.

Revision 1.24.2.13 / (download) - annotate - [select for diffs], Mon Nov 11 22:11:07 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.12: +1 -1 lines
Diff to previous 1.24.2.12 (colored) to selected 1.68 (colored)

Catch up to -current

Revision 1.52.4.6 / (download) - annotate - [select for diffs], Fri Nov 1 18:33:45 2002 UTC (21 years, 5 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.5: +59 -7 lines
Diff to previous 1.52.4.5 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.60 (requested by thorpej in ticket #415):
Add a table of known-64-bit DP83820-based cards.  Use this table
to enable 64-bit data transfers on 64-bit cards when plugged into
a 64-bit slot.  Right know the Asante GigaNIX is listed in that
table.
Sigh, there is an EEPROM bit that can be used to detect 64-bit vs
32-bit cards.  Unfortunately, at least 2 vendors of 32-bit cards
fail to clear the "DATA64_EN" bit in the EEPROM, which causes the
card to lose badly, because it still manages to detect that it's
plugged into a 64-bit PCI slot.  Yay, stupid hardware vendors.

Revision 1.52.4.5 / (download) - annotate - [select for diffs], Fri Nov 1 18:28:14 2002 UTC (21 years, 5 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.4: +40 -25 lines
Diff to previous 1.52.4.4 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.59 (requested by thorpej in ticket #414):
Load configuration data from the EEPROM on the DP83820 differently: rather
than grovel the EEPROM directly, initiate an "EEPROM load" in the PCI
test register, and fetch the values from the CFG register.

Revision 1.52.4.4 / (download) - annotate - [select for diffs], Fri Nov 1 18:25:40 2002 UTC (21 years, 5 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.3: +3 -3 lines
Diff to previous 1.52.4.3 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.58 (requested by thorpej in ticket #413):
Update the TODO list: We have some Tx interrupt mitigation now, so
we need to do Rx interrupt mitigation next.

Revision 1.52.4.3 / (download) - annotate - [select for diffs], Fri Nov 1 18:23:53 2002 UTC (21 years, 5 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.2: +35 -17 lines
Diff to previous 1.52.4.2 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.56 (requested by thorpej in ticket #412):
Implement a sliding interrupt delay window for Tx interrupts.

Revision 1.52.4.2 / (download) - annotate - [select for diffs], Fri Nov 1 18:20:17 2002 UTC (21 years, 5 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.4.1: +21 -9 lines
Diff to previous 1.52.4.1 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.55 (requested by thorpej in ticket #411):
* Give symbolic names to the CFG bits in the EEPROM.
* Get CFG_M64ADDR, CFG_T64ADDR, and CFG_DATA64_EN from the EEPROM.
  Note, we still disable CFG_M64ADDR and CFG_T64ADDR later (XXX need
  PCI bus capability flags for these).
* Print a message if we're in a 64-bit slot and 64-bit data is
  disabled in the EEPROM.  Make sure CFG_DATA64_EN is disabled if
  we're not in a 64-bit slot.

Revision 1.24.2.12 / (download) - annotate - [select for diffs], Fri Oct 18 02:43:06 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.11: +7 -3 lines
Diff to previous 1.24.2.11 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Oct 17 01:17:30 2002 UTC (21 years, 5 months ago) by fair
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored) to selected 1.68 (colored)

Change the "dontcare" bits argument of ifmedia_init() to IFM_IMASK,
so that PHY instance is not siginificant in ifmedia_match(). This
is done to support multiple PHYs on the MII. Without this change,
ifmedia_set() would panic the system when no PHYs were matched.

I ran into this on an AMD EasyNow PC, which is built around SiS
system chips with an embedded SiS 900 core, and an external AMD
Am79c901 PHY, which presents two PHYs on the MII: one for HomePNA,
and one for standard 10base-T. The 10base-T PHY ends up with instance
number 1...

Revision 1.40.2.6 / (download) - annotate - [select for diffs], Thu Oct 10 18:40:45 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.40.2.5: +9 -5 lines
Diff to previous 1.40.2.5 (colored) next main 1.41 (colored) to selected 1.68 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.72 / (download) - annotate - [select for diffs], Wed Oct 2 16:51:29 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.71: +4 -4 lines
Diff to previous 1.71 (colored) to selected 1.68 (colored)

Add trailing ; to CFATTACH_DECL.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Sep 30 20:37:36 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +9 -5 lines
Diff to previous 1.70 (colored) to selected 1.68 (colored)

Use CFATTACH_DECL().

Revision 1.70 / (download) - annotate - [select for diffs], Fri Sep 27 20:40:15 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.68 (colored)

Declare all cfattach structures const.

Revision 1.40.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:45:17 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.40.2.4: +271 -77 lines
Diff to previous 1.40.2.4 (colored) to selected 1.68 (colored)

sync kqueue branch with HEAD

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Thu Aug 29 05:22:39 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.52.2.3: +124 -28 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.68 (colored)

catch up with -current.

Revision 1.24.2.11 / (download) - annotate - [select for diffs], Tue Aug 27 23:46:48 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.10: +50 -9 lines
Diff to previous 1.24.2.10 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Aug 26 22:52:02 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.68: +8 -6 lines
Diff to previous 1.68 (colored)

* The Netgear GA-621 is a 64-bit card, so add it to the 64-bit
  quirk table.
* We want to hardwire BMSR_EXTSTAT, not BMSR_EXTCAP, when reading
  the TBI BMSR.
* Fetch the GPIO bits from the GPIOR register after an auto-load,
  rather than reading from the EEPROM directly.

Revision 1.68 / (download) - annotate - [selected], Mon Aug 26 07:38:34 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.67: +6 -6 lines
Diff to previous 1.67 (colored)

need to set wantinit variable

Revision 1.67 / (download) - annotate - [select for diffs], Mon Aug 26 07:37:26 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.66: +8 -5 lines
Diff to previous 1.66 (colored) to selected 1.68 (colored)

suppress some of debugging output (IFF_DEBUG will re-enable it).  PR 18069

Revision 1.66 / (download) - annotate - [select for diffs], Wed Aug 21 03:59:31 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.65: +4 -3 lines
Diff to previous 1.65 (colored) to selected 1.68 (colored)

use RND_ENABLED() to avoid unneeded function call.  should help if_gsip case.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Aug 20 00:35:46 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.64: +19 -2 lines
Diff to previous 1.64 (colored) to selected 1.68 (colored)

attach random number source.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Aug 16 07:10:56 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +21 -3 lines
Diff to previous 1.63 (colored) to selected 1.68 (colored)

* Hard-code EXTSR_1000XFDX|EXTSR_1000XHDX for reads of the MII_EXTSR
  in the TBI case.
* Force BMSR_ANEG | BMSR_EXTCAP to be returned for reads of the MII_BMSR
  in the TBI case.

Revision 1.24.2.10 / (download) - annotate - [select for diffs], Tue Aug 13 02:19:38 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.9: +76 -21 lines
Diff to previous 1.24.2.9 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Aug 10 22:57:15 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.62: +56 -20 lines
Diff to previous 1.62 (colored) to selected 1.68 (colored)

Preliminary support for the ten-bit interface on the DP83820.  This
code needs more testing, and more bug fixing.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Aug 10 22:54:54 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +24 -5 lines
Diff to previous 1.61 (colored) to selected 1.68 (colored)

Don't treat the "reset complete" interrupts as errors.  Doing so
causes us to go into a reset/interrupt/reset/... loop.

Revision 1.24.2.9 / (download) - annotate - [select for diffs], Thu Aug 1 02:45:16 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.8: +149 -51 lines
Diff to previous 1.24.2.8 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Mon Jul 15 10:35:37 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.52.2.2: +149 -51 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

catch up with -current.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 11 18:07:56 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +5 -2 lines
Diff to previous 1.60 (colored) to selected 1.68 (colored)

Add 64-bit quirk for the Accton EN1407-T/Planex GN-1000TE.  IDs provided
by SAITOH Masanobu <msaitoh@netbsd.org>.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jun 30 20:36:06 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +59 -7 lines
Diff to previous 1.59 (colored) to selected 1.68 (colored)

Add a table of known-64-bit DP83820-based cards.  Use this table
to enable 64-bit data transfers on 64-bit cards when plugged into
a 64-bit slot.  Right know the Asante GigaNIX is listed in that
table.

Sigh, there is an EEPROM bit that can be used to detect 64-bit vs
32-bit cards.  Unfortunately, at least 2 vendors of 32-bit cards
fail to clear the "DATA64_EN" bit in the EEPROM, which causes the
card to lose badly, because it still manages to detect that it's
plugged into a 64-bit PCI slot.  Yay, stupid hardware vendors.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 30 20:04:43 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +40 -25 lines
Diff to previous 1.58 (colored) to selected 1.68 (colored)

Load configuration data from the EEPROM on the DP83820 differently: rather
than grovel the EEPROM directly, initiate an "EEPROM load" in the PCI
test register, and fetch the values from the CFG register.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jun 30 19:13:46 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored) to selected 1.68 (colored)

Update the TODO list: We have some Tx interrupt mitigation now, so
we need to do Rx interrupt mitigation next.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jun 30 19:11:40 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +17 -19 lines
Diff to previous 1.56 (colored) to selected 1.68 (colored)

Be more aggressive in giving descriptors to the chip in the transmit
path: Instead of waiting for the if_snd queue to be drained before
giving ownership of the frist descriptor to the chip, do it after
sync'ing all the descriptors for a single packet.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jun 30 18:52:21 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +35 -17 lines
Diff to previous 1.55 (colored) to selected 1.68 (colored)

Implement a sliding interrupt delay window for Tx interrupts.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jun 30 18:04:12 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +23 -11 lines
Diff to previous 1.54 (colored) to selected 1.68 (colored)

* Give symbolic names to the CFG bits in the EEPROM.
* Get CFG_M64ADDR, CFG_T64ADDR, and CFG_DATA64_EN from the EEPROM.
  Note, we still disable CFG_M64ADDR and CFG_T64ADDR later (XXX need
  PCI bus capability flags for these).
* Print a message if we're in a 64-bit slot and 64-bit data is
  disabled in the EEPROM.  Make sure CFG_DATA64_EN is disabled if
  we're not in a 64-bit slot.

Revision 1.40.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:47:41 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.40.2.3: +14 -13 lines
Diff to previous 1.40.2.3 (colored) to selected 1.68 (colored)

catch up with -current on kqueue branch

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 16:33:36 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.52.2.1: +5 -5 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.68 (colored)

catch up with -current.

Revision 1.24.2.8 / (download) - annotate - [select for diffs], Thu Jun 20 03:45:27 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.7: +9 -8 lines
Diff to previous 1.24.2.7 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Jun 1 23:50:59 2002 UTC (21 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.53: +5 -5 lines
Diff to previous 1.53 (colored) to selected 1.68 (colored)

SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Thu May 30 14:46:06 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.68 (colored)

Catch up with -current.

Revision 1.52.4.1 / (download) - annotate - [select for diffs], Tue May 28 23:00:39 2002 UTC (21 years, 10 months ago) by tv
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.68 (colored)

Pull up revision 1.53 (requested by tron in ticket #50):
Set initial transmit drain threshold to 1504 to avoid the problem
described in PR kern/16070. Change approved by Jason Thorpe.
XXX We'll should try to find a better adaptive scheme for the next
    NetBSD release.

Revision 1.53 / (download) - annotate - [select for diffs], Tue May 28 20:20:49 2002 UTC (21 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.68 (colored)

Set initial transmit drain threshold to 1504 to avoid the problem
described in PR kern/16070. Change approved by Jason Thorpe.

XXX We'll should try to find a better adaptive scheme for the next
    NetBSD release.

Revision 1.52 / (download) - annotate - [select for diffs], Fri May 3 00:18:31 2002 UTC (21 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.51: +5 -4 lines
Diff to previous 1.51 (colored) to selected 1.68 (colored)

Bump the number of Tx DMA segments from 8 to 16 (the zero-copy socket
code sometimes sees more than 8).

Revision 1.24.2.7 / (download) - annotate - [select for diffs], Mon Apr 1 07:46:22 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.6: +62 -36 lines
Diff to previous 1.24.2.6 (colored) to selected 1.68 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.51 / (download) - annotate - [select for diffs], Wed Mar 27 21:42:45 2002 UTC (22 years ago) by briggs
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.68 (colored)

Erf.  Actually use the symbolic name for the 630ET instead of a constant.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Mar 27 21:41:35 2002 UTC (22 years ago) by briggs
Branch: MAIN
Changes since 1.49: +5 -4 lines
Diff to previous 1.49 (colored) to selected 1.68 (colored)

Print the chip revision in the attach function.
Treat revision 0x84 of the SiS like other SIS630 variants.
Call revision 0x84 the 630ET (name from OpenBSD).

Revision 1.11.4.8 / (download) - annotate - [select for diffs], Wed Mar 27 09:50:43 2002 UTC (22 years ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.11.4.7: +6 -7 lines
Diff to previous 1.11.4.7 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Pull up revision 1.49 (via patch, requested by is):
  Fix multicast reception on DP83815.  Fixes PR#15998.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Mar 24 11:00:17 2002 UTC (22 years ago) by is
Branch: MAIN
Changes since 1.48: +4 -5 lines
Diff to previous 1.48 (colored) to selected 1.68 (colored)

use the right endian ether_crc32 function in the multicast hash table computation

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:13 2002 UTC (22 years ago) by jdolecek
Branch: kqueue
Changes since 1.40.2.2: +129 -46 lines
Diff to previous 1.40.2.2 (colored) to selected 1.68 (colored)

Catch up with -current.

Revision 1.11.4.7 / (download) - annotate - [select for diffs], Sat Mar 9 17:02:19 2002 UTC (22 years ago) by he
Branch: netbsd-1-5
Changes since 1.11.4.6: +2 -1 lines
Diff to previous 1.11.4.6 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Apply patch (requested by bouyer):
  Fix an uninitialized pointer in sip_start(), which might eventually
  lead to a crash, especially if bpf is used.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Feb 28 23:52:37 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.47: +10 -5 lines
Diff to previous 1.47 (colored) to selected 1.68 (colored)

If the upper layer says Write/Invalidate is okay, then make sure
it's enabled in the PCI CSR.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 28 20:08:11 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.46: +5 -10 lines
Diff to previous 1.46 (colored) to selected 1.68 (colored)

Change the default Rx FIFO drain threshold to 128 bytes; this
reduces the likelihood of Rx FIFO overruns on machines with wimpy
PCI busses, while still allowing the interface to burst with a
reasonable size.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Feb 28 19:10:16 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.45: +54 -28 lines
Diff to previous 1.45 (colored) to selected 1.68 (colored)

* On the DP83820, make sure to make the Tx DMA map large enough for
  jumbo frames.
* Work around broken PXE firmware on some boards, which leave the ROM
  BAR enabled even after the PXE stack has been unloaded.
* Set up the initial values for sc_tx_fill_thresh, sc_tx_drain_thresh, and
  sc_rx_drain_thresh in sip_attach(), rather than in sip_init().

Revision 1.24.2.6 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:01 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.5: +77 -20 lines
Diff to previous 1.24.2.5 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Feb 9 21:04:02 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.44: +77 -20 lines
Diff to previous 1.44 (colored) to selected 1.68 (colored)

Fix problems associated with the SiS 635/735 on-board Ethernet,
from Stephen Degler <sdegler@degler.net>, port-i386/15261.

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 19:56:43 2002 UTC (22 years, 2 months ago) by thorpej
Branch: kqueue
Changes since 1.40.2.1: +51 -11 lines
Diff to previous 1.40.2.1 (colored) to selected 1.68 (colored)

Sync kqueue branch with -current.

Revision 1.24.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:31:04 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.4: +49 -12 lines
Diff to previous 1.24.2.4 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Dec 20 03:32:31 2001 UTC (22 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +49 -12 lines
Diff to previous 1.43 (colored) to selected 1.68 (colored)

Fetch the MAC address from the NVRAM on the SiS 630 built-in Ethernet.

Based on PR 14665, Stephen Borrill <netbsd@precedence.co.uk>.

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:15:17 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.3: +4 -1 lines
Diff to previous 1.24.2.3 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Nov 13 07:48:44 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.42: +4 -1 lines
Diff to previous 1.42 (colored) to selected 1.68 (colored)

add RCSID

Revision 1.11.4.6 / (download) - annotate - [select for diffs], Sat Oct 27 17:55:47 2001 UTC (22 years, 5 months ago) by he
Branch: netbsd-1-5
Changes since 1.11.4.5: +50 -21 lines
Diff to previous 1.11.4.5 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Apply patch (requested by briggs):
  Adjust receive and transmit descriptor list structures,
  sip_start(), and sip_txintr() to be more similar to the current
  development version.  Fixes periodic device timeouts.
Tested by briggs with a Netgear FA311TX on i386.

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:10:06 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.2: +342 -94 lines
Diff to previous 1.24.2.2 (colored) to selected 1.68 (colored)

Catch up with -current.

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:15 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.40: +10 -6 lines
Diff to previous 1.40 (colored) to selected 1.68 (colored)

update to -current

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 23 17:26:50 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored) to selected 1.68 (colored)

Make sure to initialize the all Rx descriptors properly in *_init()
even if mbufs for them are already allocated.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jul 19 16:36:14 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +6 -5 lines
Diff to previous 1.40 (colored) to selected 1.68 (colored)

Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 8 17:15:45 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Branch point for: kqueue
Changes since 1.39: +18 -17 lines
Diff to previous 1.39 (colored) to selected 1.68 (colored)

Some cosmetic shuffling.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jul 8 16:56:50 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored) to selected 1.68 (colored)

Fix a very, very dumb mistake that broke multicast on the dp83815
and dp83820.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 7 17:37:39 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +20 -21 lines
Diff to previous 1.37 (colored) to selected 1.68 (colored)

Change the structure of dp83815_set_filter ever so slightly.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jul 7 16:47:44 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored) to selected 1.68 (colored)

bcmp -> memcmp

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 7 02:32:38 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.35: +175 -85 lines
Diff to previous 1.35 (colored) to selected 1.68 (colored)

Add support for jumbo Ethernet frames on the DP83820.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jun 30 22:35:05 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +174 -18 lines
Diff to previous 1.34 (colored) to selected 1.68 (colored)

Split the receive interrupt handler into two versions, one for the
SiS900/DP83815, one for the DP83820.  In preparation for changes
to the DP83820 version for handling jumbo Ethernet frames.

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:04:49 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24.2.1: +787 -231 lines
Diff to previous 1.24.2.1 (colored) to selected 1.68 (colored)

Catch up to -current.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jun 18 01:58:08 2001 UTC (22 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.33: +6 -5 lines
Diff to previous 1.33 (colored) to selected 1.68 (colored)

Make error checking/reporting a little more correct.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 12 22:28:16 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +1 -13 lines
Diff to previous 1.32 (colored) to selected 1.68 (colored)

Don't need INET or NS includes here.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jun 3 03:55:10 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored) to selected 1.68 (colored)

Clarify a historical comment.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jun 2 16:17:07 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +103 -3 lines
Diff to previous 1.30 (colored) to selected 1.68 (colored)

Implement support for IP/TCP/UDP checksum offloading provided by
network interfaces.  This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us.  In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software.  This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.

We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.

Note: hardware-assisted checksumming defaults to "off".  It is
enabled with ifconfig(8).  See the manual page for details.

Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 18 04:38:30 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +70 -10 lines
Diff to previous 1.29 (colored) to selected 1.68 (colored)

- Add some instrumentation which can be enabled by defining
  SIP_EVENT_COUNTERS.
- Decrease SIP_NTXSEGS to 8 and increase SIP_TXQUEUELEN to 256.
  This gives us 256 transmit jobs with only twice the descriptor
  memory footprint.  This prevents stalling transmissions due to
  lack of transmit jobs under heavy load.
- Increase SIP_NRXDESC to 128 so we don't run out of receive descriptors
  under extreme load.
- As recommended by the manual, leave one descriptor in the transmit ring
  with OWN clear to prevent wrap-around.
- Even though the manual claims that driver software must initialize
  TXDP if there are no pending transmissions when a new transmission
  is to be initialized, doing so causes serious performance degredation
  on the DP83820 under heavy load.  Not initializing TXDP also increases
  performance on the DP83815.

All of this gets us up to ~90Mb/s on both the DP83820 and DP83815 when
connected to a 100base network.

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 18 02:03:53 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +461 -52 lines
Diff to previous 1.28 (colored) to selected 1.68 (colored)

Add a driver for the National Semiconductor DP83820 Gigabit Ethernet
chip.  This is found on the NetGear GA-622 and Asante FriendlyNet
GigaNIX.

Revision 1.28 / (download) - annotate - [select for diffs], Tue May 15 03:06:21 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.27: +150 -153 lines
Diff to previous 1.27 (colored) to selected 1.68 (colored)

Encapsulate name declarations in macros in preparation for adding
conditionally-compiled code for the DP83820.

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:56:59 2001 UTC (22 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.24: +141 -30 lines
Diff to previous 1.24 (colored) to selected 1.68 (colored)

Catch up with -current.

Revision 1.2.2.6 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:07 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2.2.5: +4 -4 lines
Diff to previous 1.2.2.5 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Mar 24 19:40:51 2001 UTC (23 years ago) by briggs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored) to selected 1.68 (colored)

There is no need to accept all ARP packets (regardless of destination
address) on the DP83815.  Noted by Shiva Shenoy <shiva@riverstonenet.com>
in private correspondence.

Revision 1.11.4.5 / (download) - annotate - [select for diffs], Tue Mar 13 20:26:01 2001 UTC (23 years ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.11.4.4: +139 -28 lines
Diff to previous 1.11.4.4 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Pull up revisions 1.25-1.26 (requested by briggs):
  Fix support for the DP83815 so that it works properly with the
  current crop of Netgear FA311 10/100 cards.

Revision 1.2.2.5 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:07 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2.2.4: +140 -29 lines
Diff to previous 1.2.2.4 (colored) to branchpoint 1.2 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Mar 9 16:07:20 2001 UTC (23 years ago) by briggs
Branch: MAIN
Changes since 1.25: +34 -19 lines
Diff to previous 1.25 (colored) to selected 1.68 (colored)

More fixes for the DP83815...
- Set the destination address register properly for "perfect match" mode
  in the receive filter setup.
- Do not enable multicast receipt unless we are configured for some multicast.
- Use the "recommended settings" (which set undocumented registers and
  documented-as-reserved fields) for the silicon revision 302h (not 203h,
  as documented in one of the two places in the manual) because the
  documentation is unclear and because those settings fix the card's
  behavior in "perfect match" mode.  Without those settings, the card
  was generating random CRC/invalid symbol errors and generally not
  working unless it was set to be promiscuous.

With these changes, this week's version of the Netgear FA311 works for me.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 9 07:42:24 2001 UTC (23 years ago) by briggs
Branch: MAIN
Changes since 1.24: +109 -13 lines
Diff to previous 1.24 (colored) to selected 1.68 (colored)

Add a variant hook to read the ethernet MAC address from EEPROM differently
for the SiS 900 and the DP83815.  Also add some configuration suggested by
the DP83815 documentation for one model of the DP83815.

Revision 1.11.4.4 / (download) - annotate - [select for diffs], Mon Feb 26 17:03:33 2001 UTC (23 years, 1 month ago) by he
Branch: netbsd-1-5
Changes since 1.11.4.3: +2 -2 lines
Diff to previous 1.11.4.3 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Pull up revision 1.24 (requested by thorpej):
  Fix a bug in the DP83815 multicast setup code.

Revision 1.2.2.4 / (download) - annotate - [select for diffs], Sun Feb 11 19:15:55 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2.2.3: +2 -2 lines
Diff to previous 1.2.2.3 (colored) to branchpoint 1.2 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Feb 6 02:49:12 2001 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored) to selected 1.68 (colored)

Gack, fix a stupid bug in the DP83815 multicast setup code.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:08 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2.2.2: +13 -10 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored) to selected 1.68 (colored)

Sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Thu Dec 28 22:59:13 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.22: +2 -3 lines
Diff to previous 1.22 (colored) to selected 1.68 (colored)

Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q

Revision 1.22 / (download) - annotate - [select for diffs], Tue Dec 19 00:12:47 2000 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +11 -7 lines
Diff to previous 1.21 (colored) to selected 1.68 (colored)

Fix a problem with the ALTQ changes that can cause bogus memory
refernces.  Problem reported by Luke Mewburn.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Dec 14 06:42:57 2000 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored) to selected 1.68 (colored)

ALTQ'ify.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:04:05 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2.2.1: +3 -7 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) to selected 1.68 (colored)

Sync with HEAD.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 11:42:23 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.2: +379 -199 lines
Diff to previous 1.2 (colored) to selected 1.68 (colored)

Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Nov 15 01:02:15 2000 UTC (23 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +1 -5 lines
Diff to previous 1.19 (colored) to selected 1.68 (colored)

Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().

Revision 1.11.4.3 / (download) - annotate - [select for diffs], Mon Oct 30 22:51:34 2000 UTC (23 years, 5 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2
Changes since 1.11.4.2: +3 -3 lines
Diff to previous 1.11.4.2 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Pullup 1.19 [thorpej/tsutsui]:
Increase initial Tx drain threshold to 512 bytes.
My macppc complains about transmit FIFO underrun every time.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 28 08:36:57 2000 UTC (23 years, 5 months ago) by tsutsui
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.68 (colored)

Increase initial Tx drain threshold to 512 bytes.
My macppc complains about transmit FIFO underrun every time.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Oct 15 20:02:31 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored) to selected 1.68 (colored)

Don't trim off the FCS, pass it up.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Oct 11 16:58:47 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.16: +27 -100 lines
Diff to previous 1.16 (colored) to selected 1.68 (colored)

Use ether_ioctl().

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 1 23:32:43 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +2 -10 lines
Diff to previous 1.15 (colored) to selected 1.68 (colored)

Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).

Revision 1.11.4.2 / (download) - annotate - [select for diffs], Thu Sep 28 16:42:55 2000 UTC (23 years, 6 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-BETA
Changes since 1.11.4.1: +280 -41 lines
Diff to previous 1.11.4.1 (colored) to branchpoint 1.11 (colored) to selected 1.68 (colored)

Sync with trunk: Add support for the DP83815 10/100 Ethernet,
found on new NetGear cards.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 20 05:44:48 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +280 -41 lines
Diff to previous 1.14 (colored) to selected 1.68 (colored)

Preliminary support for the National Semiconductor DP83815 10/100
Ethernet chip, which is based on the SiS 900 core, but with differences
in the PHY and filter programming interface, and different WoL and
802.3x flow control programming.

This chip appears on new NetGear FA-312TX cards.  Thank goodness
they're finally ditching the LiteOn chips.

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Sat Aug 12 18:50:25 2000 UTC (23 years, 7 months ago) by tsutsui
Branch: netbsd-1-5
Changes since 1.11: +45 -26 lines
Diff to previous 1.11 (colored) to selected 1.68 (colored)

Pull up rev 1.13 and 1.14 (approved by thorpej):

 revision 1.13:
 - Add one more delay() to sip_read_eeprom()

 revision 1.14:
 - Check CR_RST rather than ISR_TXRCMP and ISR_RXRCMP in sip_reset()
 - Add more delay after reset
 - "Big endian mode" on SiS 900 seems broken so don't enable it;
   use htole32()/le32toh() instead
 - Don't cast u_int16_t array to u_int8_t pointer
 - Add some delay() to FILTER_EMIT macro in sip_set_filter()

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 12 07:38:40 2000 UTC (23 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.13: +44 -26 lines
Diff to previous 1.13 (colored) to selected 1.68 (colored)

- Check CR_RST rather than ISR_TXRCMP and ISR_RXRCMP in sip_reset()
- Add more delay after reset
- "Big endian mode" on SiS 900 seems broken so don't enable it;
  use htole32()/le32toh() instead
- Don't cast u_int16_t array to u_int8_t pointer
- Add some delay() to FILTER_EMIT macro in sip_set_filter()

Now SiS 900 works on my macppc.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Aug 4 09:30:56 2000 UTC (23 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored) to selected 1.68 (colored)

Add one more delay() to sip_read_eeprom().

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 28 16:08:45 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored) to selected 1.68 (colored)

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.11 / (download) - annotate - [select for diffs], Fri May 12 16:41:59 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.10: +4 -16 lines
Diff to previous 1.10 (colored) to selected 1.68 (colored)

Use ether_crc32_le().

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 23 22:23:03 2000 UTC (24 years ago) by mycroft
Branch: MAIN
Changes since 1.9: +5 -4 lines
Diff to previous 1.9 (colored) to selected 1.68 (colored)

Rather than guessing at the location of the PMCSR, use the pointer returned by
pci_get_capability().  (This is, after all, a standardized interface...)

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 23 07:01:39 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.8: +9 -4 lines
Diff to previous 1.8 (colored) to selected 1.68 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Mar 6 21:02:02 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored) to selected 1.68 (colored)

No longer necessary to futz with ifp->if_baudrate here.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 2 17:09:40 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.68 (colored)

Don't dry to diving MIIF_NOISOLATE in the PHY drivers.  Instead, pass
flags down from the parent to child vi mii_attach().

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 2 08:05:29 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) to selected 1.68 (colored)

Bring some order to the chaos which was the MII code function naming
"conventions".

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 31 18:36:12 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.4: +14 -8 lines
Diff to previous 1.4 (colored) to selected 1.68 (colored)

Add support for the SiS 7016.

Revision 1.2.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:17 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.2: +6 -2 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.68 (colored)

Pull up to last week's -current.

Revision 1.2.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:41:01 1999 UTC (24 years, 4 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.2: +6 -2 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.68 (colored)

Sync with -current

Revision 1.4 / (download) - annotate - [select for diffs], Fri Nov 12 18:14:19 1999 UTC (24 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base
Changes since 1.3: +4 -1 lines
Diff to previous 1.3 (colored) to selected 1.68 (colored)

Call mii_down() as appropriate.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Nov 4 00:24:32 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored) to selected 1.68 (colored)

Adapt to mii_phy_probe() change.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Aug 3 17:25:52 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.1: +104 -48 lines
Diff to previous 1.1 (colored) to selected 1.68 (colored)

Be a little nicer about memory usage:
* Don't allocate receive buffers until the interface is actually brought
  up, and release all of them if the interface is taken down.
* Add a knob (defaults to off) which will copy an incoming packet to
  a single header mbuf if it is small enough to fit in one, rather than
  burning an entire cluster on it.  Note that this change will be mostly
  moot if/when sbcompress() it changed to handle compressing clusters.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:18:34 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) next main 1.2 (colored) to selected 1.68 (colored)

Sync w/ -current.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jun 1 18:19:13 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Branch point for: chs-ubc2
Diff to selected 1.68 (colored)

Device driver for the Silicon Integrated Systems SiS900 10/100 Ethernet
chip, found on the IBM Netstation.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>