The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


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

sync with head

Revision 1.45.6.1 / (download) - annotate - [select for diffs], Sun Mar 11 01:52:28 2012 UTC (2 months, 2 weeks ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

sync to latest -current

Revision 1.45.8.1 / (download) - annotate - [select for diffs], Wed Mar 7 23:36:10 2012 UTC (2 months, 2 weeks ago) by riz
Branch: netbsd-6
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Pull up following revision(s) (requested by bouyer in ticket #100):
	sys/dev/pci/if_bnx.c: revision 1.46
bnx_start() is not MP-safe, so do not create the bnx_alloc_pkts()'s
workqueue MPSAFE. This could lead to bnx_start() being running at
the same time on 2 CPUs, with packets being sent twice.
Problem found and reported by Beverly Schwartz and Greg Troxel.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Mar 6 18:29:23 2012 UTC (2 months, 2 weeks ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, HEAD
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

bnx_start() is not MP-safe, so do not create the bnx_alloc_pkts()'s
workqueue MPSAFE. This could lead to bnx_start() being running at
the same time on 2 CPUs, with packets being sent twice.
Problem found and reported by Beverly Schwartz and Greg Troxel.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Sep 22 08:42:53 2011 UTC (8 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

The bnx(4) handler runs at IPL_NET (works with spin mutexes), while
allocations can be deferred to a workqueue(9): set its highest IPL to
IPL_NET and not IPL_NONE, which is protected by an adaptive/sleeping mutex.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jul 15 11:29:31 2011 UTC (10 months, 1 week ago) by jym
Branch: MAIN
Changes since 1.43: +42 -22 lines
Diff to previous 1.43 (colored)

Use a workqueue(9) to defer allocation of TX packets. Loosely inspired
from the OpenBSD bnx(4) driver.

Tested by Roger Pau Monné, roger.pau at entel.upc.edu.

Fixes kern/45051.

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:08:12 2011 UTC (11 months, 2 weeks ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.41: +8 -5 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Sync with HEAD.

Revision 1.32.2.3 / (download) - annotate - [select for diffs], Tue May 31 03:04:39 2011 UTC (11 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.32.2.2: +2 -1 lines
Diff to previous 1.32.2.2 (colored) next main 1.33 (colored)

sync with head

Revision 1.43 / (download) - annotate - [select for diffs], Mon May 2 09:03:10 2011 UTC (12 months, 3 weeks ago) by jym
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.42: +4 -3 lines
Diff to previous 1.42 (colored)

Fix BCM5709 PHY detection for ethernet PHYs (the SerDes case being already
handled):
- export bge(4) and bnx(4) CHIP ID and PHY flags to brgphy(4). Move to
"unsigned int" rather than "int", and reuse the same softc members for
chipid and phyflags (behavior controlled by the sc_isbge/isbnx boolean).
- apply bug fix for revisions A and B, so that autonegotiation can
complete (from OpenBSD).

Bug reported by Rivo Nurges via private mail, patch tested and
confirmed working by him (with thanks!)

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:39 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.32.2.1: +108 -33 lines
Diff to previous 1.32.2.1 (colored)

sync with head

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:19:50 2011 UTC (15 months, 2 weeks ago) by bouyer
Branch: bouyer-quota2
Changes since 1.41: +6 -4 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Sync with HEAD

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 26 00:09:27 2011 UTC (15 months, 4 weeks ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.41: +6 -4 lines
Diff to previous 1.41 (colored)

Get out of the interrupt handler early if !IFF_RUNNING.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jan 6 03:37:55 2011 UTC (16 months, 2 weeks ago) by jym
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.40: +70 -2 lines
Diff to previous 1.40 (colored)

bnx(4) SERDES NICs will definitely work better with the PHY initialization
code... rather than without.

(forgot to commit it two weeks ago -- should be part of the BCM 5709S
patch)

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jan 6 02:02:43 2011 UTC (16 months, 2 weeks ago) by jym
Branch: MAIN
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored)

Reflect 5709S support in bnx(4) (comment fix)

Revision 1.39 / (download) - annotate - [select for diffs], Sat Dec 11 14:28:38 2010 UTC (17 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored)

Sanitize names a bit, still could use more namespace cleanup

Revision 1.38 / (download) - annotate - [select for diffs], Sat Dec 11 14:19:29 2010 UTC (17 months, 2 weeks ago) by pgoyette
Branch: MAIN
Changes since 1.37: +5 -5 lines
Diff to previous 1.37 (colored)

Fix a couple of name-space changes that fell through the cracks.

Hello, martin!

Revision 1.37 / (download) - annotate - [select for diffs], Thu Dec 9 23:14:06 2010 UTC (17 months, 2 weeks ago) by jym
Branch: MAIN
Changes since 1.36: +26 -26 lines
Diff to previous 1.36 (colored)

Remove htolexx calls, as bnx(4) NICs are capable of swapping endianess.

The macros for PAGE_SIZE were fixed with the previous patch (if_bnxreg.h
splitting, rev 1.11).

From OpenBSD. Their commit log reads:

bnx(4) is a bit special. The chip itself is capable of swapping endianess
so there is no need for htoleXX calls. The only thing needed is the correct
layout of the DMA-ed structures. Additionally it uses PAGE_SIZE but assumed
that it is always 4k. Fix the macros that failed to respect that so that it
works on 8k PAGE_SIZE systems. This makes bnx(4) work on sparc64.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Dec 9 22:34:37 2010 UTC (17 months, 2 weeks ago) by jym
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored)

Similar to bge(4), split if_bnxreg.h in two parts:
- if_bnxreg.h: general register values, flags... for bnx(4), that can
be included in other drivers
- if_bnxvar.h: PCI or device specific code (device state data, debug
macros etc.), which should remain private to bnx(4)

No comments, no objections on current-users@.

See discussion:
http://mail-index.netbsd.org/current-users/2010/12/01/msg014926.html

Revision 1.35 / (download) - annotate - [select for diffs], Sat Nov 27 17:48:58 2010 UTC (17 months, 4 weeks ago) by jym
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

Missing break in switch case. From OpenBSD.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Nov 26 21:59:49 2010 UTC (17 months, 4 weeks ago) by dholland
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Don't test flags with &&. From Henning Petersen in PR 44151.

Revision 1.18.10.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:45 2010 UTC (21 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.10.4: +8 -6 lines
Diff to previous 1.18.10.4 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

sync with head.

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

sync with head

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:33 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.31: +8 -6 lines
Diff to previous 1.31 (colored) next main 1.32 (colored)

Sync with HEAD.

Revision 1.20.10.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:41 2010 UTC (2 years, 1 month ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.20: +1368 -679 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

sync to netbsd-5

Revision 1.33 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:25 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.32: +4 -6 lines
Diff to previous 1.32 (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.18.10.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:44 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.10.3: +1242 -574 lines
Diff to previous 1.18.10.3 (colored) to branchpoint 1.18 (colored)

sync with head

Revision 1.32 / (download) - annotate - [select for diffs], Thu Mar 11 04:55:04 2010 UTC (2 years, 2 months ago) by msaitoh
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.31: +6 -2 lines
Diff to previous 1.31 (colored)

Add missing ifmedia_delete_instance() in bnx_detach().

Revision 1.20.4.2 / (download) - annotate - [select for diffs], Wed Jan 27 22:03:18 2010 UTC (2 years, 3 months ago) by sborrill
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, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.20.4.1: +1240 -558 lines
Diff to previous 1.20.4.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1268):
	sys/dev/mii/miidevs:	revision 1.90
	sys/dev/pci/pcidevs:	revision 1.1001
	sys/dev/mii/brgphy.c:	revision 1.51
	sys/dev/microcode/bnx/bnxfw.h:	revision 1.3
	sys/dev/pci/if_bnx.c:	revision 1.29
	sys/dev/pci/if_bnxreg.h:	revision 1.9
	sys/dev/pci/if_bnx.c:	revision 1.30

Add support for the Broadcom BCM5709 and BCM5716 chips. Upgrade
the B06 firmware and add the B09 firmware required by the BCM5709.
Replace TX dmamap array with a dynamically-grown list.
Support associated BCM5709CAX and BCM5709C PHYs.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:00 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
Changes since 1.30: +4 -8 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Fri Nov 20 18:24:29 2009 UTC (2 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.29: +6 -11 lines
Diff to previous 1.29 (colored)

Remove duplicate PCI_PRODUCT_BROADCOM_BCM5709 entries.
BNX_MAX_MRU is now the 1500-bytes MTU; use BNX_MAX_JUMBO_MRU instead.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 18 23:11:16 2009 UTC (2 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.28: +1241 -564 lines
Diff to previous 1.28 (colored)

Sync with OpenBSD: if_bnx.c,v 1.85. Major changes:
Add support for the Broadcom BCM5709 and BCM5716 chips. This upgrade
the B06 firmware, and add the B09 firmware required by the BCM5709.
Remplace TX dmamap array with a dynamically-grown list.

Tested with:
bnx0 at pci4 dev 0 function 0: Broadcom NetXtreme II BCM5708 1000Base-T
and
bnx0 at pci0 dev 0 function 0: Broadcom NetXtreme II BCM5709 1000Base-SX

Revision 1.18.10.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:37:50 2009 UTC (2 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.10.2: +5 -5 lines
Diff to previous 1.18.10.2 (colored) to branchpoint 1.18 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Sat Sep 5 14:09:55 2009 UTC (2 years, 8 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, jym-xensuspend-nbase
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

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

Revision 1.20.4.1 / (download) - annotate - [select for diffs], Mon May 18 19:37:44 2009 UTC (3 years ago) by bouyer
Branch: netbsd-5
Changes since 1.20: +142 -135 lines
Diff to previous 1.20 (colored)

Pull up following revision(s) (requested by kefren in ticket #760):
	sys/dev/pci/if_bnx.c: revision 1.21
Protect against spurious "bnx0: Double mbuf allocation failure!"
panics.
Extract a new function, bnx_add_buf(), from bnx_get_buf().
bnx_add_buf() just tries to add an mbuf to the Rx chain.  bnx_get_buf()
tries to allocate an mbuf, first, and then to add the mbuf to the
chain.  Use bnx_add_buf() to try to put an mbuf that we took off
of the chain back onto the chain, and use bnx_get_buf() everywhere
else.
This change seems to be in keeping with the author's intent, but
it looks like the code broke at some point.
Thanks to Jarle Greipsland, David Dudley, and others for reporting
this bug and for testing patches.

Revision 1.18.10.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:34 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18.10.1: +7 -2 lines
Diff to previous 1.18.10.1 (colored) to branchpoint 1.18 (colored)

sync with head

Revision 1.21.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.21: +34 -23 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

Sync with HEAD.

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

Revision 1.27 / (download) - annotate - [select for diffs], Tue May 5 10:21:22 2009 UTC (3 years ago) by cegger
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.26: +7 -2 lines
Diff to previous 1.26 (colored)

Attach on BCM5709 chip.
XXX Firmware fails to complete initialization on this chip.

Revision 1.18.10.1 / (download) - annotate - [select for diffs], Mon May 4 08:12:56 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.18: +218 -201 lines
Diff to previous 1.18 (colored)

sync with head.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:56 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.20.2.1: +29 -23 lines
Diff to previous 1.20.2.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

Sync with HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Apr 17 23:23:23 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.25: +2 -7 lines
Diff to previous 1.25 (colored)

Bug fix: don't release the Rx DMA maps twice.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Apr 7 18:07:10 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored)

Destroy sc->bnx_timeout in bnx_detach().

Revision 1.24 / (download) - annotate - [select for diffs], Fri Apr 3 00:14:42 2009 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.23: +22 -12 lines
Diff to previous 1.23 (colored)

Fix SIOCSIFFLAGS.  Mark as safe to detach at shutdown.

Revision 1.23 / (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.22: +7 -7 lines
Diff to previous 1.22 (colored)

bzero -> memset

Revision 1.22 / (download) - annotate - [select for diffs], Wed Mar 18 15:14:30 2009 UTC (3 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

bcmp -> memcmp

Revision 1.20.2.1 / (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.20: +142 -135 lines
Diff to previous 1.20 (colored)

Sync with HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 27 21:15:38 2009 UTC (3 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.20: +142 -135 lines
Diff to previous 1.20 (colored)

Protect against spurious "bnx0: Double mbuf allocation failure!"
panics.

Extract a new function, bnx_add_buf(), from bnx_get_buf().
bnx_add_buf() just tries to add an mbuf to the Rx chain.  bnx_get_buf()
tries to allocate an mbuf, first, and then to add the mbuf to the
chain.  Use bnx_add_buf() to try to put an mbuf that we took off
of the chain back onto the chain, and use bnx_get_buf() everywhere
else.

This change seems to be in keeping with the author's intent, but
it looks like the code broke at some point.

Thanks to Jarle Greipsland, David Dudley, and others for reporting
this bug and for testing patches.

Revision 1.18.16.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:38 2008 UTC (3 years, 7 months ago) by haad
Branch: haad-dm
Changes since 1.18: +53 -49 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with HEAD.

Revision 1.18.6.1 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:26 2008 UTC (3 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.18: +53 -49 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with HEAD.

Revision 1.18.12.1 / (download) - annotate - [select for diffs], Wed Sep 24 16:38:53 2008 UTC (3 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.18: +53 -49 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Sep 9 20:12:18 2008 UTC (3 years, 8 months ago) by mhitch
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, netbsd-5-base, 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, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, 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, matt-nb5-mips64
Changes since 1.19: +51 -48 lines
Diff to previous 1.19 (colored)

Add support for SerDes controllers;  from the OpenBSD driver.  Tested on a
Dell Blade server by me, and an HP Blade server by Havard.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 9 17:34:10 2008 UTC (3 years, 8 months ago) by mhitch
Branch: MAIN
Changes since 1.18: +4 -3 lines
Diff to previous 1.18 (colored)

In bnx_release_resources(), don't de-reference a NULL pointer if the
rx_mbuf_map has not been allocated yet.  From Havard Eidnes.

Revision 1.1.4.4.2.3 / (download) - annotate - [select for diffs], Tue Jun 3 20:47:24 2008 UTC (3 years, 11 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.1.4.4.2.2: +8 -7 lines
Diff to previous 1.1.4.4.2.2 (colored) next main 1.1.4.5 (colored)

Sync with netbsd-4.

Revision 1.8.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:46 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.8.2.2: +11 -9 lines
Diff to previous 1.8.2.2 (colored) next main 1.9 (colored)

sync with HEAD

Revision 1.9.6.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:56 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9.6.3: +191 -277 lines
Diff to previous 1.9.6.3 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Sync with HEAD.

Revision 1.1.8.8 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:38 2008 UTC (4 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.7: +11 -9 lines
Diff to previous 1.1.8.7 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 7 01:21:55 2008 UTC (4 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-nfs-mp, wrstuden-revivesa, mjf-devfs2, haad-dm
Changes since 1.17: +10 -8 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Wed Feb 6 16:50:38 2008 UTC (4 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Don't use misaligned PCI config access. Reported by Christoph Egger.

Revision 1.1.4.7 / (download) - annotate - [select for diffs], Fri Feb 1 14:39:57 2008 UTC (4 years, 3 months ago) by riz
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.1.4.6: +6 -5 lines
Diff to previous 1.1.4.6 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Pull up following revision(s) (requested by dyoung in ticket #1011):
	sys/dev/pci/if_bnx.c: revision 1.11
Reprogram multicast filter after SIOCADDMULTI / SIOCDELMULTI.
Fixes IPv6 stateless address configuration problems reported on
tech-net@.  Patch tested and found to work by Martti Kuparinen.

Revision 1.1.8.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:43:53 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.6: +240 -328 lines
Diff to previous 1.1.8.6 (colored) to branchpoint 1.1 (colored)

sync with head

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:53:44 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.8.2.1: +247 -334 lines
Diff to previous 1.8.2.1 (colored)

sync with HEAD

Revision 1.1.4.4.2.2 / (download) - annotate - [select for diffs], Sun Jan 6 05:01:05 2008 UTC (4 years, 4 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.1.4.4.2.1: +3 -3 lines
Diff to previous 1.1.4.4.2.1 (colored)

Catch up to netbsd-4.0 release.

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:54:41 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.11: +240 -328 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync with HEAD

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 31 22:52:14 2007 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.15: +9 -83 lines
Diff to previous 1.15 (colored)

Don't buffer packets while the link is down, but drop them on the
floor like most other ethernet drivers do.

bnx(4) has "vanilla" MII media-handling, so use ether_mediachange
and ether_mediastatus.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Dec 30 00:56:45 2007 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.14: +13 -13 lines
Diff to previous 1.14 (colored)

For consistency with other softc members, s/ethercom/bnx_ec/.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 29 19:51:38 2007 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.13: +45 -57 lines
Diff to previous 1.13 (colored)

Get rid of bnx_suspend_resume(), it did redundant resets.

Merge bnx_if_stop() and bnx_stop().  Handle bnx_stop(, 1) by doing
a reset.

Protect the bnx_stop() call in bnx_detach() with splnet().

Thanks to joerg@ for suggesting the above.

In bnx_stop(), deactivate the PHYs with mii_down().  Return right
away if !IFF_RUNNING.

Use LIST_EMPTY().

In bnx_ifmedia_upd(), propagate all mii_mediachg() return codes to
the caller except for ENXIO, which just means that the PHY is
suspended.  In bnx_init(), propagate bnx_ifmedia_upd() return codes
to the caller.

In bnx_intr(), replace a common subexpression with a variable,
'sblk'.

In bnx_tick(), let the MII bus keep ticking after the link is up:
check link status and exit after calling mii_tick(), not before.

Revision 1.9.6.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:16 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9.6.2: +61 -61 lines
Diff to previous 1.9.6.2 (colored) to branchpoint 1.9 (colored)

Sync with HEAD.

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:27 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.10.2.1: +211 -213 lines
Diff to previous 1.10.2.1 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 26 04:06:29 2007 UTC (4 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.12: +152 -154 lines
Diff to previous 1.12 (colored)

Add device suspend/resume/detach.  (Tested with drvctl -S bnx0,
drvctl -Q bnx0, drvctl -d bnx0.)

Separate device_t storage from softc storage and use CFATTACH_DECL_NEW().

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 15 00:39:29 2007 UTC (4 years, 5 months ago) by perry
Branch: MAIN
Changes since 1.11: +61 -61 lines
Diff to previous 1.11 (colored)

__FUNCTION__ -> __func__

Revision 1.7.6.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:37:53 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.7.6.3: +8 -7 lines
Diff to previous 1.7.6.3 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Sync with HEAD.

Revision 1.9.6.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:19:43 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9.6.1: +8 -7 lines
Diff to previous 1.9.6.1 (colored) to branchpoint 1.9 (colored)

Sync with HEAD.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:26 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.10: +8 -7 lines
Diff to previous 1.10 (colored)

Sync with head.

Revision 1.1.8.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:30:24 2007 UTC (4 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.5: +8 -7 lines
Diff to previous 1.1.8.5 (colored) to branchpoint 1.1 (colored)

sync with head

Revision 1.11 / (download) - annotate - [select for diffs], Tue Dec 4 09:22:05 2007 UTC (4 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.10: +8 -7 lines
Diff to previous 1.10 (colored)

Reprogram multicast filter after SIOCADDMULTI / SIOCDELMULTI.
Fixes IPv6 stateless address configuration problems reported on
tech-net@.  Patch tested and found to work by Martti Kuparinen.

Revision 1.1.4.5.2.1 / (download) - annotate - [select for diffs], Sun Nov 25 08:53:33 2007 UTC (4 years, 6 months ago) by xtraeme
Branch: matt-nb4-arm
Changes since 1.1.4.5: +3 -3 lines
Diff to previous 1.1.4.5 (colored) next main 1.1.4.6 (colored)

Pull up following revision(s) (requested by martti in ticket #986):
	sys/dev/pci/if_bnx.c: revision 1.10
Added missing newline.

Revision 1.1.4.6 / (download) - annotate - [select for diffs], Sun Nov 25 08:53:32 2007 UTC (4 years, 6 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.1.4.5: +1 -1 lines
Diff to previous 1.1.4.5 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by martti in ticket #986):
	sys/dev/pci/if_bnx.c: revision 1.10
Added missing newline.

Revision 1.1.6.6 / (download) - annotate - [select for diffs], Mon Nov 19 21:35:40 2007 UTC (4 years, 6 months ago) by bouyer
Branch: netbsd-3
Changes since 1.1.6.5: +3 -3 lines
Diff to previous 1.1.6.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Pull up following revision(s) (requested by martti in ticket #1876):
	sys/dev/pci/if_bnx.c: revision 1.10
Added missing newline.

Revision 1.9.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:09 2007 UTC (4 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Sync with HEAD.

Revision 1.1.8.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:20 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.4: +3 -3 lines
Diff to previous 1.1.8.4 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:01:17 2007 UTC (4 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD

Revision 1.7.6.3 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:39 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.7.6.2: +3 -3 lines
Diff to previous 1.7.6.2 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Nov 9 08:26:47 2007 UTC (4 years, 6 months ago) by martti
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Added missing newline.

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:28:55 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

sync with HEAD

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Tue Oct 9 13:41:43 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.3.2.3: +3 -3 lines
Diff to previous 1.3.2.3 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with head.

Revision 1.1.6.5 / (download) - annotate - [select for diffs], Mon Sep 17 20:34:57 2007 UTC (4 years, 8 months ago) by msaitoh
Branch: netbsd-3
Changes since 1.1.6.4: +3 -3 lines
Diff to previous 1.1.6.4 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1827):
	sys/dev/pci/if_bnx.c: revision 1.8
Pass the right value to VLAN_INPUT_TAG(), this makes vlan(4) on bnx(4) work.

Revision 1.7.6.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:15 2007 UTC (4 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.7.6.1: +3 -3 lines
Diff to previous 1.7.6.1 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.1.8.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:36:53 2007 UTC (4 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.3: +310 -348 lines
Diff to previous 1.1.8.3 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:20:59 2007 UTC (4 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.7.2.1: +3 -3 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Sync with HEAD.

Revision 1.1.4.4.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:04:30 2007 UTC (4 years, 8 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.1.4.4: +3 -3 lines
Diff to previous 1.1.4.4 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.9 / (download) - annotate - [select for diffs], Wed Aug 29 22:33:42 2007 UTC (4 years, 8 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, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Constify: LLADDR() -> CLLADDR().

Revision 1.1.4.5 / (download) - annotate - [select for diffs], Fri Aug 24 17:05:00 2007 UTC (4 years, 9 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, matt-nb4-arm-base
Branch point for: matt-nb4-arm
Changes since 1.1.4.4: +2 -2 lines
Diff to previous 1.1.4.4 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #826):
	sys/dev/pci/if_bnx.c: revision 1.8
Pass the right value to VLAN_INPUT_TAG(), this makes vlan(4) on bnx(4) work.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 18:37:13 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.3.2.2: +3 -3 lines
Diff to previous 1.3.2.2 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.7.6.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:10 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Sync with HEAD.

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:31 2007 UTC (4 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Sync with HEAD.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Aug 9 18:10:20 2007 UTC (4 years, 9 months ago) by bouyer
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Pass the right value to VLAN_INPUT_TAG(), this makes vlan(4) on bnx(4) work.

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:07:33 2007 UTC (4 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.3: +295 -333 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 9 21:00:53 2007 UTC (4 years, 10 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, jmcneill-pm
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (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.3.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:48:08 2007 UTC (4 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.3.2.1: +3 -3 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored)

Adapt to callout API change.

Revision 1.1.6.4 / (download) - annotate - [select for diffs], Wed Apr 25 09:09:36 2007 UTC (5 years, 1 month ago) by ghen
Branch: netbsd-3
Changes since 1.1.6.3: +294 -332 lines
Diff to previous 1.1.6.3 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1762):
	sys/dev/pci/if_bnx.c: revision 1.4
	sys/dev/pci/if_bnx.c: revision 1.5
	sys/dev/pci/if_bnx.c: revision 1.6
	sys/dev/pci/if_bnxreg.h: revision 1.2
Protect bnx_tick() with splnet.
Bring in fixes and improvements from OpenBSD:
revision 1.25
- Simplify the arguments to bnx_tx_encap.
- Don't copy the bd_chain head pointers into temporary objects, they are
available globally.
From scottl@FreeBSD
revision 1.26
Overhaul the transmit path:
- Eliminate the bnx_dmamap_arg structure.
- Refactor the loop that fills the buffer descriptor so that it can be done
with a single set of logic in a single loop instead of two sets of logic.
- Eliminate the need to cache and pass descriptor indexes between the start
loop and the encap function.
- Change the start loop to always check the ifnet sendq for more work.
From scottl@FreeBSD
revision 1.27
make the exit label naming scheme match the current function names, removes
a FreeBSD-ism from the original driver.
revision 1.28 -> 1.30
- Ensure that at least 16 TX descriptors are kept unused in the ring.
- Use more complete error handling for TX load problems.
From scottl@FreeBSD
revision 1.31
replace a few more instances of hand rolled code with the LIST_FOREACH macro.
revision 1.33
In bnx_start, check the used_tx_bd count rather than the descriptors
mbuf pointer to see if the transmit ring is full.  The mbuf pointer
is set only in the last descriptor of a multi-descriptor packet.
By relying on the mbuf pointers of the earlier descriptors, the
driver would sometimes overwrite a descriptor belonging to a
packet that wasn't completed yet.  Also, tx_chain_prod wasn't
updated inside the loop, causing the wrong descriptor to be checked
after the first iteration.  The upshot of all this was the loss of
some transmitted packets at medium to high packet rates.
In bnx_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.
Correct a couple of inaccurate comments.
From jdp@FreeBSD
revision 1.43
Allow the bnx(4) driver to make use of all of the available hardware
multicast hash slots. The bnx(4) hardware supports 8 slots instead of
4 like the bge(4) hardware.
From Mike Karels via FreeBSD
Tested by Brad, biorn@ and Johan M:son Lindman
RX buffers are malloced memory of 9216 bytes. This can require from 1 to
4 DMA memory segments, depending on how the buffer is in memory.
When receiving a packet, we allocate a new one to remplace the one we've
used. It can need more segments than the one it remplace, leading to
corrution of the RX descriptors, and a panic in bus_dmamap_sync() (DIAGNOSTIC
kernels) or possibly memory corruption.
Fix:
- bnx_get_buf() allocates as many buffer as possible, checking the number
  of free RX descriptors. Because one receive buffer is not guaranteed to
  be remplaced on receive, call bnx_get_buf() from bnx_tick() too.
  This also improve error handling from bnx_get_buf().
- use MCLGET() instead of MEXTMALLOC() if we're running with the standard
  ethernet MTU. This gives us more receive buffers and waste less memory.
Fix build on 32bit ports; should fix GENERIC_DIAGNOSTIC build problem reported
by Hisashi T Fujinaka on current-users.

Revision 1.1.4.4 / (download) - annotate - [select for diffs], Fri Apr 20 21:55:59 2007 UTC (5 years, 1 month ago) by pavel
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.1.4.3: +294 -332 lines
Diff to previous 1.1.4.3 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #566):
	sys/dev/pci/if_bnx.c: revision 1.4
	sys/dev/pci/if_bnx.c: revision 1.5
	sys/dev/pci/if_bnx.c: revision 1.6
	sys/dev/pci/if_bnxreg.h: revision 1.2
Protect bnx_tick() with splnet.
Bring in fixes and improvements from OpenBSD:
revision 1.25
- Simplify the arguments to bnx_tx_encap.
- Don't copy the bd_chain head pointers into temporary objects, they are
available globally.
From scottl@FreeBSD
revision 1.26
Overhaul the transmit path:
- Eliminate the bnx_dmamap_arg structure.
- Refactor the loop that fills the buffer descriptor so that it can be done
with a single set of logic in a single loop instead of two sets of logic.
- Eliminate the need to cache and pass descriptor indexes between the start
loop and the encap function.
- Change the start loop to always check the ifnet sendq for more work.
From scottl@FreeBSD
revision 1.27
make the exit label naming scheme match the current function names, removes
a FreeBSD-ism from the original driver.
revision 1.28 -> 1.30
- Ensure that at least 16 TX descriptors are kept unused in the ring.
- Use more complete error handling for TX load problems.
From scottl@FreeBSD
revision 1.31
replace a few more instances of hand rolled code with the LIST_FOREACH macro.
revision 1.33
In bnx_start, check the used_tx_bd count rather than the descriptors
mbuf pointer to see if the transmit ring is full.  The mbuf pointer
is set only in the last descriptor of a multi-descriptor packet.
By relying on the mbuf pointers of the earlier descriptors, the
driver would sometimes overwrite a descriptor belonging to a
packet that wasn't completed yet.  Also, tx_chain_prod wasn't
updated inside the loop, causing the wrong descriptor to be checked
after the first iteration.  The upshot of all this was the loss of
some transmitted packets at medium to high packet rates.
In bnx_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.
Correct a couple of inaccurate comments.
From jdp@FreeBSD
revision 1.43
Allow the bnx(4) driver to make use of all of the available hardware
multicast hash slots. The bnx(4) hardware supports 8 slots instead of
4 like the bge(4) hardware.
From Mike Karels via FreeBSD
Tested by Brad, biorn@ and Johan M:son Lindman

RX buffers are malloced memory of 9216 bytes. This can require from 1 to
4 DMA memory segments, depending on how the buffer is in memory.
When receiving a packet, we allocate a new one to remplace the one we've
used. It can need more segments than the one it remplace, leading to
corrution of the RX descriptors, and a panic in bus_dmamap_sync() (DIAGNOSTIC
kernels) or possibly memory corruption.
Fix:
- bnx_get_buf() allocates as many buffer as possible, checking the number
  of free RX descriptors. Because one receive buffer is not guaranteed to
  be remplaced on receive, call bnx_get_buf() from bnx_tick() too.
  This also improve error handling from bnx_get_buf().
- use MCLGET() instead of MEXTMALLOC() if we're running with the standard
  ethernet MTU. This gives us more receive buffers and waste less memory.

Fix build on 32bit ports; should fix GENERIC_DIAGNOSTIC build problem reported
by Hisashi T Fujinaka on current-users.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:25 2007 UTC (5 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.2.2.1: +294 -332 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

sync with head.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Tue Apr 10 13:24:25 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.3: +294 -332 lines
Diff to previous 1.3 (colored)

Sync with head.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 10 12:18:26 2007 UTC (5 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.5: +6 -5 lines
Diff to previous 1.5 (colored)

Fix build on 32bit ports; should fix GENERIC_DIAGNOSTIC build problem reported
by Hisashi T Fujinaka on current-users.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Apr 9 19:34:50 2007 UTC (5 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.4: +160 -124 lines
Diff to previous 1.4 (colored)

RX buffers are malloced memory of 9216 bytes. This can require from 1 to
4 DMA memory segments, depending on how the buffer is in memory.
When receiving a packet, we allocate a new one to remplace the one we've
used. It can need more segments than the one it remplace, leading to
corrution of the RX descriptors, and a panic in bus_dmamap_sync() (DIAGNOSTIC
kernels) or possibly memory corruption.

Fix:
- bnx_get_buf() allocates as many buffer as possible, checking the number
  of free RX descriptors. Because one receive buffer is not guaranteed to
  be remplaced on receive, call bnx_get_buf() from bnx_tick() too.
  This also improve error handling from bnx_get_buf().
- use MCLGET() instead of MEXTMALLOC() if we're running with the standard
  ethernet MTU. This gives us more receive buffers and waste less memory.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Apr 9 14:23:03 2007 UTC (5 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.3: +135 -210 lines
Diff to previous 1.3 (colored)

Protect bnx_tick() with splnet.

Bring in fixes and improvements from OpenBSD:
revision 1.25
- Simplify the arguments to bnx_tx_encap.
- Don't copy the bd_chain head pointers into temporary objects, they are
available globally.

From scottl@FreeBSD

revision 1.26
Overhaul the transmit path:
- Eliminate the bnx_dmamap_arg structure.
- Refactor the loop that fills the buffer descriptor so that it can be done
with a single set of logic in a single loop instead of two sets of logic.
- Eliminate the need to cache and pass descriptor indexes between the start
loop and the encap function.
- Change the start loop to always check the ifnet sendq for more work.

From scottl@FreeBSD

revision 1.27
make the exit label naming scheme match the current function names, removes
a FreeBSD-ism from the original driver.

revision 1.28 -> 1.30
- Ensure that at least 16 TX descriptors are kept unused in the ring.
- Use more complete error handling for TX load problems.

From scottl@FreeBSD

revision 1.31
replace a few more instances of hand rolled code with the LIST_FOREACH macro.

revision 1.33
In bnx_start, check the used_tx_bd count rather than the descriptors
mbuf pointer to see if the transmit ring is full.  The mbuf pointer
is set only in the last descriptor of a multi-descriptor packet.
By relying on the mbuf pointers of the earlier descriptors, the
driver would sometimes overwrite a descriptor belonging to a
packet that wasn't completed yet.  Also, tx_chain_prod wasn't
updated inside the loop, causing the wrong descriptor to be checked
after the first iteration.  The upshot of all this was the loss of
some transmitted packets at medium to high packet rates.

In bnx_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.

Correct a couple of inaccurate comments.

From jdp@FreeBSD

revision 1.43
Allow the bnx(4) driver to make use of all of the available hardware
multicast hash slots. The bnx(4) hardware supports 8 slots instead of
4 like the bge(4) hardware.

From Mike Karels via FreeBSD

Tested by Brad, biorn@ and Johan M:son Lindman

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:55:17 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.2: +15 -15 lines
Diff to previous 1.2 (colored)

Sync with HEAD.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:19 2007 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.2: +15 -15 lines
Diff to previous 1.2 (colored)

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

Revision 1.1.8.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:10:25 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.2: +11 -25 lines
Diff to previous 1.1.8.2 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.1.6.3 / (download) - annotate - [select for diffs], Mon Feb 19 22:22:53 2007 UTC (5 years, 3 months ago) by tron
Branch: netbsd-3
Changes since 1.1.6.2: +11 -25 lines
Diff to previous 1.1.6.2 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1667):
	sys/dev/pci/if_bnx.c: revision 1.2
Fix 2 panics with DIAGNOSTIC kernels:
- remove the code to bring down the PHY in bnx_stop(), it's wrong
  (ifm_data isn't updated) and lead to a panic in mii_phy_setmedia(),
  or reading past the end mii_media_table[].
- make sure the dma_map matches the mbuf in the rx structures. We would
  sync/unload the wrong map, leading to a DIAGNOSTIC panic, or eventually
  leaking memory when bounce buffers are needed.

Revision 1.1.4.3 / (download) - annotate - [select for diffs], Sat Feb 17 23:59:51 2007 UTC (5 years, 3 months ago) by tron
Branch: netbsd-4
Changes since 1.1.4.2: +11 -25 lines
Diff to previous 1.1.4.2 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #451):
	sys/dev/pci/if_bnx.c: revision 1.2
Fix 2 panics with DIAGNOSTIC kernels:
- remove the code to bring down the PHY in bnx_stop(), it's wrong
  (ifm_data isn't updated) and lead to a panic in mii_phy_setmedia(),
  or reading past the end mii_media_table[].
- make sure the dma_map matches the mbuf in the rx structures. We would
  sync/unload the wrong map, leading to a DIAGNOSTIC panic, or eventually
  leaking memory when bounce buffers are needed.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 15 19:24:47 2007 UTC (5 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.1: +11 -25 lines
Diff to previous 1.1 (colored)

Fix 2 panics with DIAGNOSTIC kernels:
- remove the code to bring down the PHY in bnx_stop(), it's wrong
  (ifm_data isn't updated) and lead to a panic in mii_phy_setmedia(),
  or reading past the end mii_media_table[].
- make sure the dma_map matches the mbuf in the rx structures. We would
  sync/unload the wrong map, leading to a DIAGNOSTIC panic, or eventually
  leaking memory when bounce buffers are needed.

Revision 1.1.10.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:41 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.10.1: +5735 -0 lines
Diff to previous 1.1.10.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with head.

Revision 1.1.8.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:48:44 2006 UTC (5 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.8.1: +5735 -0 lines
Diff to previous 1.1.8.1 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.1.6.2 / (download) - annotate - [select for diffs], Sat Dec 23 14:43:47 2006 UTC (5 years, 5 months ago) by ghen
Branch: netbsd-3
Changes since 1.1.6.1: +5735 -0 lines
Diff to previous 1.1.6.1 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1608):
	sys/arch/i386/conf/INSTALL: revision 1.299 via patch
	sys/arch/i386/conf/XEN2_DOM0: revision 1.20 via patch
	sys/arch/i386/conf/GENERIC: revision 1.803 via patch
	sys/dev/pci/files.pci: revision 1.275 via patch
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.218 via patch
	sys/arch/amd64/conf/GENERIC: revision 1.123 via patch
	sys/dev/pci/if_bnx.c: revision 1.1 via patch
	share/man/man4/bnx.4: revision 1.1-1.2 via patch
	distrib/sets/lists/man/mi: revision 1.959 via patch
	sys/arch/amd64/conf/INSTALL: revision 1.62 via patch
	sys/dev/microcode/bnx/bnxfw.h: revision 1.1-1.2 via patch
	sys/dev/pci/if_bnxreg.h: revision 1.1 via patch
	share/man/man4/Makefile: revision 1.417 via patch
	sys/arch/i386/conf/INSTALL_LAPTOP: revision 1.112 via patch
Add bnx(4), a driver for Broadcom NetXtreme II 10/100/1000 Ethernet device.
Ported from OpenBSD by cube@, with some bus_dma fixes by me.
Tested on i386 and amd64.
Add a NetBSD RCS tag.
Nx -> Ox; remove trailing whitespace.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Thu Dec 21 13:44:01 2006 UTC (5 years, 5 months ago) by tron
Branch: netbsd-4
Changes since 1.1.4.1: +5735 -0 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #287):
	sys/arch/i386/conf/INSTALL: revision 1.299
	sys/arch/i386/conf/XEN2_DOM0: revision 1.20
	sys/arch/i386/conf/GENERIC: revision 1.803
	sys/dev/pci/files.pci: revision 1.275
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.218
	sys/arch/amd64/conf/GENERIC: revision 1.123
	sys/dev/pci/if_bnx.c: revision 1.1
	share/man/man4/bnx.4: revision 1.1
	distrib/sets/lists/man/mi: revision 1.959
	sys/arch/amd64/conf/INSTALL: revision 1.62
	sys/dev/microcode/bnx/bnxfw.h: revision 1.1
	sys/arch/i386/conf/ALL: revision 1.76
	sys/dev/pci/if_bnxreg.h: revision 1.1
	share/man/man4/Makefile: revision 1.417
	sys/arch/i386/conf/INSTALL_LAPTOP: revision 1.112
Add bnx(4), a driver for Broadcom NetXtreme II 10/100/1000 Ethernet device.
Ported from OpenBSD by cube@, with some bus_dma fixes by me.
Tested on i386 and amd64.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:13 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.1.2.1: +5735 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.1.10.1, Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.1: +0 -5735 lines
FILE REMOVED

file if_bnx.c was added on branch newlock2 on 2007-01-12 00:57:41 +0000

Revision 1.1.8.1, Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1: +0 -5735 lines
FILE REMOVED

file if_bnx.c was added on branch yamt-lazymbuf on 2006-12-30 20:48:44 +0000

Revision 1.1.6.1, Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by ghen
Branch: netbsd-3
Changes since 1.1: +0 -5735 lines
FILE REMOVED

file if_bnx.c was added on branch netbsd-3 on 2006-12-23 14:43:47 +0000

Revision 1.1.4.1, Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by tron
Branch: netbsd-4
Changes since 1.1: +0 -5735 lines
FILE REMOVED

file if_bnx.c was added on branch netbsd-4 on 2006-12-21 13:44:01 +0000

Revision 1.1.2.1, Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.1: +0 -5735 lines
FILE REMOVED

file if_bnx.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:13 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sun Dec 17 23:02:06 2006 UTC (5 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-splraiseipl, yamt-lazymbuf, newlock2, netbsd-4, netbsd-3

Add bnx(4), a driver for Broadcom NetXtreme II 10/100/1000 Ethernet device.
Ported from OpenBSD by cube@, with some bus_dma fixes by me.
Tested on i386 and amd64.

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>