The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:47 2012 UTC (5 weeks, 4 days ago) by yamt
Branch: yamt-pagecache
Changes since 1.17: +5 -14 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

sync with head

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:40 2012 UTC (3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.18: +4 -13 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

merge to -current.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:05 2012 UTC (3 months, 3 weeks ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, HEAD
Changes since 1.18: +4 -13 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:23 2011 UTC (6 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (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.16.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:08:14 2011 UTC (11 months, 2 weeks ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.16: +47 -12 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

Sync with HEAD.

Revision 1.13.4.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:50 2011 UTC (13 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.13.4.2: +45 -10 lines
Diff to previous 1.13.4.2 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

sync with head

Revision 1.4.6.4 / (download) - annotate - [select for diffs], Tue Apr 5 06:12:46 2011 UTC (13 months, 3 weeks ago) by riz
Branch: netbsd-5
Changes since 1.4.6.3: +45 -10 lines
Diff to previous 1.4.6.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1588):
	sys/dev/pci/if_jme.c: revision 1.17
Some bus_dma(9)-related and memory allocation fixes:
- always bus_dmamap_unload() before recycling a receive descriptor
- make sure to not sleep from interrupt context: call bus_dmamap_load with
  M_NOWAIT, and create dma maps BUS_DMA_ALLOCNOW.
- if a receive descriptor has a NULL mbuf try to allocate a new one, don't
  try to receive it.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 30 18:11:37 2011 UTC (13 months, 3 weeks ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.16: +47 -12 lines
Diff to previous 1.16 (colored)

Some bus_dma(9)-related and memory allocation fixes:
- always bus_dmamap_unload() before recycling a receive descriptor
- make sure to not sleep from interrupt context: call bus_dmamap_load with
  M_NOWAIT, and create dma maps BUS_DMA_ALLOCNOW.
- if a receive descriptor has a NULL mbuf try to allocate a new one, don't
  try to receive it.

Revision 1.13.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:42 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.13.4.1: +26 -4 lines
Diff to previous 1.13.4.1 (colored) to branchpoint 1.13 (colored)

sync with head

Revision 1.4.6.3 / (download) - annotate - [select for diffs], Sun Jan 16 12:51:59 2011 UTC (16 months, 1 week ago) by bouyer
Branch: netbsd-5
Changes since 1.4.6.2: +26 -3 lines
Diff to previous 1.4.6.2 (colored) to branchpoint 1.4 (colored)

Pull up following revision(s) (requested by kochi in ticket #1525):
	sys/dev/pci/if_jme.c: revision 1.16
Try reading MAC addr from register if it fails to read from EEPROM.
Copied from FreeBSD driver.
Without this my JMC261 doesn't get MAC address properly.
OK'ed by bouyer@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jan 9 00:12:45 2011 UTC (16 months, 2 weeks ago) by kochi
Branch: MAIN
CVS Tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.15: +26 -3 lines
Diff to previous 1.15 (colored)

Try reading MAC addr from register if it fails to read from EEPROM.
Copied from FreeBSD driver.

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

OK'ed by bouyer@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Nov 13 13:52:06 2010 UTC (18 months, 1 week ago) by uebayasi
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.14: +2 -3 lines
Diff to previous 1.14 (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.9.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:47 2010 UTC (21 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.9.2.4: +4 -6 lines
Diff to previous 1.9.2.4 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

sync with head.

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:34 2010 UTC (23 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.13: +4 -6 lines
Diff to previous 1.13 (colored)

sync with head

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:36 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.13: +4 -6 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:26 2010 UTC (2 years, 1 month 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.13: +4 -6 lines
Diff to previous 1.13 (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.9.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:46 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.9.2.3: +22 -25 lines
Diff to previous 1.9.2.3 (colored) to branchpoint 1.9 (colored)

sync with head

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:01 2010 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.12: +4 -11 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:15 2009 UTC (2 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.11: +2 -7 lines
Diff to previous 1.11 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 27 12:52:59 2009 UTC (2 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.10: +20 -11 lines
Diff to previous 1.10 (colored)

Replace shutdownhook_establish(9) with pmf_device_register1(9).
Compile test only.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:57 2009 UTC (2 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.6.2.1: +6 -5 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD.

Revision 1.9.2.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:04 2009 UTC (2 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.9.2.2: +6 -5 lines
Diff to previous 1.9.2.2 (colored) to branchpoint 1.9 (colored)

sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jun 26 00:24:18 2009 UTC (2 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.9: +6 -5 lines
Diff to previous 1.9 (colored)

A lot of good it does, but let this build with 'no options INET'.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:20:25 2009 UTC (3 years ago) by jym
Branch: jym-xensuspend
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

Sync with HEAD.

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

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:57 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.9.2.1: +2161 -0 lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored)

sync with head.

Revision 1.4.4.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:56 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.4.4.2: +5 -5 lines
Diff to previous 1.4.4.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD.

Revision 1.9.2.1, Sat Apr 18 14:58:03 2009 UTC (3 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.9: +0 -2161 lines
FILE REMOVED

file if_jme.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:57 +0000

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 18 14:58:03 2009 UTC (3 years, 1 month ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Branch point for: yamt-nfs-mp
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch

Revision 1.8 / (download) - annotate - [select for diffs], Wed Mar 18 17:06:49 2009 UTC (3 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

bcopy -> memcpy

Revision 1.7 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:19 2009 UTC (3 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

bzero -> memset

Revision 1.4.4.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:31:07 2009 UTC (3 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.4.4.1: +16 -5 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored)

Sync with HEAD.

Revision 1.4.6.2 / (download) - annotate - [select for diffs], Mon Feb 2 20:50:11 2009 UTC (3 years, 3 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.4.6.1: +16 -5 lines
Diff to previous 1.4.6.1 (colored) to branchpoint 1.4 (colored)

Pull up following revision(s) (requested by bouyer in ticket #388):
	sys/dev/pci/if_jme.c: revision 1.6
Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 31 13:57:03 2009 UTC (3 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.5: +16 -5 lines
Diff to previous 1.5 (colored)

Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:18:25 2009 UTC (3 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

Sync with HEAD.

Revision 1.4.6.1 / (download) - annotate - [select for diffs], Sat Jan 17 22:51:03 2009 UTC (3 years, 4 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC1
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

Pull up following revision(s) (requested by bouyer in ticket #278):
	sys/dev/pci/if_jme.c: revision 1.5
	sys/dev/pci/if_jmereg.h: revision 1.3
According to the latest datasheet I have (1.09), the transmitter and
ckecksum offload clocks needs to be programmed according to the negociated
speed; make it so. This makes the sample JME260 I have work.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:00 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.5.2.1: +2150 -0 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Sync with HEAD.

Revision 1.5.2.1, Fri Jan 16 19:56:06 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.5: +0 -2150 lines
FILE REMOVED

file if_jme.c was added on branch mjf-devfs2 on 2009-01-17 13:29:00 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 16 19:56:06 2009 UTC (3 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: mjf-devfs2
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

According to the latest datasheet I have (1.09), the transmitter and ckecksum
offload clocks needs to be programmed according to the negociated speed;
make it so. This makes the sample JME260 I have work.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:39 2008 UTC (3 years, 7 months ago) by haad
Branch: haad-dm
Changes since 1.4.2.1: +2150 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD.

Revision 1.4.2.1, Thu Oct 16 21:22:32 2008 UTC (3 years, 7 months ago) by haad
Branch: haad-dm
Changes since 1.4: +0 -2150 lines
FILE REMOVED

file if_jme.c was added on branch haad-dm on 2008-10-19 22:16:39 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 16 21:22:32 2008 UTC (3 years, 7 months ago) by abs
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.3: +6 -2 lines
Diff to previous 1.3 (colored)

Fix compilation if !INET6

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 13 17:57:32 2008 UTC (3 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.2: +216 -131 lines
Diff to previous 1.2 (colored)

Add support for jumbo frames.
Some performances tweaks (including better defaults for interrupt mitigation)

Revision 1.2 / (download) - annotate - [select for diffs], Sun Oct 12 11:27:12 2008 UTC (3 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.1: +45 -46 lines
Diff to previous 1.1 (colored)

Fix reading MAC address from eeprom: don't forget to read the last
descriptor.
While there, white space fixes.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Oct 11 21:54:12 2008 UTC (3 years, 7 months ago) by bouyer
Branch: MAIN

jme(4), a driver for JMicron Technologies JME250 Gigabit Ethernet and
JME260 Fast Ethernet PCI Express controllers.
Written with a lot of cut-n-paste from the FreeBSD jme(4) driver.
No support for jumbo ethernet frames yet (but should come soon).
Thanks to JMicron Technologies for providing me sample boards and
documentation for this work.

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>