The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


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

sync with head

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

merge to -current.

Revision 1.200 / (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.199: +4 -13 lines
Diff to previous 1.199 (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.199 / (download) - annotate - [select for diffs], Wed Nov 2 16:26:30 2011 UTC (6 months, 3 weeks ago) by yamt
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.198: +3 -2 lines
Diff to previous 1.198 (colored)

allow disabling interrupt mitigation

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:04 2011 UTC (11 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.196: +10 -4 lines
Diff to previous 1.196 (colored) next main 1.197 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.180.4.6 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:16 2011 UTC (11 months, 2 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.180.4.5: +8 -2 lines
Diff to previous 1.180.4.5 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

sync with head

Revision 1.198 / (download) - annotate - [select for diffs], Thu Jun 9 12:04:29 2011 UTC (11 months, 2 weeks ago) by cegger
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.197: +5 -4 lines
Diff to previous 1.197 (colored)

the BCM5785 is a PCIe chip but does not report PCIe capabilities.
Check for this chip explicitely and enable PCIe.
Fixes 'firmware handshake timeout'. Tested with root on nfs.

patch from msaitoh@

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

Sync with HEAD.

Revision 1.197 / (download) - annotate - [select for diffs], Fri Jun 3 09:51:40 2011 UTC (11 months, 3 weeks ago) by cegger
Branch: MAIN
Changes since 1.196: +7 -2 lines
Diff to previous 1.196 (colored)

fix crash by NULL pointer dereferencing I get everytime
right after this message:

bge0: discarding oversize frame (len=-4)

Revision 1.180.4.5 / (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.180.4.4: +14 -1 lines
Diff to previous 1.180.4.4 (colored) to branchpoint 1.180 (colored)

sync with head

Revision 1.196 / (download) - annotate - [select for diffs], Sun May 22 08:15:20 2011 UTC (12 months ago) by mrg
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.195: +14 -2 lines
Diff to previous 1.195 (colored)

match some fujitsu bge interfaces seen on PRIMEPOWER 250/450 systems.
from Michael Moll <kvedulv@kvedulv.de>, taken from openbsd.

Revision 1.195 / (download) - annotate - [select for diffs], Mon May 2 09:03:10 2011 UTC (12 months, 3 weeks ago) by jym
Branch: MAIN
Changes since 1.194: +4 -3 lines
Diff to previous 1.194 (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.152.4.6 / (download) - annotate - [select for diffs], Sun Apr 24 16:27:24 2011 UTC (13 months ago) by riz
Branch: netbsd-5
Changes since 1.152.4.5: +4 -4 lines
Diff to previous 1.152.4.5 (colored) to branchpoint 1.152 (colored) next main 1.153 (colored)

Pull up following revision(s) (requested by buhrow in ticket #1601):
	sys/dev/pci/if_bge.c: revision 1.194
Fixes for kern/40018.
        Our driver initializes the Broadcom hardware to peform a tcp and udp
checksum on only the payload of the tcp or udp packet, rather than the
entire packet.  The FreeBSD, OpenBSD  and Linux drivers instruct the hardware
to compute
the checksum for the entire packet.  I believe the bug is that some revisions
of the BCM hardware, under certain circumstances, revert to doing the
complete checksum calculation, as the FreeBSD, OpenBSD  and Linux drivers
request, while things are running. As
a result, when we pull the computed checksum from the hardware and pass it
up to the upper layers, we assume the checksum is the more minimal
one, and the upper layers perform the appropriate checks, which, when this
happens, cause the packet to be rejected because the resultant checksum is
decidedly incorrect.
        This patch changes the driver to instruct the hardware to perform the
checksum over the entire packet, just as the FreeBSD, OpenBSD  and
Linux drivers do, and to notify the upper layers appropriately.
This patch appears to work on all revisions of the hardware that have been
tested.  (See the list in the bug report.)
this patch is approved by tls.

Revision 1.180.4.4 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:50 2011 UTC (13 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.180.4.3: +2 -2 lines
Diff to previous 1.180.4.3 (colored) to branchpoint 1.180 (colored)

sync with head

Revision 1.194 / (download) - annotate - [select for diffs], Mon Apr 18 22:05:39 2011 UTC (13 months, 1 week ago) by buhrow
Branch: MAIN
Changes since 1.193: +4 -4 lines
Diff to previous 1.193 (colored)

Fixes for kern/40018.

	Our driver initializes the Broadcom hardware to peform a tcp and udp
checksum on only the payload of the tcp or udp packet, rather than the
entire packet.  The FreeBSD, OpenBSD  and Linux drivers instruct the hardware to compute
the checksum for the entire packet.  I believe the bug is that some revisions
of the BCM hardware, under certain circumstances, revert to doing the
complete checksum calculation, as the FreeBSD, OpenBSD  and Linux drivers
request, while things are running. As
a result, when we pull the computed checksum from the hardware and pass it
up to the upper layers, we assume the checksum is the more minimal
one, and the upper layers perform the appropriate checks, which, when this
happens, cause the packet to be rejected because the resultant checksum is
decidedly incorrect.
	This patch changes the driver to instruct the hardware to perform the
checksum over the entire packet, just as the FreeBSD, OpenBSD  and
Linux drivers do, and to notify the upper layers appropriately.

This patch appears to work on all revisions of the hardware that have been
tested.  (See the list in the bug report.)

this patch is approved by tls.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Apr 8 17:45:10 2011 UTC (13 months, 2 weeks ago) by sborrill
Branch: MAIN
Changes since 1.192: +2 -18 lines
Diff to previous 1.192 (colored)

Revert previous couple of commits. bge_setvlan() is only called by
bge_init() and so does not get called when a vlan child is added. Calling
bge_setvlan() from bge_ifflags_cb() doesn't work either as it appears that
the callback is called before ec_capenable is updated by if_vlan.c.

Revision 1.192 / (download) - annotate - [select for diffs], Fri Apr 8 15:49:37 2011 UTC (13 months, 2 weeks ago) by sborrill
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored)

Fix typo in previous commit that would have stopped relevant bit being set.

Revision 1.191 / (download) - annotate - [select for diffs], Fri Apr 8 13:56:51 2011 UTC (13 months, 2 weeks ago) by sborrill
Branch: MAIN
Changes since 1.190: +18 -2 lines
Diff to previous 1.190 (colored)

PR kern/38871

Fix LAN on bge(4), alc(4). Flag VLAN capability in ec_capenable as used by network
card drivers.

Revision 1.180.4.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:38 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.180.4.2: +41 -46 lines
Diff to previous 1.180.4.2 (colored) to branchpoint 1.180 (colored)

sync with head

Revision 1.190 / (download) - annotate - [select for diffs], Sun Jan 9 13:01:03 2011 UTC (16 months, 2 weeks ago) by jruoho
Branch: MAIN
CVS Tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.189: +13 -10 lines
Diff to previous 1.189 (colored)

Don't use SYSCTL_SETUP in a driver.

Revision 1.189 / (download) - annotate - [select for diffs], Wed Jan 5 14:55:10 2011 UTC (16 months, 2 weeks ago) by sketch
Branch: MAIN
Changes since 1.188: +4 -3 lines
Diff to previous 1.188 (colored)

Use aprint_verbose_dev.

Revision 1.152.4.5 / (download) - annotate - [select for diffs], Fri Nov 19 23:58:40 2010 UTC (18 months ago) by riz
Branch: netbsd-5
CVS Tags: matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.152.4.4: +1157 -652 lines
Diff to previous 1.152.4.4 (colored) to branchpoint 1.152 (colored)

Pull up revisions (requested by msaitoh in ticket #1359):
sys/dev/pci/if_bge.c		1.170-1.181
sys/dev/pci/if_bgereg.h		1.53-1.56
sys/dev/pci/if_bgevar.h		1.2-1.5
sys/dev/pci/pcidevs		1.1017, 1.1021
sys/dev/pci/pcidevs.h		regen
sys/dev/pci/pcidevs_data.h	regen
sys/dev/mii/miidevs		1.89, 1.93
sys/dev/mii/miidevs.h		regen
sys/dev/mii/miidevs_data.h	regen
sys/dev/mii/brgphy.c		1.49, 1.52

- Fix a bug of BGE_RDMA_MODE_FIFO_LONG_BURST definition.
- Fix the bug that both BGE_PCIE and BGE_PCIX are set on PCI-Express devices.
- Add support for BCM5705F,BCM5714,SBCM5715S,BCM5717,BCM5718,BCM5720,BCM5723,
  BCM5724,BCM5751F,BCM5753F,BCM5756,BCM5761,BCM5761E,BCM5761S,BCM5761SE,
  BCM5764,BCM5781,BCM5784M,BCM5903M,BCM57760,BCM57761,BCM57765,BCM57780,
  BCM57781,BCM57785,BCM57788,BCM57790,BCM57791 and BCM57795. Fixes PR#41694.
- Fix misunderstanding the capability for TSO4 on some chips.
- Use proplib for no EEPROM systems (e.g. sparc64 with onboard bge).
- Add debug function to show some flags.
- (brgphy(4)) Add support for BCM5461, BCM5464, BCM5784 and BCM5761.
- (brgphy(4)) Enable brgphy_jumbo_settings().
- (brgphy(4)) Enable the Ethernet@Wirespeed function.
- Add support for device properties to override the mac address and set
  the BGE_NO_EEPROM flag if we have an onboard device w/o SEEPROM.
- Introduce IPMI and ASF related code from FreeBSD. It fixes some problems
  which occured in netboot on sparc64 and PR#32767
- move the code of disabling host interrput in bge_stop() like linux tg3
  driver.
- fix the return value of bge_eeprom_getbyte().
- Fixes the bug that error bits arent cleard because these bit are W2C
  (in other words W1C).
- Many other bugfixes from FreeBSD and OpenBSD.
- remove an unused structure.
- ANSI C, KNF and tabify
- fix typo in comment.

Revision 1.188 / (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.187: +2 -3 lines
Diff to previous 1.187 (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.180.2.3 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:04 2010 UTC (19 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.180.2.2: +0 -3 lines
Diff to previous 1.180.2.2 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

Sync with HEAD (-D20101022).

Revision 1.187 / (download) - annotate - [select for diffs], Sat Oct 16 06:29:33 2010 UTC (19 months, 1 week ago) by taca
Branch: MAIN
CVS Tags: uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.186: +2 -5 lines
Diff to previous 1.186 (colored)

Remove a variable which assigned but never used, I found while reading
if_bge.c yesterday.

Revision 1.180.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:46:24 2010 UTC (21 months, 1 week ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.180.2.1: +32 -37 lines
Diff to previous 1.180.2.1 (colored) to branchpoint 1.180 (colored)

Sync with HEAD.

Revision 1.145.10.6 / (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.145.10.5: +47 -48 lines
Diff to previous 1.145.10.5 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

sync with head.

Revision 1.186 / (download) - annotate - [select for diffs], Wed Jul 21 15:35:39 2010 UTC (22 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.185: +28 -33 lines
Diff to previous 1.185 (colored)

Use ether_set_ifflags_cb()

Revision 1.180.4.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:36 2010 UTC (22 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.180.4.1: +3 -3 lines
Diff to previous 1.180.4.1 (colored) to branchpoint 1.180 (colored)

sync with head

Revision 1.185 / (download) - annotate - [select for diffs], Thu Jun 3 00:05:36 2010 UTC (23 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored)

Fix DMA setting for read/write on conventional PCI bus devices.
This bug was added in rev. 1.166. Sorry...

Revision 1.180.4.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.180: +20 -16 lines
Diff to previous 1.180 (colored)

sync with head

Revision 1.184 / (download) - annotate - [select for diffs], Tue May 11 09:08:12 2010 UTC (2 years ago) by njoly
Branch: MAIN
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored)

Fix some typos in comments.

Revision 1.180.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.180: +15 -11 lines
Diff to previous 1.180 (colored)

Sync with HEAD.

Revision 1.183 / (download) - annotate - [select for diffs], Sun Apr 25 11:24:46 2010 UTC (2 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.182: +4 -5 lines
Diff to previous 1.182 (colored)

console spam

Revision 1.152.4.2.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:40 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.152.4.2: +872 -1001 lines
Diff to previous 1.152.4.2 (colored) next main 1.152.4.3 (colored)

sync to netbsd-5

Revision 1.182 / (download) - annotate - [select for diffs], Mon Apr 5 07:20:25 2010 UTC (2 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.181: +4 -6 lines
Diff to previous 1.181 (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.181 / (download) - annotate - [select for diffs], Thu Apr 1 01:11:53 2010 UTC (2 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.180: +11 -4 lines
Diff to previous 1.180 (colored)

Fix the code for 5822 B0 errata. Use pci_conf_read() and access at
32bit alignment.

Revision 1.145.10.5 / (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.145.10.4: +1152 -661 lines
Diff to previous 1.145.10.4 (colored) to branchpoint 1.145 (colored)

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Wed Feb 3 15:36:36 2010 UTC (2 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.179: +144 -95 lines
Diff to previous 1.179 (colored)

- Make the initialize sequence close to the document.
- Fix ASF heartbeat sending bug (FreeBSD rev. 1.271 (r202821))
- Use new handshake command for BCM5750 or new controllers (FreeBSD rev. 1.272
  (r202822))

Revision 1.179 / (download) - annotate - [select for diffs], Mon Feb 1 05:38:36 2010 UTC (2 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.178: +5 -4 lines
Diff to previous 1.178 (colored)

Fix the bug that unaligned access occurs on amd64. It also fixes the bug
that error bits aren't cleard because these bits are W2C (in other word, W1C).

Reported by Michael van Elst.

Revision 1.178 / (download) - annotate - [select for diffs], Thu Jan 28 07:34:12 2010 UTC (2 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.177: +56 -66 lines
Diff to previous 1.177 (colored)

ANSI C, KNF and tabify

Revision 1.177 / (download) - annotate - [select for diffs], Thu Jan 28 03:09:13 2010 UTC (2 years, 3 months ago) by msaitoh
Branch: MAIN
Changes since 1.176: +311 -135 lines
Diff to previous 1.176 (colored)

- Introduce IPMI and ASF related code from FreeBSD. It fixes some problems
  which occured in netboot on sparc64 and PR#32767
- move the code of disabling host interrput in bge_stop() like linux tg3
  driver.
- fix the return value of bge_eeprom_getbyte().
- remove an unused structure.
- KNF

Revision 1.176 / (download) - annotate - [select for diffs], Mon Jan 25 10:25:30 2010 UTC (2 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.175: +3 -14 lines
Diff to previous 1.175 (colored)

Back out part of my device property change: the mac-address part was already
done better in another place which I overlooked when merging local
changes.

Revision 1.175 / (download) - annotate - [select for diffs], Sun Jan 24 23:27:39 2010 UTC (2 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored)

Do not try to read the EEPROM if we already know we don't have one.

Revision 1.174 / (download) - annotate - [select for diffs], Sun Jan 24 23:09:26 2010 UTC (2 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.173: +25 -5 lines
Diff to previous 1.173 (colored)

Add support for device properties to override the mac address and set
the BGE_NO_EEPROM flag if we have an onboard device w/o SEEPROM.

Revision 1.173 / (download) - annotate - [select for diffs], Sun Jan 24 17:56:54 2010 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored)

Fix a printf() message in debug code reported by Bert Kiers.

Revision 1.172 / (download) - annotate - [select for diffs], Sun Jan 24 16:21:09 2010 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.171: +572 -293 lines
Diff to previous 1.171 (colored)

Many changes from FreeBSD and OpenBSD:
 - Add support for BCM5705F,BCM5714,SBCM5715S,BCM5717,BCM5718,BCM5720,BCM5723,
   BCM5724,BCM5751F,BCM5753F,BCM5756,BCM5761,BCM5761E,BCM5761S,BCM5761SE,
   BCM5764,BCM5781,BCM5784M,BCM5903M,BCM57760,BCM57761,BCM57765,BCM57780,
   BCM57781,BCM57785,BCM57788,BCM57790,BCM57791 and BCM57795. Fixes PR#41694.
 - Fix misunderstanding the capability for TSO4 on some chips.
 - Many other bugfixes.
 - Use proplib for no EEPROM systems (e.g. sparc64 with onboard bge).
 - Add debug function to show some flags.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Jan 24 15:29:10 2010 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.170: +8 -13 lines
Diff to previous 1.170 (colored)

Fix the bug that both BGE_PCIE and BGE_PCIX are set on PCI-Express devices.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Jan 24 14:10:00 2010 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.169: +121 -122 lines
Diff to previous 1.169 (colored)

KNF & fix typo in comment.
No functional change.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Jan 19 22:07:00 2010 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.168: +4 -11 lines
Diff to previous 1.168 (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.145.10.4 / (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.145.10.3: +5 -5 lines
Diff to previous 1.145.10.3 (colored) to branchpoint 1.145 (colored)

sync with head

Revision 1.168 / (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, matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.167: +5 -5 lines
Diff to previous 1.167 (colored)

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

Revision 1.145.10.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:47:10 2009 UTC (2 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.145.10.2: +22 -41 lines
Diff to previous 1.145.10.2 (colored) to branchpoint 1.145 (colored)

sync with head.

Revision 1.122.2.11 / (download) - annotate - [select for diffs], Tue Aug 18 10:10:19 2009 UTC (2 years, 9 months ago) by bouyer
Branch: netbsd-4
Changes since 1.122.2.10: +1084 -1000 lines
Diff to previous 1.122.2.10 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1342):
	sys/dev/pci/if_bge.c: revisions 1.135, 1.146, 1.151-1.152,
					1.155-1.167 via patch
	sys/dev/pci/if_bgereg.h: revisions 1.43, 1.48-1.52
	sys/dev/pci/if_bgevar.h: revision 1.1
	sys/dev/mii/brgphy.c: revisions 1.36, 1.40, 1.43-1.44 and
					1.47-1.48 via patch
	sys/dev/mii/brgphyreg.h: revisions 1.3-1.4
	sys/dev/mii/miidevs: revisions 1.75, 1.77, 1.85
	sys/dev/mii/miidevs.h: regen
	sys/dev/mii/miidevs_data.h: regen
	sys/dev/mii/miivar.h: revision 1.54
For bge:
  - Really set Tx threshold.
  - Fix the case of setting a flag in BGE_PCI_DMA_RW_CTL on
    conventional PCI.
  - Fix some bugs that the driver unable to detect link loss
    (OpenBSD 1.135, FreeBSD 1.102)
  - bge_tick(): fix some extra input error (OpenBSD 1.221 FreeBSD 1.212)
  - Acknowledge link change interrupts by setting the "link changed" bit
    in the status register (used to have no effect). FreeBSD 1.44
    (OpenBSD 1.21)
  - Add some fiber support (OpenBSD 1.220)
  - Set BGE_MISCCFG_KEEP_GPHY_POWER as {Open,Free}BSD and linux.
  - Add special case code to fix a problem with the BCM5704 in TBI
    mode (FreeBSD rev. 1.71, OpenBSD rev. 1.35)
  - Force an interrupt in bge_ifmedia_upd (FreeBSD rev. 1.205, OpenBSD
    rev. 1.242)
  - Add missing workaround for 5705 (FreeBSD rev. 1.44, OpenBSD rev.
    1.21)
  - Don't print error message only when the register is BGE_SRS_MODE.
    It occurs on some environment (and once after boot?). Other *BSDs
    and Linux don't print the error message for all registers.
  - Fix comments.
  - Remove obsolete codes.
  - Add BCM5786 support.
for brgphy:
  - Add some quirk codes.
  - Add support for BCM5462, BCM54K2, BCM5708C, BCM5722, and BCM5906.

Revision 1.152.4.4 / (download) - annotate - [select for diffs], Tue Aug 4 19:57:24 2009 UTC (2 years, 9 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
Changes since 1.152.4.3: +6 -5 lines
Diff to previous 1.152.4.3 (colored) to branchpoint 1.152 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #870):
	sys/dev/pci/if_bge.c: revision 1.167
Call prop_dictionary_set_uint32() before mii_attach() so that brgphy
can do prop_dictionary_get_uint32() correctly.

Revision 1.152.4.3 / (download) - annotate - [select for diffs], Tue Aug 4 19:46:20 2009 UTC (2 years, 9 months ago) by snj
Branch: netbsd-5
Changes since 1.152.4.2: +871 -1001 lines
Diff to previous 1.152.4.2 (colored) to branchpoint 1.152 (colored)

Apply patch (requested by msaitoh in ticket #866):
For bge:
  - Fix the case of setting a flag in BGE_PCI_DMA_RW_CTL on
    conventional PCI.
  - Fix some bugs that the driver unable to detect link loss
    (OpenBSD 1.135, FreeBSD 1.102)
  - bge_tick(): fix some extra input error (OpenBSD 1.221 FreeBSD 1.212)
  - Acknowledge link change interrupts by setting the 'link changed' bit
    in the status register (used to have no effect). FreeBSD 1.44
    (OpenBSD 1.21)
  - Add some fiber support (OpenBSD 1.220)
  - Set BGE_MISCCFG_KEEP_GPHY_POWER as {Open,Free}BSD and linux.
  - Add special case code to fix a problem with the BCM5704 in TBI
    mode (FreeBSD rev. 1.71, OpenBSD rev. 1.35)
  - Force an interrupt in bge_ifmedia_upd (FreeBSD rev. 1.205, OpenBSD
    rev. 1.242)
  - Add missing workaround for 5705 (FreeBSD rev. 1.44, OpenBSD rev.
    1.21)
  - Don't print error message only when the register is BGE_SRS_MODE.
    It occurs on some environment (and once after boot?). Other *BSDs
    and Linux don't print the error message for all registers.
  - Fix comments.
  - Remove obsolete codes.
For brgphy:
  - Add some quirk codes.
  - Add support for BCM5462, BCM54K2 and BCM5722.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Jul 25 13:52:47 2009 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.166: +6 -5 lines
Diff to previous 1.166 (colored)

Call prop_dictionary_set_uint32() before mii_attach(), so that brgphy
can do prop_dictionary_get_uint32() correctly.

Revision 1.155.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.155.2.1: +18 -38 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

Sync with HEAD.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jul 23 05:05:13 2009 UTC (2 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: jymxensuspend-base
Changes since 1.165: +18 -38 lines
Diff to previous 1.165 (colored)

Reduce the difference against FreeBSD and OpenBSD

  Define BGE_IS_JUMBO_CAPABLE and use it. No functional change.

  Cleanup the code for BGE_PCI_DMA_RW_CTL regster setting. No functional
  change.

  Fix a printf message.

Revision 1.145.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.145.10.1: +10 -4 lines
Diff to previous 1.145.10.1 (colored) to branchpoint 1.145 (colored)

sync with head

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

Sync with HEAD.

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

Revision 1.165 / (download) - annotate - [select for diffs], Tue May 5 18:08:28 2009 UTC (3 years ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.164: +10 -4 lines
Diff to previous 1.164 (colored)

Doesn't print error message only when the register is BGE_SRS_MODE.
It occurs on some environment (and once after boot?). Other *BSDs and
Linux don't print the error message for all registers.

Revision 1.145.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.145: +1077 -946 lines
Diff to previous 1.145 (colored)

sync with head.

Revision 1.152.2.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.152.2.2: +853 -969 lines
Diff to previous 1.152.2.2 (colored) to branchpoint 1.152 (colored) next main 1.153 (colored)

Sync with HEAD.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Apr 23 10:47:44 2009 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.163: +8 -2 lines
Diff to previous 1.163 (colored)

use proplib

Revision 1.163 / (download) - annotate - [select for diffs], Thu Apr 23 10:43:31 2009 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.162: +2 -54 lines
Diff to previous 1.162 (colored)

remove obsolete code.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Apr 19 11:10:36 2009 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.161: +29 -13 lines
Diff to previous 1.161 (colored)

Some fixes and enhancements:

  Both if_bge* and brgphy.[ch]:
    Check the parent's MAC and use the quirk code for the bug like OpenBSD and
    FreeBSD. Some bugs can't identify the PHY ID. For example, 5704 Ax has the
    ADC bug, but 5704 A3 and 5704 B0 have the same PHY ID and revision. Add
    BGE_PHY_CRC_BUG, BGE_PHY_ADC_BUG, BGE_PHY_5704_A0_BUG, BGE_PHY_JITTER_BUG,
    BGE_PHY_ADJUST_TRIM and BGE_PHY_BER_BUG for this flag. Some of the DSP
    patches are newly taken from OpenBSD and FreeBSD.

  if_bge*:
    Remove duplicated BGE_CHIPID_BCM5714_A0 entry in the known CHIPID table.
    Fix obsolete comments.

  brgphy.[ch]:
    Add some PHY IDs.

TODO:
  Add more three quirk code into bge and brgphy (the brgphy side's are
  currently #if0'ed).
  Add support for bnx into brgphy (currently #if0'ed)

Revision 1.161 / (download) - annotate - [select for diffs], Thu Apr 16 01:38:34 2009 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.160: +323 -133 lines
Diff to previous 1.160 (colored)

Take some code from FreeBSD and OpenBSD:

  Fix some bugs that the driver unable to detect link loss (OpenBSD 1.135,
  FreeBSD 1.102)

  bge_tick(): fix some extra input error (OpenBSD 1.221 FreeBSD 1.212)

  Acknowledge link change interrupts by setting the 'link changed' bit
  in the status register (used to have no effect). FreeBSD 1.44 (OpenBSD 1.21)

  Add some fiber support (OpenBSD 1.220)

  Set BGE_MISCCFG_KEEP_GPHY_POWER as {Open,Free}BSD and linux.

  Add special case code to fix a problem with the BCM5704 in TBI mode
  (FreeBSD rev. 1.71, OpenBSD rev. 1.35)

  Force an interrupt in bge_ifmedia_upd (FreeBSD rev. 1.205, OpenBSD rev.
  1.242)

  Add missing workaround for 5705 (FreeBSD rev. 1.44, OpenBSD rev. 1.21)

  Add some known CHIPID entries.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Apr 16 01:35:24 2009 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.159: +4 -4 lines
Diff to previous 1.159 (colored)

Fix the case of setting a flag in BGE_PCI_DMA_RW_CTL (on conventional PCI)
again.

Revision 1.159 / (download) - annotate - [select for diffs], Sun Mar 22 18:54:59 2009 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.158: +20 -3 lines
Diff to previous 1.158 (colored)

Take some code from FreeBSD and OpenBSD

 -Add some known CHIPID entries.
 -Add a code for BCM5906 into bge_chipinit(). We have to do more work for
  BCM5906.
 -Fix the case of setting a flag in BGE_PCI_DMA_RW_CTL (on conventional PCI).

Revision 1.158 / (download) - annotate - [select for diffs], Sun Mar 22 18:14:59 2009 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.157: +956 -1128 lines
Diff to previous 1.157 (colored)

Make bge(4) close to FreBSD and OpenBSD.

NO FUNCTIONAL CHANGE BY THIS COMMIT.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Mar 22 16:20:06 2009 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.156: +159 -284 lines
Diff to previous 1.156 (colored)

Make bge(4) close to FreBSD and OpenBSD.

NO FUNCTIONAL CHANGE BY THIS COMMIT.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Mar 22 16:12:53 2009 UTC (3 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.155: +11 -7 lines
Diff to previous 1.155 (colored)

eliminate PHY_1 quirk (like OpenBSD (rev. 1.110) and FreeBSD (rev. 1.44))

Revision 1.152.2.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.152.2.1: +5 -2 lines
Diff to previous 1.152.2.1 (colored) to branchpoint 1.152 (colored)

Sync with HEAD.

Revision 1.152.4.2 / (download) - annotate - [select for diffs], Mon Feb 2 20:44:16 2009 UTC (3 years, 3 months ago) by snj
Branch: netbsd-5
CVS Tags: 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-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.152.4.1: +5 -2 lines
Diff to previous 1.152.4.1 (colored) to branchpoint 1.152 (colored)

Pull up following revision(s) (requested by he in ticket #384):
	sys/dev/pci/if_bge.c: revision 1.155
Make fibre cards, at least 5701 models, work, by initializing the
bge_ifmedia.ifm_media field, which is not done by ifmedia_set().
Patch lifted from FreeBSD's revision 1.71.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Jan 30 15:01:19 2009 UTC (3 years, 3 months ago) by he
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.154: +5 -2 lines
Diff to previous 1.154 (colored)

Make fibre cards, at least 5701 models, work, by initializing the
bge_ifmedia.ifm_media field, which is not done by ifmedia_set().
Patch lifted from FreeBSD's revision 1.71.

Revision 1.152.2.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.152: +9 -7 lines
Diff to previous 1.152 (colored)

Sync with HEAD.

Revision 1.145.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:59 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.145.6.2: +7 -5 lines
Diff to previous 1.145.6.2 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

Sync with HEAD.

Revision 1.148.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:14:35 2008 UTC (3 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.148.2.1: +9 -7 lines
Diff to previous 1.148.2.1 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored)

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

Revision 1.152.4.1 / (download) - annotate - [select for diffs], Sat Nov 15 02:39:17 2008 UTC (3 years, 6 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC1
Changes since 1.152: +7 -7 lines
Diff to previous 1.152 (colored)

Pull up following revision(s) (requested by cegger in ticket #44):
	sys/dev/pci/if_bge.c: revision 1.154
PR kern/39608: bge(4) constant freeze on BCM5906M:
Correct DMA values. Patch from Karl Uwe Lockhoff via tech-kern.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Nov 10 22:50:18 2008 UTC (3 years, 6 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.153: +7 -7 lines
Diff to previous 1.153 (colored)

PR kern/39608: bge(4) constant freeze on BCM5906M:
Correct DMA values. Patch from Karl Uwe Lockhoff via tech-kern.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:07 2008 UTC (3 years, 6 months ago) by dyoung
Branch: MAIN
Changes since 1.152: +4 -2 lines
Diff to previous 1.152 (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.148.2.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.148: +319 -78 lines
Diff to previous 1.148 (colored)

Sync with HEAD.

Revision 1.145.6.2 / (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.145.6.1: +317 -76 lines
Diff to previous 1.145.6.1 (colored) to branchpoint 1.145 (colored)

Sync with HEAD.

Revision 1.145.12.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:06 2008 UTC (3 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.145.12.1: +319 -78 lines
Diff to previous 1.145.12.1 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.122.2.3.2.4 / (download) - annotate - [select for diffs], Thu Sep 4 08:46:44 2008 UTC (3 years, 8 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.122.2.3.2.3: +23 -2 lines
Diff to previous 1.122.2.3.2.3 (colored) next main 1.122.2.4 (colored)

Sync with netbsd-4.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Aug 31 19:57:03 2008 UTC (3 years, 8 months ago) by tron
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.151: +11 -13 lines
Diff to previous 1.151 (colored)

Make multicast setup work again which got broken by the last commit.
Patch provided by Matthias Drochner. This fixes PR kern/39439.

Revision 1.151 / (download) - annotate - [select for diffs], Mon Aug 25 08:15:05 2008 UTC (3 years, 9 months ago) by cegger
Branch: MAIN
Changes since 1.150: +307 -86 lines
Diff to previous 1.150 (colored)

PR 39241: Add support for Broadcom BCM5906(M) from Karl Uwe Lockhoff

Revision 1.122.2.10 / (download) - annotate - [select for diffs], Wed Aug 20 19:33:49 2008 UTC (3 years, 9 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.122.2.9: +23 -2 lines
Diff to previous 1.122.2.9 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by sborrill in ticket #1172):
	sys/dev/pci/if_bge.c: revision 1.149
	sys/dev/pci/if_bgereg.h: revision 1.47
Add support for Broadcom 5722 and identify 5755 ASICs.

Revision 1.146.2.2 / (download) - annotate - [select for diffs], Mon Jul 28 14:37:27 2008 UTC (3 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.146.2.1: +25 -3 lines
Diff to previous 1.146.2.1 (colored) next main 1.147 (colored)

Sync with head.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Jul 25 19:45:06 2008 UTC (3 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.149: +4 -3 lines
Diff to previous 1.149 (colored)

Add {} around VLAN_INPUT_TAG() - VLAN_INPUT_TAG() can't be a do ... while (0).

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jul 24 08:14:49 2008 UTC (3 years, 10 months ago) by sborrill
Branch: MAIN
Changes since 1.148: +23 -2 lines
Diff to previous 1.148 (colored)

Add support for Broadcom 5722 and identify 5755 ASICs.

Revision 1.145.6.1 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:08 2008 UTC (3 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.145: +24 -23 lines
Diff to previous 1.145 (colored)

Sync with HEAD.

Revision 1.145.12.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:11 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.145: +24 -23 lines
Diff to previous 1.145 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:18 2008 UTC (3 years, 11 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.146: +23 -22 lines
Diff to previous 1.146 (colored)

Sync with head.

Revision 1.145.8.1 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:40 2008 UTC (3 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.145: +24 -23 lines
Diff to previous 1.145 (colored) next main 1.146 (colored)

sync with head.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Jun 17 06:08:46 2008 UTC (3 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: haad-dm
Changes since 1.147: +19 -0 lines
Diff to previous 1.147 (colored)

add rnd(4) hooks. Note that interrupts on bge hardware may occur
with certain patterns, especially when the interrupt mitigation
logic kicks in. So this might be a very weak entropy source.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Jun 17 06:04:07 2008 UTC (3 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.146: +2 -20 lines
Diff to previous 1.146 (colored)

No longer try to start sending packets from status change handler.
This is already handled by the general status change code.

For non-TBI devices always call mii_tick(). This fixes ifwatchd
signalling.

Revision 1.146 / (download) - annotate - [select for diffs], Sun Jun 8 11:41:26 2008 UTC (3 years, 11 months ago) by mlelstv
Branch: MAIN
Branch point for: simonb-wapbl
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

really set Tx thresholds

Revision 1.122.2.3.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.122.2.3.2.2: +31 -10 lines
Diff to previous 1.122.2.3.2.2 (colored)

Sync with netbsd-4.

Revision 1.122.2.9 / (download) - annotate - [select for diffs], Sat May 17 16:23:50 2008 UTC (4 years ago) by bouyer
Branch: netbsd-4
Changes since 1.122.2.8: +31 -10 lines
Diff to previous 1.122.2.8 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #1144):
	sys/dev/pci/if_bge.c: revision 1.144 via patch
Check wether interrupts originate from the bge hardware.
Fixes PR kern/33433.

Revision 1.136.2.4 / (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.136.2.3: +53 -28 lines
Diff to previous 1.136.2.3 (colored) next main 1.137 (colored)

sync with HEAD

Revision 1.139.4.3 / (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.139.4.2: +53 -28 lines
Diff to previous 1.139.4.2 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

Sync with HEAD.

Revision 1.90.2.9 / (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.90.2.8: +39 -16 lines
Diff to previous 1.90.2.8 (colored) next main 1.91 (colored)

sync with head.

Revision 1.145 / (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-base3, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, 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-pf42, yamt-nfs-mp, wrstuden-revivesa, mjf-devfs2
Changes since 1.144: +11 -8 lines
Diff to previous 1.144 (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.144 / (download) - annotate - [select for diffs], Mon Feb 4 21:44:35 2008 UTC (4 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.143: +30 -10 lines
Diff to previous 1.143 (colored)

Check wether interrupts originate from the bge hardware.
Fixes PR kern/33433.

Revision 1.90.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:23:29 2008 UTC (4 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.7: +4 -3 lines
Diff to previous 1.90.2.7 (colored)

sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Feb 2 12:12:09 2008 UTC (4 years, 3 months ago) by tron
Branch: MAIN
Changes since 1.142: +4 -3 lines
Diff to previous 1.142 (colored)

Avoid using a stale PCI chipset tag pointer. This avoids panics while
attaching a 3Com 3C996B-T on my ULTRA60. Reviewed by Matthew Green.

Revision 1.90.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:43:52 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.6: +78 -136 lines
Diff to previous 1.90.2.6 (colored)

sync with head

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:36 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.141: +14 -13 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Sync with HEAD

Revision 1.142 / (download) - annotate - [select for diffs], Sat Jan 19 22:10:18 2008 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.141: +14 -13 lines
Diff to previous 1.141 (colored)

Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.

Revision 1.136.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:53:43 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.136.2.2: +66 -125 lines
Diff to previous 1.136.2.2 (colored)

sync with HEAD

Revision 1.139.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:15 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.139.4.1: +66 -125 lines
Diff to previous 1.139.4.1 (colored) to branchpoint 1.139 (colored)

Sync with HEAD.

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:46:49 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.140: +66 -125 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Sync with head.

Revision 1.140.4.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:32:04 2007 UTC (4 years, 5 months ago) by yamt
Branch: yamt-kmem
Changes since 1.140: +66 -125 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

sync with head.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:08 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, vmlocking2-base3, matt-armv6-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1
Branch point for: bouyer-xeni386
Changes since 1.140: +66 -125 lines
Diff to previous 1.140 (colored)

Merge jmcneill-pm branch.

Revision 1.132.6.10 / (download) - annotate - [select for diffs], Sat Dec 8 16:21:27 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.132.6.9: +4 -4 lines
Diff to previous 1.132.6.9 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored)

Rename pnp(9) -> pmf(9), as requested by many.

Revision 1.87.2.7 / (download) - annotate - [select for diffs], Mon Nov 19 21:18:09 2007 UTC (4 years, 6 months ago) by bouyer
Branch: netbsd-3
Changes since 1.87.2.6: +287 -161 lines
Diff to previous 1.87.2.6 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored)

Pull up following revision(s) via patch (requested by msaitoh in ticket #1862):
	sys/dev/pci/if_bge.c		   	1.89,1.95,1.97,1.101,1.103,
						1.105,1.107,1.117-1.122,
						1.128-1.131,1.133-1.135,1.139
						via patch
	sys/dev/pci/if_bgereg.h		 	1.31,1.34-1.39,1.42-1.43
	sys/dev/pci/pcidevs		   	patch

Some cleanups(typo, whitespace, debug message).
Add TSO support to bge(4)
Add support for BCM5715, BCM5752M, BCM5754, BCM5755, BCM5786 and 5787.
Add support for BCM5789. Fixes PR/33828 from Pawel Chwalowskibg.
Add support for BCM5753 and BCM5753M Fixes PR kern/36139 from Mustafa Dogan.
Add and fix some BGE_CHIPIDs. From FreeBSD and OpenBSD.
In bge_ioctl(), don't call bge_init() if the interface is already up
(Makes ifwatchd work on this interface).
BCM5701 B2 requires BGE_QUIRK_ONLY_PHY_1 quirk. From Brian Baird in kern/23778.
Move TX ring full sanity check further up and check the number of DMA
segments from the DMA map, instead of counting the DMA segments in the
for loop and breaking out later.
Unload the DMA map if encountering an error condition.
Fix a NULL reference on failing mbuf allocation.
In bge_start return if IFF_OACTIVE is set in combination with
IFF_RUNNING, drop obscure check for length of interface queue.
Remove message about failing bge_encap, it can happen just too easily
because of full descriptor rings.
Fix some watchdog timeout and "block failed to stop" problems on
some cards.
Fix "pcistate failed to revert" problem on many cards.

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

Sync with HEAD.

Revision 1.90.2.6 / (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.90.2.5: +3 -3 lines
Diff to previous 1.90.2.5 (colored)

sync with head.

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

Sync with HEAD

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

Sync with HEAD.

Revision 1.136.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 10:59:53 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.136.2.1: +3 -3 lines
Diff to previous 1.136.2.1 (colored)

sync with -HEAD

Revision 1.140 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:18 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: yamt-kmem, vmlocking2
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.136.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:28:54 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
Changes since 1.136: +113 -116 lines
Diff to previous 1.136 (colored)

sync with HEAD

Revision 1.132.6.8 / (download) - annotate - [select for diffs], Tue Nov 6 14:27:24 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.132.6.7: +5 -7 lines
Diff to previous 1.132.6.7 (colored) to branchpoint 1.132 (colored)

Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
  three layers (class logic, device logic, bus logic), all of them being
  optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
  not suspended (even partially), device_is_enabled returns true if the
  device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
  pnp_system_resume. Before running any suspend/resume handlers, check
  that all currently attached devices support power management and bail
  out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
  can register what events they are interested in and whether the handler
  should be global or not.
- Introduce device_active API for devices to mark themselve in use from
  either the system or the device. Use this to implement the idle handling
  for audio and input devices. This is intended to replace most ad-hoc
  watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
  shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
  well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
  break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.

Revision 1.122.2.3.2.2 / (download) - annotate - [select for diffs], Mon Oct 29 00:45:14 2007 UTC (4 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.122.2.3.2.1: +11 -10 lines
Diff to previous 1.122.2.3.2.1 (colored)

Catch up with 4.0 RC3

Revision 1.90.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:32:49 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.4: +111 -114 lines
Diff to previous 1.90.2.4 (colored)

sync with head.

Revision 1.122.2.8 / (download) - annotate - [select for diffs], Mon Oct 15 15:52:44 2007 UTC (4 years, 7 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.122.2.7: +3 -3 lines
Diff to previous 1.122.2.7 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #934):
	sys/dev/pci/if_bge.c:	patch

Shut up a debug message.

Revision 1.127.2.6 / (download) - annotate - [select for diffs], Tue Oct 9 13:41:42 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.127.2.5: +116 -119 lines
Diff to previous 1.127.2.5 (colored) to branchpoint 1.127 (colored) next main 1.128 (colored)

Sync with head.

Revision 1.122.2.7 / (download) - annotate - [select for diffs], Sun Oct 7 14:15:20 2007 UTC (4 years, 7 months ago) by xtraeme
Branch: netbsd-4
Changes since 1.122.2.6: +10 -9 lines
Diff to previous 1.122.2.6 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #918):
	sys/dev/pci/if_bge.c: revision 1.139
Fix three bugs.
1) Move a magic number writing code.
Fix a watchdog timeout and "block failed to stop" problem on BCM5701 B5 card.
2) Fix incorrect register write.
Fix a watchdog timeout "block failed to stop" problem on BCM5700 B2 card.
3) Wait more long time for PCISTATE register to return to its original
pre-reset state.
Fix "pcistate failed to revert" problem on BCM5703 A2 card.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:31:23 2007 UTC (4 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.137: +111 -114 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

sync with head.

Revision 1.132.6.7 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:31 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.132.6.6: +109 -113 lines
Diff to previous 1.132.6.6 (colored) to branchpoint 1.132 (colored)

Sync with HEAD.

Revision 1.132.6.6 / (download) - annotate - [select for diffs], Mon Oct 1 05:37:38 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.132.6.5: +7 -15 lines
Diff to previous 1.132.6.5 (colored) to branchpoint 1.132 (colored)

Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Sep 28 15:37:45 2007 UTC (4 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.138: +10 -9 lines
Diff to previous 1.138 (colored)

Fix three bugs.

1) Move a magic number writing code.
Fix a watchdog timeout and "block failed to stop" problem on BCM5701 B5 card.

2) Fix incorrect register write.
Fix a watchdog timeout "block failed to stop" problem on BCM5700 B2 card.

3) Wait more long time for PCISTATE register to return to its original
pre-reset state.
Fix "pcistate failed to revert" problem on BCM5703 A2 card.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Sep 24 21:25:45 2007 UTC (4 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.137: +103 -107 lines
Diff to previous 1.137 (colored)

Convert bge(4) to device/softc separation. Use aprint_* instead of
printf all over the place. Only the debug macros are kept. Place the TSO
message about the hard case under debug.

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

Sync with HEAD.

Revision 1.90.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:36:52 2007 UTC (4 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.3: +137 -42 lines
Diff to previous 1.90.2.3 (colored)

sync with head.

Revision 1.132.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.132.2.1: +7 -7 lines
Diff to previous 1.132.2.1 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored)

Sync with HEAD.

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

Sync w/ NetBSD-4-RC_1

Revision 1.127.2.5 / (download) - annotate - [select for diffs], Sat Sep 1 12:56:45 2007 UTC (4 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.127.2.4: +3 -3 lines
Diff to previous 1.127.2.4 (colored) to branchpoint 1.127 (colored)

Update for pool_cache API changes.

Revision 1.122.2.6 / (download) - annotate - [select for diffs], Fri Aug 31 21:52:41 2007 UTC (4 years, 8 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: netbsd-4-0-RC2, netbsd-4-0-RC1
Changes since 1.122.2.5: +86 -12 lines
Diff to previous 1.122.2.5 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by phil in ticket #819):
	sys/dev/mii/miidevs.h: regen
	sys/dev/mii/miidevs: revision 1.71
	sys/dev/pci/if_bge.c: revision 1.133
	sys/dev/pci/if_bge.c: revision 1.134
	sys/dev/pci/if_bgereg.h: revision 1.43
	sys/dev/mii/brgphy.c: revision 1.34
	sys/dev/mii/miidevs_data.h: regen
Add BCM5755 and 5754 Gig-E PHYs.
Regen for BCM5755 and 5754.
Add support for BCM5754 and BCM5755.  From suggestions from Jonathan
Stone.
Add a couple more BGE_CHIPIDs
Add support for BCM5755 and BCM5754/5787.  Suggestions from Jonathan
Stone and fixes from OpenBSD for various hardware bugs/errata.
Disable firmware fastboot on 5754 and 5755.  From FreeBSD by way of Phil
Nelson.

Revision 1.137 / (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-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.136: +4 -4 lines
Diff to previous 1.136 (colored)

Constify: LLADDR() -> CLLADDR().

Revision 1.136 / (download) - annotate - [select for diffs], Sun Aug 26 22:45:57 2007 UTC (4 years, 9 months ago) by dyoung
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.135: +5 -5 lines
Diff to previous 1.135 (colored)

Constify: LLADDR -> CLLADDR.  I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).

Revision 1.132.6.4 / (download) - annotate - [select for diffs], Thu Aug 23 09:32:50 2007 UTC (4 years, 9 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.132.6.3: +11 -75 lines
Diff to previous 1.132.6.3 (colored) to branchpoint 1.132 (colored)

Introduce pci_net_generic_power, which should be enough for most
network drivers and be a good foundation for C&P for the rest.

For iwi(4), don't reset the PCI retry register again, pci_conf_restore
should take care of that already.

For bge(4), add a NetBSD style if_stop.

Revision 1.122.2.5 / (download) - annotate - [select for diffs], Tue Aug 21 20:15:14 2007 UTC (4 years, 9 months ago) by liamjfoy
Branch: netbsd-4
Changes since 1.122.2.4: +4 -0 lines
Diff to previous 1.122.2.4 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by pavel in ticket #821):
	sys/dev/pci/if_bge.c: revision 1.130
Add support for BCM5715.  Works seemingly well on hardware provided by
pavel@.  Thanks, Pavel!

Revision 1.132.6.3 / (download) - annotate - [select for diffs], Tue Aug 21 06:56:48 2007 UTC (4 years, 9 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.132.6.2: +125 -109 lines
Diff to previous 1.132.6.2 (colored) to branchpoint 1.132 (colored)

Make bge(4) a bit more like other drivers in the tree with regard to
the data stored in the softc. Convert to pnp_register.

Revision 1.127.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 18:37:11 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.127.2.3: +93 -14 lines
Diff to previous 1.127.2.3 (colored) to branchpoint 1.127 (colored)

Sync with HEAD.

Revision 1.132.6.2 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:09 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.132.6.1: +7 -2 lines
Diff to previous 1.132.6.1 (colored) to branchpoint 1.132 (colored)

Sync with HEAD.

Revision 1.132.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.132: +93 -14 lines
Diff to previous 1.132 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Aug 10 12:27:35 2007 UTC (4 years, 9 months ago) by taca
Branch: MAIN
Changes since 1.134: +7 -2 lines
Diff to previous 1.134 (colored)

Add support for BCM5786 with simply adding its PCI product id.

Testing on Fujitsu FMV-D5240 and works fine.

Revision 1.132.6.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:10 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.132: +88 -14 lines
Diff to previous 1.132 (colored)

Sync with HEAD.

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Tue Aug 7 01:13:57 2007 UTC (4 years, 9 months ago) by markd
Branch: matt-mips64
Changes since 1.134.2.1: +4416 -0 lines
Diff to previous 1.134.2.1 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored)

Disable firmware fastboot on 5754 and 5755.  From FreeBSD by way of Phil
Nelson.

Revision 1.134.2.1, Tue Aug 7 01:13:56 2007 UTC (4 years, 9 months ago) by markd
Branch: matt-mips64
Changes since 1.134: +0 -4416 lines
FILE REMOVED

file if_bge.c was added on branch matt-mips64 on 2007-08-07 01:13:57 +0000

Revision 1.134 / (download) - annotate - [select for diffs], Tue Aug 7 01:13:56 2007 UTC (4 years, 9 months ago) by markd
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.133: +5 -3 lines
Diff to previous 1.133 (colored)

Disable firmware fastboot on 5754 and 5755.  From FreeBSD by way of Phil
Nelson.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Aug 6 12:29:36 2007 UTC (4 years, 9 months ago) by markd
Branch: MAIN
Changes since 1.132: +85 -13 lines
Diff to previous 1.132 (colored)

Add support for BCM5755 and BCM5754/5787.  Suggestions from Jonathan
Stone and fixes from OpenBSD for various hardware bugs/errata.

Revision 1.127.2.3 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:47 2007 UTC (4 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.127.2.2: +3 -3 lines
Diff to previous 1.127.2.2 (colored) to branchpoint 1.127 (colored)

Sync with head.

Revision 1.127.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:07:32 2007 UTC (4 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.127: +20 -5 lines
Diff to previous 1.127 (colored) next main 1.128 (colored)

Sync with head.

Revision 1.132 / (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, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (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.127.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:48:07 2007 UTC (4 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.127.2.1: +3 -3 lines
Diff to previous 1.127.2.1 (colored) to branchpoint 1.127 (colored)

Adapt to callout API change.

Revision 1.122.2.4 / (download) - annotate - [select for diffs], Sun Jun 10 20:58:15 2007 UTC (4 years, 11 months ago) by bouyer
Branch: netbsd-4
Changes since 1.122.2.3: +1 -1 lines
Diff to previous 1.122.2.3 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #714):
	sys/dev/pci/if_bge.c: revision 1.131
Do not check link state before starting transmitter. Otherwise
mbufs will just pile up in the interface queue.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Jun 9 21:42:33 2007 UTC (4 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Do not check link state before starting transmitter. Otherwise
mbufs will just pile up in the interface queue.

Revision 1.127.2.1 / (download) - annotate - [select for diffs], Sun May 27 14:30:23 2007 UTC (5 years ago) by ad
Branch: vmlocking
Changes since 1.127: +19 -4 lines
Diff to previous 1.127 (colored)

Sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Mon May 21 15:36:26 2007 UTC (5 years ago) by cube
Branch: MAIN
Changes since 1.129: +6 -2 lines
Diff to previous 1.129 (colored)

Add support for BCM5715.  Works seemingly well on hardware provided by
pavel@.  Thanks, Pavel!

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Mon May 7 10:55:30 2007 UTC (5 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.123.2.2: +15 -4 lines
Diff to previous 1.123.2.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

sync with head.

Revision 1.122.2.3 / (download) - annotate - [select for diffs], Sat Apr 28 18:17:27 2007 UTC (5 years ago) by bouyer
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.122.2.2: +3 -2 lines
Diff to previous 1.122.2.2 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by joerg in ticket #594):
	sys/dev/pci/if_bge.c: revision 1.129
Fix a NULL reference on failing mbuf allocation.
In bge_start return if IFF_OACTIVE is set in combination with
IFF_RUNNING, drop obscure check for length of interface queue.
Remove message about failing bge_encap, it can happen just too easily
because of full descriptor rings.

Revision 1.129 / (download) - annotate - [select for diffs], Wed Apr 25 21:12:48 2007 UTC (5 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.128: +5 -4 lines
Diff to previous 1.128 (colored)

Fix a NULL reference on failing mbuf allocation.
In bge_start return if IFF_OACTIVE is set in combination with
IFF_RUNNING, drop obscure check for length of interface queue.
Remove message about failing bge_encap, it can happen just too easily
because of full descriptor rings.

Revision 1.122.2.2 / (download) - annotate - [select for diffs], Mon Apr 16 20:03:26 2007 UTC (5 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.122.2.1: +10 -0 lines
Diff to previous 1.122.2.1 (colored) to branchpoint 1.122 (colored)

Pull up following revision(s) (requested by tron in ticket #578):
	sys/dev/pci/if_bge.c: revision 1.128
Add support for Broadcom BCM5753 and Broadcom BCM5753M Gigabit Ethernet.
Patch supplied by Mustafa Dogan in PR kern/36139, confirmed to work
by Tonnerre Lombard on #NetBSD IRC channel.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Apr 16 10:08:33 2007 UTC (5 years, 1 month ago) by tron
Branch: MAIN
Changes since 1.127: +12 -2 lines
Diff to previous 1.127 (colored)

Add support for Broadcom BCM5753 and Broadcom BCM5753M Gigabit Ethernet.
Patch supplied by Mustafa Dogan in PR kern/36139, confirmed to work
by Tonnerre Lombard on #NetBSD IRC channel.

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:55:16 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.123.2.1: +23 -22 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored)

Sync with HEAD.

Revision 1.87.2.6 / (download) - annotate - [select for diffs], Mon Mar 5 15:07:14 2007 UTC (5 years, 2 months ago) by ghen
Branch: netbsd-3
Changes since 1.87.2.5: +22 -12 lines
Diff to previous 1.87.2.5 (colored) to branchpoint 1.87 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1671):
	sys/dev/pci/if_bgereg.h: revision 1.40
	sys/dev/pci/if_bge.c: revision 1.124
	sys/dev/pci/if_bge.c: revision 1.125
bus_dma fixes for bge(4). It now works on amd64 with more than 4GB physical
RAM (jumbo frames untested yet).
We have to bus_mapmap_load() after m_adj, otherwise the map will point at
the wrong place in the buffer. Fix an issue in the !sc->bge_rx_alignment_bug
case reported by Nicolas Joly.
While there remove a duplicate m_adj(), and add a missing bus_dmamap_unload().

Revision 1.127 / (download) - annotate - [select for diffs], Mon Mar 5 10:39:09 2007 UTC (5 years, 2 months ago) by tsutsui
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

Pass (char *) to mtod(9) for pointer arith
(in #ifndef __NO_STRICT_ALIGNMENT part).

Revision 1.126 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:19 2007 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.125: +23 -22 lines
Diff to previous 1.125 (colored)

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

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 23:32:01 2007 UTC (5 years, 2 months ago) by riz
Branch: netbsd-4
Changes since 1.122: +22 -12 lines
Diff to previous 1.122 (colored)

Pull up following revision(s) (requested by bouyer in ticket #466):
	sys/dev/pci/if_bgereg.h: revision 1.40
	sys/dev/pci/if_bge.c: revision 1.124-1.125
bus_dma fixes for bge(4). It now works on amd64 with more than 4GB physical
RAM (jumbo frames untested yet).
We have to bus_mapmap_load() after m_adj, otherwise the map will point at
the wrong place in the buffer. Fix an issue in the !sc->bge_rx_alignment_bug
case reported by Nicolas Joly.
While there remove a duplicate m_adj(), and add a missing bus_dmamap_unload().

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:53:59 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.123: +22 -12 lines
Diff to previous 1.123 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

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

sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Feb 19 18:44:05 2007 UTC (5 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.124: +13 -21 lines
Diff to previous 1.124 (colored)

We have to bus_mapmap_load() after m_adj, otherwise the map will point at
the wrong place in the buffer. Fix an issue in the !sc->bge_rx_alignment_bug
case reported by Nicolas Joly.
While there remove a duplicate m_adj(), and add a missing bus_dmamap_unload().

Revision 1.124 / (download) - annotate - [select for diffs], Sat Feb 17 19:47:06 2007 UTC (5 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.123: +27 -9 lines
Diff to previous 1.123 (colored)

bus_dma fixes for bge(4). It now works on amd64 with more than 4GB physical
RAM (jumbo frames untested yet).

Revision 1.123 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:27 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.122: +5 -4 lines
Diff to previous 1.122 (colored)

Merge newlock2 to head.

Revision 1.109.6.3 / (download) - annotate - [select for diffs], Tue Feb 6 13:11:47 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.109.6.2: +5 -4 lines
Diff to previous 1.109.6.2 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored)

Quieten noisy boot messages.

Revision 1.109.6.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.109.6.1: +66 -30 lines
Diff to previous 1.109.6.1 (colored) to branchpoint 1.109 (colored)

Sync with head.

Revision 1.90.2.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.90.2.1: +85 -54 lines
Diff to previous 1.90.2.1 (colored)

sync with head.

Revision 1.109.8.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:17:43 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.109.8.1: +87 -56 lines
Diff to previous 1.109.8.1 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored)

sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Sun Nov 26 06:09:09 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, newlock2-nbase, newlock2-base, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored)

Sync two alternative IDs with pcidevs.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Nov 26 05:58:05 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

Fix a typo.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Nov 26 04:00:45 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.119: +17 -9 lines
Diff to previous 1.119 (colored)

Add and fix some BGE_CHIPIDs. From FreeBSD and OpenBSD.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Nov 26 03:02:04 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.118: +26 -2 lines
Diff to previous 1.118 (colored)

Add support for BCM5752M. from Matt Kolb on tech-kern and OpenBSD.

Revision 1.118 / (download) - annotate - [select for diffs], Sun Nov 26 02:40:10 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.117: +21 -17 lines
Diff to previous 1.117 (colored)

Pull some bge_encap() fixes from OpenBSD:
> - Move TX ring full sanity check further up and check the number of DMA
> segments from the DMA map, instead of counting the DMA segments in the
> for loop and breaking out later.
> - Unload the DMA map if encountering an error condition.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Nov 25 13:31:00 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

BCM5701 B2 requires BGE_QUIRK_ONLY_PHY_1 quirk. From Brian Baird
in PR kern/23778.

Revision 1.109.6.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:29 2006 UTC (5 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.109: +21 -26 lines
Diff to previous 1.109 (colored)

Sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:08 2006 UTC (5 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.115: +7 -7 lines
Diff to previous 1.115 (colored)

__unused removal on arguments; approved by core.

Revision 1.115 / (download) - annotate - [select for diffs], Sat Oct 28 18:45:57 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.114: +10 -11 lines
Diff to previous 1.114 (colored)

- bcopy -> strcpy (in debug message)
- bcopy -> memcpy

Revision 1.114 / (download) - annotate - [select for diffs], Sat Oct 28 18:26:15 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.113: +7 -10 lines
Diff to previous 1.113 (colored)

- use continue for an empty statement in for() loop
- remove an empty statement in if() clause by inverting logic
- use KDASSERT(9) rather than #ifdef DEBUG + KASSERT(9)
- replace commented out M_WRITABLE() with !M_READONLY(9)

Revision 1.113 / (download) - annotate - [select for diffs], Sat Oct 28 18:00:53 2006 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.112: +6 -7 lines
Diff to previous 1.112 (colored)

M_TRALINGSPACE(m) returns 0 if M_READONLY(m) is true,
so no need to call both.  Pointed out by Pavel Cahyna.

Revision 1.109.8.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:16 2006 UTC (5 years, 7 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.109: +10 -10 lines
Diff to previous 1.109 (colored)

sync with head

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

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

Revision 1.111 / (download) - annotate - [select for diffs], Fri Sep 29 14:33:52 2006 UTC (5 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.110: +3 -4 lines
Diff to previous 1.110 (colored)

Coverity CID 3666: Remove debug to expose KASSERT's (from Arnaud Lacombe)

Revision 1.110 / (download) - annotate - [select for diffs], Sun Sep 24 03:53:09 2006 UTC (5 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.109: +4 -3 lines
Diff to previous 1.109 (colored)

Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@

Revision 1.102.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:52:16 2006 UTC (5 years, 8 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.102: +187 -275 lines
Diff to previous 1.102 (colored) next main 1.103 (colored)

sync with head

Revision 1.104.2.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:51:21 2006 UTC (5 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104.2.1: +27 -29 lines
Diff to previous 1.104.2.1 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

sync with head.

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:05:03 2006 UTC (5 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90: +550 -294 lines
Diff to previous 1.90 (colored)

sync with head.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:01:35 2006 UTC (5 years, 11 months ago) by chap
Branch: chap-midi
Changes since 1.106: +27 -29 lines
Diff to previous 1.106 (colored) next main 1.107 (colored)

Sync with head.

Revision 1.87.2.5 / (download) - annotate - [select for diffs], Sun Jun 4 08:59:42 2006 UTC (5 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.87.2.4: +395 -34 lines
Diff to previous 1.87.2.4 (colored) to branchpoint 1.87 (colored)

Apply patch (requested by jonathan in ticket #1351):
Add support to bge(4) for bcm5714, bcm5715, bcm5780/HT-2000 and
bcm5752 chip variants.

Revision 1.102.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:36:44 2006 UTC (5 years, 11 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.102.6.1: +42 -29 lines
Diff to previous 1.102.6.1 (colored) next main 1.103 (colored)

Sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Jun 1 02:20:54 2006 UTC (5 years, 11 months ago) by jonathan
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.108: +17 -18 lines
Diff to previous 1.108 (colored)

Rework bge_reset() to more closely follow the Broadcom-supplied Linux driver:

1. Instead of enabling the buffer manager hardware-FSM only on
pre-5705 devices, initialize the buffer manager on all bge devices.
Modelled on the Broadcom-authored Linux driver.

2. Instead of enabling the memory arbiter hardware-FSM only on
pre-5705 devices, initialize the memory arbiter on all bge devices.
Modelled on the Broadcom-authored Linux driver.

3. Ditto the second copy of code which enables the memory arbiter.
Also, add an XXX asking, why taunt the chip this way a second time?
(The most plausible explanatoin is that enabling the memory arbiter
twice is my own darn fault, likely a cut-and-paste glitch I made many
moons ago, when re-ordering hardware enables to match the Linux drivers.)

Revision 1.108 / (download) - annotate - [select for diffs], Thu Jun 1 01:46:41 2006 UTC (5 years, 11 months ago) by jonathan
Branch: MAIN
Changes since 1.107: +4 -5 lines
Diff to previous 1.107 (colored)

Fix a minor thinko in ascertaining whether or not a bge(4) device is
attached via PCI-Express:

The previous code first checked that the bge ASIC-revision matched the
5750 ASIC-revisoin (the bcm5721 has the same ASIC revision). However, the
bcm5752 is also a PCI-Express device, but has a different ASIC revision.
Thus, we were setting sc->bge_pcie to zero for bcm5752s, which in turn
causes bge_reset() to not perform required PCI-Express setup.

The test for a 5750 ASIC revision may (or may not) have been carried
across from the FreeBSD bge(4) driver. FreeBSD's bge(4) does not
properly detect or handle post-5750 bge devices. Instead, FreeBSD's
bge(4) keeps a sofc copy of the ASIC revision, and for post-5750
devices (5752, 5714, ...) overwrites that softc copy of the
ASIC-revision with the 5750 ASIC revision.  Thus, the test (mutatis
mutandis, using FreeBDS's softc asic-revision field), was correct for
FreeBSD; but manifestly incorrect for NetBSD.

Mark Davies (mark at mcs.vuw.ac..nz) has confirmed via private email
that this change fixes PR kern/kern/33509: his bcm5752 now works.

Revision 1.107 / (download) - annotate - [select for diffs], Sun May 28 13:07:21 2006 UTC (5 years, 11 months ago) by blymn
Branch: MAIN
Changes since 1.106: +10 -10 lines
Diff to previous 1.106 (colored)

Clean up bogus whitespace

Revision 1.104.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:27 2006 UTC (6 years ago) by tron
Branch: peter-altq
Changes since 1.104: +21 -2 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

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

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:00 2006 UTC (6 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104: +21 -2 lines
Diff to previous 1.104 (colored)

sync with head.

Revision 1.104.4.2 / (download) - annotate - [select for diffs], Thu May 11 23:28:47 2006 UTC (6 years ago) by elad
Branch: elad-kernelauth
Changes since 1.104.4.1: +17 -2 lines
Diff to previous 1.104.4.1 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

sync with head

Revision 1.106 / (download) - annotate - [select for diffs], Thu Apr 27 18:09:54 2006 UTC (6 years, 1 month ago) by jonathan
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.105: +17 -2 lines
Diff to previous 1.105 (colored)

Add an default entry to bge_majorrevs[] for bge chips with the 5780
ASIC revision.

Add (accidentally omitted) PCI product-ID entries for the BCM5780 and
BCM5780 (Serverworks HT-2000 to bge_products[], so that bge_probe()
will attach bcm5780 variants.  Tested on a bcm5780.

Handling for the bcm5780S with 1000base-X PHY  almost certainly has the
wrong quirks; our quirk entries are driven off ASIC ID. However, the
5780 (usually integral copper) and 5780S (TBI?)  have the same ASIC ID.
The Linux drivers ascertain whether to use integral copper phy or external
PHY via EEPROM bits.

I suspect the only way we're going to handle the 5780 vs. 5780S
properly is to add exact chip-id matches for all 5780/5780S variants
to bge_revisions[]. However, I don't know those ids until other users
with bcm5780s hardware can get this revision, try it, and report the output.
So, here  goes.

Revision 1.102.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:14 2006 UTC (6 years, 1 month ago) by simonb
Branch: simonb-timecounters
Changes since 1.102: +147 -248 lines
Diff to previous 1.102 (colored)

Sync with head.

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:25:34 2006 UTC (6 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.104: +6 -2 lines
Diff to previous 1.104 (colored)

sync with head.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Apr 18 14:53:43 2006 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.104: +6 -2 lines
Diff to previous 1.104 (colored)

PR/33828: Pawel Chwalowski: Add support for Broadcom BCM5789 chip

Revision 1.104 / (download) - annotate - [select for diffs], Sat Mar 4 19:20:50 2006 UTC (6 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.103: +142 -247 lines
Diff to previous 1.103 (colored)

Static'ify.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:21 2006 UTC (6 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored) next main 1.103 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Feb 22 15:18:55 2006 UTC (6 years, 3 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

In bge_ioctl(), don't call bge_init() if the interface is already up.
Makes ifwatchd work on this interface.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Dec 24 20:27:42 2005 UTC (6 years, 5 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.101: +6 -6 lines
Diff to previous 1.101 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.101 / (download) - annotate - [select for diffs], Mon Dec 19 12:35:19 2005 UTC (6 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

Typo in comment.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Dec 12 19:58:11 2005 UTC (6 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored)

Fix silly cut-and-paste typo (CSR_READ(sc, BGE_MARBMODE_ENABLE),
should obviously have been CSR_READ(sc, BGE_MARB_MODE) incurred during
my backport of 5714/5715 support from my netbsd-3 development branch,
back into -current.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Dec 12 00:40:44 2005 UTC (6 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.98: +30 -5 lines
Diff to previous 1.98 (colored)

Add support for bcm5714 and (possibly incorrect) support for the
bcm5715 PCI-Express dual-port NICs. Taken from the Broadcom-supplied
Linux driver, bcm-8.3.13a.

Add nascent support for the bcm5780, but (since I have no bcm5780 to
test), don't yet add an entry which allows us to match or attach to a
5780.

Change 5752 support: Follow the lead of the Broadcom-supplied Linux
driver (bcm) and the Linux tg3 driver, and treat the 5752 like a 5750.

Revision 1.42.2.12 / (download) - annotate - [select for diffs], Sun Dec 11 10:28:58 2005 UTC (6 years, 5 months ago) by christos
Branch: ktrace-lwp
Changes since 1.42.2.11: +335 -25 lines
Diff to previous 1.42.2.11 (colored) next main 1.43 (colored)

Sync with head.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Dec 7 04:43:05 2005 UTC (6 years, 5 months ago) by jonathan
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.97: +26 -3 lines
Diff to previous 1.97 (colored)

Add PCI device-ids to sys/dev/pci/pcidevs for newer Broadcom gigabit
ethernet devices: bcm5714, bcm5752 (previously the 5789, but fvdl
committed that whilst I was musing).

Add definitions to sys/dev/pci/if_bgereg.h for the Broadcom 57xx-family
ASIC revisions on these newer chips.

Add entries to the PCI-device-version and bge-internal-asic-revision
tables in sys/dev/pci/if_bge.c to use these new devices. Pending
further information, follow the lead of FreeBSD's if_bge.c driver and,
pending further info, treat these new chips as we do the 5750.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Dec 6 20:56:42 2005 UTC (6 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.96: +6 -2 lines
Diff to previous 1.96 (colored)

Match the 5789.

Revision 1.93.6.2 / (download) - annotate - [select for diffs], Tue Nov 29 21:23:14 2005 UTC (6 years, 5 months ago) by yamt
Branch: yamt-readahead
Changes since 1.93.6.1: +297 -20 lines
Diff to previous 1.93.6.1 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

sync with head.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Nov 24 13:47:46 2005 UTC (6 years, 6 months ago) by martin
Branch: MAIN
CVS Tags: yamt-readahead-base3
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

Use %zd for size_t. Noticed by Kurt Schreiner on current-users.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Nov 24 03:27:59 2005 UTC (6 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.94: +297 -20 lines
Diff to previous 1.94 (colored)

Add TSO support to bge(4) for PCI-Express bge devices, which are
shipped from the factory with TSO-capable firmware.  The TSO support
here may also work on 5705 chips, but that is (so far) untested.

TSO support written after careful reading of the Linux tg3 driver,
and (after attempting to deconstruct the cut-and-paste mess therein)
very close reading of the Broadcom-supplied Linux driver, particularly
the building of Tx-DMA buffer descriptors (bds). The TSO code herein was
then rewritten from scratch, circa 4am local time, October 27 2005.
(In other words: this is 4am software; caveat emptor.)

Other magic register settings in this patch are required; without
them, attepmting to use TSO locks up the chip. The required register
settings were extracted from the cited Linux drivers.

Note that TSO-capable firmware for the 5703/5704 is distributed in
non-GPL form with the aforementioned Linux drivers. Once the 5705 case
is debugged, (particularly the pseudo-header checksum precalculation
flagged with an XXX) downloading that TSO-capable firmware to the
5703/5704 should, in principle, enable TSO support on all but the
original bcm5700 (I forget if the 5701 can support TSO, or not).

Note also that the ``hard case '' of IP/TCP headers spanning more than
one mbuf is not handled; I haven't been able to trigger it.  In any
case, since TSO applies only to packets generated by the local TCP,
and our TCP always leaves space for TCP headers and a normal IP
header, TSO on an IP/TCP header spanning multiple headers can only
arise due to insertion of IP options. I beleive that we are clearly
better off outlawing that case, and requiring ip_insertoptions()
to  pull-up TCP headers on any packets with M_CSUM_TSOv4 set.

As far as I know, bge hardwar does not support TSO for IPv6.

Revision 1.87.2.4 / (download) - annotate - [select for diffs], Tue Nov 22 20:44:22 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.87.2.3: +10 -4 lines
Diff to previous 1.87.2.3 (colored) to branchpoint 1.87 (colored)

Pull up following revision(s) (requested by jonathan in ticket #985):
	sys/dev/pci/if_bgereg.h: revision 1.27
	sys/dev/pci/if_bge.c: revision 1.94
Correct a performance bug from Bill Paul's original FreeBSD bge(4) driver:
Each call to the FreeBSD bge_start() routine the transmit producer
pointer index from the chip mailbox register BGE_MBX_TX_HOST_PROD0_LO.
The local copy of that value is then updated by bge_encap() as
bge_encap() encapsulates packets in the Tx ring. If bge_encap()
succeds in encpuslating one or more packets, bge_start() tells the
chip to start sending the newly-encinitiates writes the new value back
to the chip mailbox register.
However, comparison of the Linux drivers (Broadcom-supplied and
open-source tg3.c) and to the OpenSolaris driver confirms that
register BGE_MBX_TX_HOST_PROD0_LO is write-only to software.
Thus, we can just keep a copy in the softc, and eliminate the
(expensive) PCI register write on each call to bge_start().
``Make it so''.

Revision 1.93.6.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:11 2005 UTC (6 years, 6 months ago) by yamt
Branch: yamt-readahead
Changes since 1.93: +12 -6 lines
Diff to previous 1.93 (colored)

sync with head.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Nov 15 06:05:44 2005 UTC (6 years, 6 months ago) by jonathan
Branch: MAIN
CVS Tags: yamt-readahead-base2
Changes since 1.93: +12 -6 lines
Diff to previous 1.93 (colored)

Correct a performance bug from Bill Paul's original FreeBSD bge(4) driver:

Each call to the FreeBSD bge_start() routine the transmit producer
pointer index from the chip mailbox register BGE_MBX_TX_HOST_PROD0_LO.
The local copy of that value is then updated by bge_encap() as
bge_encap() encapsulates packets in the Tx ring. If bge_encap()
succeds in encpuslating one or more packets, bge_start() tells the
chip to start sending the newly-encinitiates writes the new value back
to the chip mailbox register.

However, comparison of the Linux drivers (Broadcom-supplied and
open-source tg3.c) and to the OpenSolaris driver confirms that
register BGE_MBX_TX_HOST_PROD0_LO is write-only to software.
Thus, we can just keep a copy in the softc, and eliminate the
(expensive) PCI register write on each call to bge_start().

``Make it so''.

Revision 1.42.2.11 / (download) - annotate - [select for diffs], Thu Nov 10 14:06:01 2005 UTC (6 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.10: +17 -6 lines
Diff to previous 1.42.2.10 (colored)

Sync with HEAD. Here we go again...

Revision 1.87.2.3 / (download) - annotate - [select for diffs], Thu Sep 15 23:26:22 2005 UTC (6 years, 8 months ago) by snj
Branch: netbsd-3
CVS Tags: netbsd-3-0-RC2, netbsd-3-0-RC1
Changes since 1.87.2.2: +3 -3 lines
Diff to previous 1.87.2.2 (colored) to branchpoint 1.87 (colored)

Pull up following revision(s) (requested by tron in ticket #757):
	sys/dev/pci/if_bge.c: revision 1.93
Allow reception of VLAN sized frames. From FreeBSD.
Reviewed by cube.

Revision 1.87.2.2 / (download) - annotate - [select for diffs], Thu Sep 8 21:24:31 2005 UTC (6 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.87.2.1: +6 -2 lines
Diff to previous 1.87.2.1 (colored) to branchpoint 1.87 (colored)

Pull up following revision(s) (requested by gavan in ticket #752):
	sys/dev/pci/if_bgereg.h: revision 1.25
	sys/dev/pci/if_bge.c: revision 1.92
Add quirk for BGE_CHIPID_BCM5751_A1. From Kurt Schreiner <ks at ub.uni-mainz
dot de> via PR kern/31028.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Thu Sep 8 21:23:38 2005 UTC (6 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.87: +7 -2 lines
Diff to previous 1.87 (colored)

Pull up following revision(s) (requested by gavan in ticket #752):
	sys/dev/pci/if_bge.c: revision 1.91
Recognise Broadcom 5751M Gigabit Ethernet, as found on ThinkPad T43p.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Sep 6 15:42:21 2005 UTC (6 years, 8 months ago) by tsarna
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Allow reception of VLAN sized frames. From FreeBSD.

Reviewed by cube.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Aug 22 18:18:25 2005 UTC (6 years, 9 months ago) by gavan
Branch: MAIN
Changes since 1.91: +6 -2 lines
Diff to previous 1.91 (colored)

Add quirk for BGE_CHIPID_BCM5751_A1. From Kurt Schreiner <ks at ub.uni-mainz
dot de> via PR kern/31028.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Aug 21 21:32:26 2005 UTC (6 years, 9 months ago) by gavan
Branch: MAIN
Changes since 1.90: +7 -2 lines
Diff to previous 1.90 (colored)

Recognise Broadcom 5751M Gigabit Ethernet, as found on ThinkPad T43p.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Jun 20 02:49:18 2005 UTC (6 years, 11 months ago) by atatat
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.

Revision 1.89 / (download) - annotate - [select for diffs], Sun May 22 15:54:46 2005 UTC (7 years ago) by christos
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

No 0x in front of %p...

Revision 1.88 / (download) - annotate - [select for diffs], Mon May 2 15:34:32 2005 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.87: +5 -3 lines
Diff to previous 1.87 (colored)

split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx.

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:05 2005 UTC (7 years ago) by kent
Branch: kent-audio2
Changes since 1.80: +72 -55 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

sync with -current

Revision 1.81.2.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:10 2005 UTC (7 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.81.2.1: +33 -54 lines
Diff to previous 1.81.2.1 (colored) to branchpoint 1.81 (colored) next main 1.82 (colored)

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

Revision 1.42.2.10 / (download) - annotate - [select for diffs], Fri Mar 4 16:45:17 2005 UTC (7 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.9: +33 -54 lines
Diff to previous 1.42.2.9 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.87 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:32 2005 UTC (7 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.86: +28 -28 lines
Diff to previous 1.86 (colored)

nuke trailing whitespace

Revision 1.86 / (download) - annotate - [select for diffs], Mon Feb 21 02:12:48 2005 UTC (7 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

Define M_CSUM_DATA_IPv4_IPHL() and M_CSUM_DATA_IPv4_OFFSET() macros
to extract data from csum_data, rather than just open-coding it.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Feb 20 15:48:35 2005 UTC (7 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.84: +6 -27 lines
Diff to previous 1.84 (colored)

use VLAN_* macros for VLAN tag extraction/addition

also restructure and simplify input VLAN ID code handling somewhat, to not use
local have_vlan/vlan_tag variables, and use the appropriate cur_rx condition
on the one place where it's needed

Revision 1.84 / (download) - annotate - [select for diffs], Fri Feb 18 01:10:44 2005 UTC (7 years, 3 months ago) by heas
Branch: MAIN
CVS Tags: matt-timespec
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Adjust csum_data usage; mask off the high 16 bits.

Revision 1.81.2.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:47 2005 UTC (7 years, 3 months ago) by yamt
Branch: yamt-km
Changes since 1.81: +40 -2 lines
Diff to previous 1.81 (colored)

sync with head.

Revision 1.42.2.9 / (download) - annotate - [select for diffs], Fri Feb 4 11:46:37 2005 UTC (7 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.8: +41 -3 lines
Diff to previous 1.42.2.8 (colored)

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jan 26 22:15:26 2005 UTC (7 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (colored)

Missed a break in the powerhook (shouldn't matter functionally, but
fix anyway for correctness).

Revision 1.82 / (download) - annotate - [select for diffs], Wed Jan 26 21:52:47 2005 UTC (7 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.81: +39 -2 lines
Diff to previous 1.81 (colored)

Add powerhook to bge(4)

Revision 1.66.2.3.2.1 / (download) - annotate - [select for diffs], Mon Jan 24 21:41:20 2005 UTC (7 years, 4 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.66.2.3: +2 -1 lines
Diff to previous 1.66.2.3 (colored) next main 1.67 (colored)

Pull up revision 1.77 (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.81 / (download) - annotate - [select for diffs], Mon Jan 24 21:25:09 2005 UTC (7 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.

Revision 1.42.2.8 / (download) - annotate - [select for diffs], Mon Jan 17 19:31:24 2005 UTC (7 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.7: +7 -2 lines
Diff to previous 1.42.2.7 (colored)

Sync with HEAD.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jan 8 16:00:03 2005 UTC (7 years, 4 months ago) by fredb
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Branch point for: kent-audio2
Changes since 1.79: +7 -2 lines
Diff to previous 1.79 (colored)

Recognize the Broadcom 5721 Gigabit Ethernet, as found on SuperMicro P8SCi
motherboards.

Revision 1.42.2.7 / (download) - annotate - [select for diffs], Mon Nov 29 07:24:16 2004 UTC (7 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.6: +6 -2 lines
Diff to previous 1.42.2.6 (colored)

Sync with HEAD.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Nov 19 17:59:09 2004 UTC (7 years, 6 months ago) by jmmv
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

Fix typo in previous commit that was breaking the build (hi, tacha@!).

Revision 1.78 / (download) - annotate - [select for diffs], Fri Nov 19 10:17:17 2004 UTC (7 years, 6 months ago) by tacha
Branch: MAIN
Changes since 1.77: +6 -2 lines
Diff to previous 1.77 (colored)

Add support for Broadcom BCM5705K.

Revision 1.42.2.6 / (download) - annotate - [select for diffs], Tue Nov 2 07:52:10 2004 UTC (7 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.5: +95 -15 lines
Diff to previous 1.42.2.5 (colored)

Sync with HEAD.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Oct 30 18:09:22 2004 UTC (7 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +4 -3 lines
Diff to previous 1.76 (colored)

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

Fixes kern/27678.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Oct 28 07:36:05 2004 UTC (7 years, 6 months ago) by cube
Branch: MAIN
Changes since 1.75: +93 -14 lines
Diff to previous 1.75 (colored)

Add support for the BCM575x variants.  They're close to the 5705 one, with
some special cases for the PCI-Express versions.  As there is no
documentation available, all of this is inspired from Linux or taken from
FreeBSD (itself inspired from Linux).  There are a lot of magic numbers.

Tested on two BCM5751 devices as found in newer Dell computers.

Revision 1.42.2.5 / (download) - annotate - [select for diffs], Tue Oct 19 15:56:58 2004 UTC (7 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.4: +3 -3 lines
Diff to previous 1.42.2.4 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Wed Sep 29 11:22:03 2004 UTC (7 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

- mbuf external storage is of (caddr_t), not (caddr_t *).
- remove a needless cast.

Revision 1.42.2.4 / (download) - annotate - [select for diffs], Fri Sep 24 10:53:28 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.3: +3 -2 lines
Diff to previous 1.42.2.3 (colored)

Sync with HEAD.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Sep 21 21:57:30 2004 UTC (7 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.73: +3 -2 lines
Diff to previous 1.73 (colored)

introduce M_EXT_RW to allow mbuf external storage R/W.
discussed on tech-net@.

Revision 1.42.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:31:02 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.2: +2 -2 lines
Diff to previous 1.42.2.2 (colored)

Fix the sync with head I botched.

Revision 1.42.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:49:03 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.1: +0 -0 lines
Diff to previous 1.42.2.1 (colored)

Sync with HEAD.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:49:07 2004 UTC (7 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42: +869 -201 lines
Diff to previous 1.42 (colored)

Sync with HEAD

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Sat May 29 09:00:24 2004 UTC (7 years, 11 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.66.2.2: +7 -4 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Pull up revision 1.73 (requested by atatat in ticket #392):
Remaining sysctl descriptions under hw subtree (ath and bge)

Revision 1.73 / (download) - annotate - [select for diffs], Tue May 25 04:38:36 2004 UTC (8 years ago) by atatat
Branch: MAIN
Changes since 1.72: +7 -4 lines
Diff to previous 1.72 (colored)

Remaining sysctl descriptions under hw subtree (ath and bge)

Revision 1.72 / (download) - annotate - [select for diffs], Sat May 15 22:19:27 2004 UTC (8 years ago) by thorpej
Branch: MAIN
Changes since 1.71: +61 -2 lines
Diff to previous 1.71 (colored)

Add PAUSE-related event counters.  Slightly modified from patch supplied by
HITOSHI Osada.

Revision 1.71 / (download) - annotate - [select for diffs], Sat May 15 21:58:40 2004 UTC (8 years ago) by thorpej
Branch: MAIN
Changes since 1.70: +15 -5 lines
Diff to previous 1.70 (colored)

Patches from HITOSHI Osada:
* Set buffer management high water marks for MTU > 1514.
* Set BGE_MAX_RX_FRAME_LOWAT (from Linux driver).

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Thu May 13 20:18:09 2004 UTC (8 years ago) by jdc
Branch: netbsd-2-0
Changes since 1.66.2.1: +11 -7 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.70 (requested by tron in ticket #316)

Add support for Broadcom BCM5788 GbE. Patches supplied by FUKAUMI Naoki
in PR kern/25166.

Revision 1.70 / (download) - annotate - [select for diffs], Wed May 12 07:07:34 2004 UTC (8 years ago) by tron
Branch: MAIN
Changes since 1.69: +11 -7 lines
Diff to previous 1.69 (colored)

Add support for Broadcom BCM5788 GbE. Patches supplied by FUKAUMI Naoki
in PR kern/25166.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Apr 10 19:23:49 2004 UTC (8 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.68: +50 -5 lines
Diff to previous 1.68 (colored)

Add 802.3x flow control support.  From HITOSHI Osada.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Apr 6 08:48:55 2004 UTC (8 years, 1 month ago) by keihan
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

s/netbsd.org/NetBSD.org/g

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Mon Apr 5 20:47:05 2004 UTC (8 years, 1 month ago) by tron
Branch: netbsd-2-0
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Pull up revision 1.67 (requested by jonathan in ticket #59):
Fix mistaken arguments to bge_set_thresh(); the prior revision would
pass the bge_softc * to a function expecting the struct ifnet*,
triggering a panic every time the Rx-mitigation value is changed via sysctl.
(Testing via kernel debugger before Andrew's recent sysctl(9) changes
was done with the exact same mistaken argument.)

Revision 1.67 / (download) - annotate - [select for diffs], Sun Apr 4 00:43:25 2004 UTC (8 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Fix mistaken arguments to bge_set_thresh(); the prior revision would
pass the bge_softc * to a function expecting the struct ifnet*,
triggering a panic every time the Rx-mitigation value is changed via sysctl.
(Testing via kernel debugger before Andrew's recent sysctl(9) changes
was done with the exact same mistaken argument.)

Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 27 04:37:59 2004 UTC (8 years, 2 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.65: +6 -4 lines
Diff to previous 1.65 (colored)

GC ath_node_root as well, but modify to work around the single
(tightly scoped) reason for recording the node address by recording
the assigned number.  Dink pci/if_bge.c to match, since ic/ath.c was
used as the archetype.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Mar 27 04:25:12 2004 UTC (8 years, 2 months ago) by atatat
Branch: MAIN
Changes since 1.64: +4 -8 lines
Diff to previous 1.64 (colored)

GC bge_node_root, since it's not needed and probably wrong.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 27 01:17:49 2004 UTC (8 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.63: +84 -3 lines
Diff to previous 1.63 (colored)

Update yesterday's if_bge sysctl hooks for hw.bge.* (based on
yesterday's sys/dev/ic/ath.c) to match today's ath.c driver.
Commit now in the hope that Andrew Brown will pick up this file for
any more pending changes.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Mar 20 02:04:07 2004 UTC (8 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.62: +104 -2 lines
Diff to previous 1.62 (colored)

Add a table of Rx interrupt-threshold register values for mitigating
Rx interrupts, functions to post a request for new table entries, and
code to apply pending Rx-interrupt control values at the next hardware
interrupt.

As used in a third-party proprietary tree since at least March 2003.
As discussed on tech-kern/tech-net in January 2004 (in the context of
NetBSD for packet capture, bpf, and FreeBSD-sylte IFF_POLL), and as
posted to tech-net for comments in mid-March 2004.

Still missing sysctl or other knobs to acutally change the config-time
values, due to my ignorance of any accepted per-device sysctl namespace.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Mar 20 01:58:51 2004 UTC (8 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.61: +6 -4 lines
Diff to previous 1.61 (colored)

Possibloe fix for some bge chip revisions taking a long time to reset
(e.g., polling for a half-second or more at splnet(), blocking most
interrupts, durin an ifconfig down/ifconfig up).

Appears to help for a 5704C rev A3, which is the only chip I've
ever seen that had even a mild version of the reported problem.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Mar 20 01:42:21 2004 UTC (8 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.60: +10 -5 lines
Diff to previous 1.60 (colored)

Check for BGE_PCI_PCISTATE register failing to revert on reset.
if it occurs, print a message indicating why the reset took so long.

Revision 1.29.2.7 / (download) - annotate - [select for diffs], Mon Mar 15 05:45:09 2004 UTC (8 years, 2 months ago) by jmc
Branch: netbsd-1-6
Changes since 1.29.2.6: +5 -1 lines
Diff to previous 1.29.2.6 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored)

Pullup rev 1.59 (requested by martin in ticket #1622)

Set BGE_JUMBO_RXRING_VALID in bge_flags when allocating jumbo ring buffers
so it can be freed later. PR#24686

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 10 18:46:10 2004 UTC (8 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

use "=" instead of "|=" on first assignment to mbuf.csum_flags
(probably unnecessary because zero-initialized on mget, but
cheaper anyway)

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 6 17:42:43 2004 UTC (8 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.58: +6 -2 lines
Diff to previous 1.58 (colored)

Set BGE_JUMBO_RXRING_VALID in bge_flags when allocating jumbo ring buffers,
so it can be freed later. From HITOSHI Osada in PR kern/24686.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jan 22 02:29:46 2004 UTC (8 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.57: +17 -2 lines
Diff to previous 1.57 (colored)

Add hooks to dynamically change the bge Rx interrupt thresholds.  I
found empiricaly that (at least on bcm5700s) the Rx coalesce and bd
counts cannot be updated on-the-fly; attempting to do so (even at
splhigh()) causes weird behaviour.

Instead, add a softc flag to record that the desired softc values for
Rx-interrupt thresholds have changed; check that boolean in the interrupt
routine. If set, apply the new values there and clear the flag.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Dec 14 03:08:12 2003 UTC (8 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.56: +4 -8 lines
Diff to previous 1.56 (colored)

Do 5704-specific setup of DMA control register for all 5704 variants,
including chips that matched only the asic-revision  fallback table.

When dong DMA setup for 5703 and 5704, use the new BGE_ASICREV() macro
to extract the ASIC revision.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Dec 9 15:19:33 2003 UTC (8 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.55: +5 -4 lines
Diff to previous 1.55 (colored)

The highest 16 bits of chipid identify the ASIC, so print only them.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Dec 8 17:09:39 2003 UTC (8 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.54: +9 -1 lines
Diff to previous 1.54 (colored)

Match 5703 ASIC A3.

Also, when printing the ASIC ID, print the revision in hex in all
cases to avoid extra confusion if only the "superclass" of the ASIC
is recognized.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Nov 11 22:28:58 2003 UTC (8 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.53: +18 -12 lines
Diff to previous 1.53 (colored)

From FreeBSD:

* erratum: disable the nocrc RX bit, as it may cause problems on the 570{1-4}.
  adjust the length of the incoming packet accordingly to trim it.
* the 5704 has a smaller MBUF_POOL, so set a smaller value

Local change:
* Pass the autoneg force flag to mii_attach. Some PHYs need to be kicked
  out of their falsely autoneged 10baseT state with this.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Oct 30 01:58:17 2003 UTC (8 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.52: +2 -5 lines
Diff to previous 1.52 (colored)

Remove some assigned-to but otherwise unused variables.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Oct 23 20:36:36 2003 UTC (8 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.51: +5 -3 lines
Diff to previous 1.51 (colored)

Need the NOCRC bit, or my 5704B5 will start acting up.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Oct 23 17:41:59 2003 UTC (8 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.50: +140 -53 lines
Diff to previous 1.50 (colored)

* match more cards (from FreeBSD)
* don't set the NOCRC bit in the mode control register, it can cause
  problems on some chips (from the broadcom errata via FreeBSD)
* implement a fallback quirktable that is searched only using the
  major asic revision, so that the driver has a shot at supporting
  newer versions properly without modification
* rename asicrev -> chipid, like the FreeBSD driver

Revision 1.29.2.6 / (download) - annotate - [select for diffs], Mon Oct 20 05:02:44 2003 UTC (8 years, 7 months ago) by cyber
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.29.2.5: +1 -4 lines
Diff to previous 1.29.2.5 (colored) to branchpoint 1.29 (colored)

Pull up revision 1.50 (requested by tron in ticket #1447):
From FreeBSD as suggested by Nicolas Joly in PR kern/22682:
Do not initalize the LED's to 0x00.  The default configuration
the chip comes up in should yeild proper operation of the LED's.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Sep 5 08:53:23 2003 UTC (8 years, 8 months ago) by tron
Branch: MAIN
Changes since 1.49: +2 -5 lines
Diff to previous 1.49 (colored)

From FreeBSD as suggested by Nicolas Joly in PR kern/22682:
Do not initalize the LED's to 0x00.  The default configuration
the chip comes up in should yeild proper operation of the LED's.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Aug 27 23:13:50 2003 UTC (8 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.48: +8 -3 lines
Diff to previous 1.48 (colored)

Support the BCM5704C rev 3. From Nicolas Joly, PR 22620

Revision 1.48 / (download) - annotate - [select for diffs], Tue Aug 26 10:17:02 2003 UTC (8 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Finish last commit (Make this compile with options DEBUG).
NetBSD has no M_WRITABLE().

Revision 1.47 / (download) - annotate - [select for diffs], Sat Aug 23 20:37:18 2003 UTC (8 years, 9 months ago) by cjep
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

Make this compile with options DEBUG (part of PR#22582 from Frank Kardel).

Revision 1.46 / (download) - annotate - [select for diffs], Fri Aug 22 03:32:35 2003 UTC (8 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.45: +93 -14 lines
Diff to previous 1.45 (colored)

Check in hooks to fix checksum offload on bge devices. Empirical
observation is that some 570x devices can get themselves into a state
where they miscompute off-loaded TCP or UDP checksums on packets so
small that Ethernet padding is required.  Further obsevation suggests
that the bge checksum-offload hardware is adding those padding bytes
into its TCP checksum computation. (Once a 5700 gets in this state,
even a warm boot won't fix it: it needs a hard powerdown.)

Work around the problem by padding such runts with zeros: even if the
checksum-offload adds in extra zeros, the resulting sum will be correct.

Also, dont trust the checksum-offload on received packets smaller than
the minimum ethernet frame, in case the Rx-side has a similar bug.

Finally, on packets where we do trust the outboard Rx-side TCP or UDP
checksum, the bge did not include the pseudo-header. Set the
M_CSUM_NO_PSEUDOHDR bit as well as M_CSUM_DATA, and rely on
udp_input() or tcp_input() adding in the sum via in_cksum_phdr().

Revision 1.45 / (download) - annotate - [select for diffs], Fri Aug 22 03:03:20 2003 UTC (8 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.44: +123 -46 lines
Diff to previous 1.44 (colored)

Fix a bug in compaction of `DMA runt' fragmented packet chains:
if we m_dup() a packet to compactify it, and later run out of DMA
descriptors, bge_encap() will return ENOBUFS, hoping the driver will
try again later.  But we have just m_freem()'d the original chain
which was m_dup()'d, leaving a pointer to the just-freed packet header
in the tx queue.

Fix by always walking the chain, shuffling data towards the head;
except if we find a runt in the very last mbuf, we must borrow data
from its predecessor.

(Patch is verbatim from a third-party tree, apologies for any style woes.)

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jul 17 11:44:27 2003 UTC (8 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.43: +165 -83 lines
Diff to previous 1.43 (colored)

Add support for the BCM5705:
- Only BCM5705M asic rev A1 was tested.

Thanks to Bill Paul (wpaul@freebsd.org) for help and support.

Approved by: Frank van der Linden <fvdl@netbsd.org>

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 14 15:47:24 2003 UTC (8 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.42: +4 -1 lines
Diff to previous 1.42 (colored)

add missing __KERNEL_RCSID()

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jun 30 13:20:21 2003 UTC (8 years, 10 months ago) by ragge
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Set the send queue to max(BGE_TX_RING_CNT - 1, IFQ_MAXLEN); sometimes
IFQ_MAXLEN may be choosen to a larger value than number of descriptors.
Why this setting from the beginning???

Revision 1.29.2.5 / (download) - annotate - [select for diffs], Mon Jun 16 13:23:30 2003 UTC (8 years, 11 months ago) by grant
Branch: netbsd-1-6
Changes since 1.29.2.4: +10 -4 lines
Diff to previous 1.29.2.4 (colored) to branchpoint 1.29 (colored)

Pull up revision 1.35 (requested by tron in ticket #1250):

Commit the FreeBSD alternative of a private patch to check NIC internal
ram for using TBI, versus MII/GMII.

FreeBSD commit log and versions:
   Obtain the media type from the shared memory and only use the eeprom
   as a fallback.

   if_bge.c:	rev 1.30
   if_bgereg.h:	rev 1.13

Thanks to Paul Saab @mu.org.

Revision 1.29.2.4 / (download) - annotate - [select for diffs], Mon Jun 16 13:20:21 2003 UTC (8 years, 11 months ago) by grant
Branch: netbsd-1-6
Changes since 1.29.2.3: +28 -35 lines
Diff to previous 1.29.2.3 (colored) to branchpoint 1.29 (colored)

Pull up revision 1.34 (requested by tron in ticket #1249):

FreeBSD fix for problems reported (to FreeBSD) with 16-bit accesses
to 32-bit device registers. Add (untested) NetBSD fix for big-endian hosts.
From FreeBSD versions:
	if_bge.c:	1.26 and 1.27
	if_bgereg.h: 1.12

FreeBSD (MFC) comment:

MFC:  Avoid 16-bit accesses to device memory.  Use volatile where
appropriate in referencing device memory.  Parenthesize BGE_HOSTADDR
define properly.

Revision 1.29.2.3 / (download) - annotate - [select for diffs], Mon Jun 16 13:04:42 2003 UTC (8 years, 11 months ago) by grant
Branch: netbsd-1-6
Changes since 1.29.2.2: +1 -5 lines
Diff to previous 1.29.2.2 (colored) to branchpoint 1.29 (colored)

Pull up revision 1.38 (requested by tron in ticket #1230):

Don't print a kernel message like "bge0: gigabit link up" when a Gigabit
link is detected. No other ethernet driver does this and this driver
doesn't do it for other modes.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jun 15 23:09:08 2003 UTC (8 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.40: +5 -2 lines
Diff to previous 1.40 (colored)

Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jun 1 20:26:14 2003 UTC (8 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.39: +12 -2 lines
Diff to previous 1.39 (colored)

Add newer 5704 asic revs, and add them to the table, with the
BGE_QUIRK_ONLY_PHY_1 quirk in their entry.

Revision 1.39 / (download) - annotate - [select for diffs], Sat May 3 18:11:34 2003 UTC (9 years ago) by wiz
Branch: MAIN
Changes since 1.38: +8 -8 lines
Diff to previous 1.38 (colored)

DMA, not dma nor Dma.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 24 12:06:05 2003 UTC (9 years, 2 months ago) by tron
Branch: MAIN
Changes since 1.37: +1 -5 lines
Diff to previous 1.37 (colored)

Don't print a kernel message like "bge0: gigabit link up" when a Gigabit
link is detected. No other ethernet driver does this and this driver
doesn't do it for other modes.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Mar 7 18:57:53 2003 UTC (9 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.36: +41 -8 lines
Diff to previous 1.36 (colored)

Commit workaround for hardware bug: 5701 chips running in PCI-X mode
require that the DMA receive buffers be aligned. The driver was
deliberately mis-aligning by 2 bytes, to force the layer-2/3
headers to 32-bit alignment.

Workaround: if chip is a 5701, and is in PCI-X mode, leave the DMA
buffers aligned.  If the host CPU requires alignment, copy the buffer
after reception to force aligment.

Tested  on an i386 in  PCI-X bus, with __NO_STRICT_ALIGNMENT forced off.

Patch and comments reworked  to minimize drift from
	FreeBSD if_bge.c rev 1.14.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Mar 7 18:40:18 2003 UTC (9 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Fix typo: PRODUCER_BUG quirk mask overlapped the PCIX register-bug quirk.
(Harmless, since we dont use the latter; but we will use it very soon.)

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 6 20:53:05 2003 UTC (9 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.34: +10 -4 lines
Diff to previous 1.34 (colored)

Commit the FreeBSD alternative of a private patch to check NIC internal
ram for using TBI, versus MII/GMII.

FreeBSD commit log and versions:
   Obtain the media type from the shared memory and only use the eeprom
   as a fallback.

   if_bge.c:	rev 1.30
   if_bgereg.h:	rev 1.13

Thanks to Paul Saab @mu.org.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Mar 6 20:12:53 2003 UTC (9 years, 2 months ago) by jonathan
Branch: MAIN
Changes since 1.33: +28 -35 lines
Diff to previous 1.33 (colored)

FreeBSD fix for problems reported (to FreeBSD) with 16-bit accesses
to 32-bit device registers. Add (untested) NetBSD fix for big-endian hosts.
From FreeBSD versions:
	if_bge.c:	1.26 and 1.27
	if_bgereg.h: 1.12

FreeBSD (MFC) comment:

MFC:  Avoid 16-bit accesses to device memory.  Use volatile where
appropriate in referencing device memory.  Parenthesize BGE_HOSTADDR
define properly.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Feb 22 04:57:49 2003 UTC (9 years, 3 months ago) by tsutsui
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

hz -> Hz

Revision 1.32 / (download) - annotate - [select for diffs], Sun Feb 9 10:06:16 2003 UTC (9 years, 3 months ago) by tron
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Correct typo in an e-mail address.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 31 05:00:24 2003 UTC (9 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Change ext_size to a size_t, and update the signature of ext_free.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 31 01:03:35 2003 UTC (9 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +23 -19 lines
Diff to previous 1.29 (colored)

Use aprint_*().

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Tue Jan 28 06:19:13 2003 UTC (9 years, 3 months ago) by jmc
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.29.2.1: +3206 -0 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored)

Pullup from -current (lots of revisions 1.1-1.19,1.22-1.27
(requested by fvdl in ticket #1126)
 Pullup support for bge device. (Broadcom Gigabit Ethernet)

Revision 1.19.2.5 / (download) - annotate - [select for diffs], Fri Jan 17 16:31:39 2003 UTC (9 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.19.2.4: +271 -26 lines
Diff to previous 1.19.2.4 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored)

Sync with HEAD.

Revision 1.29.2.1, Fri Jan 17 08:27:35 2003 UTC (9 years, 4 months ago) by jmc
Branch: netbsd-1-6
Changes since 1.29: +0 -3206 lines
FILE REMOVED

file if_bge.c was added on branch netbsd-1-6 on 2003-01-28 06:19:13 +0000

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 17 08:27:35 2003 UTC (9 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Branch point for: netbsd-1-6
Changes since 1.28: +19 -19 lines
Diff to previous 1.28 (colored)

correct the use of m_tag.  correct indentation (:set sw=8 ts=8 please,
jonathan)

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jan 17 08:11:50 2003 UTC (9 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.27: +11 -10 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Fri Jan 17 00:24:29 2003 UTC (9 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.26: +2 -3 lines
Diff to previous 1.26 (colored)

Grr. Fix consistent typo, to match what i actually tested before committing.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 17 00:11:00 2003 UTC (9 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)

Enable the 5700 DMA bug and producer-pointer fixes, by setting the
quirk on all 5700 revision B devices. (These fixes have not been
tested against NetBSD recently; committing the fix and the enable separately
gives us flexibility about which fixes get pulled into the NetBSD-1.6 branch.)

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 17 00:02:56 2003 UTC (9 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.24: +255 -10 lines
Diff to previous 1.24 (colored)

Commit accumulated bge fixes:
 * Add support for 5704C dual-channel chip with integral copper PHY (tested)
   and 5704S dual-channel SERDES/TBI gbic  (untested).  Add PHY DSP patch
   for 5704.
 * Update PHY DSP-code patch for bcm5401 to match latest Linux driver.

 * Add PHY DSP-code patch for 5703 (untested).

 * Update onchip buffer tunables to recommended values from Linux drivers.

 * Disable MWI access.  This chip family cannot hanlde PCI stalls
   in the middle of an MWI burst. The driver has heuristics to detect PCI
   line size, but under load, some PCI bridges may force stalls which
   the attach-time heruistics do not catch. Some PCI bridges never
   do this, so maybe it should be a  tunable option.

*  bcm5700 rev Bx chips have a race condition, where updating the
   Tx producer pointer goes un-noticed by the chip.  Workaround is to
   write the new producer-pointer value twice.

*  bcm5700 chips rev Bx wedge up if given  DMA descriptors of
   eight bytes or less. Once hit, only reovery is a watchdog timeout/reset.
   If the offending packet is retransmitted, the chip will wedge again...
   Check for teeny fragments in a Tx request, and either fold the
   teeny chunk residue into an adjacent mbuf, or m_dup the entire buffer.
   (NB: quirk not yet enabled; in-place folding tested only on FreeBSD.)

 * Add workaround for revision Bx bcm5700: chip bugs in decoding
   of PCI register writes may leave the hardware in (partial) powersave state,
   such that  writes to "indirect" registers do not work.
   Explicitly force chip into D0 state at attach time.

 * Accessing PHY registers with the bge chip in autopoll mode, when
   link-state is the process of changing, may cause the bge chip to
   assert PCI errors.   Workaround:   when doing miibus register access,
   save autopoll state, disable around access, and restore autopoll state.
   NB: issuing PHY resets may give a window where the problem still occurs.

 * Increase Tx interrupt-coalescing thresholds, to reduce Tx-done interrupts.

Revision 1.19.2.4 / (download) - annotate - [select for diffs], Sun Dec 29 20:49:22 2002 UTC (9 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.19.2.3: +30 -7 lines
Diff to previous 1.19.2.3 (colored) to branchpoint 1.19 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Dec 26 20:55:30 2002 UTC (9 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.23: +30 -7 lines
Diff to previous 1.23 (colored)

Recognize BCM5702X and BCM5703X.  Add a ONLY_PHY_1 quirk and use it.
Add support for getting the macaddr for 5703 (taken from FreeBSD).

Revision 1.19.2.3 / (download) - annotate - [select for diffs], Fri Oct 18 02:43:02 2002 UTC (9 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.19.2.2: +5 -6 lines
Diff to previous 1.19.2.2 (colored) to branchpoint 1.19 (colored)

Catch up to -current.

Revision 1.19.4.3 / (download) - annotate - [select for diffs], Thu Oct 10 18:40:38 2002 UTC (9 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.19.4.2: +3 -4 lines
Diff to previous 1.19.4.2 (colored) to branchpoint 1.19 (colored) next main 1.20 (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.23 / (download) - annotate - [select for diffs], Sun Oct 6 23:34:56 2002 UTC (9 years, 7 months ago) by kristerw
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Do not try to print uninitialized variable.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 2 16:51:18 2002 UTC (9 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Add trailing ; to CFATTACH_DECL.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Sep 30 20:37:25 2002 UTC (9 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +3 -4 lines
Diff to previous 1.20 (colored)

Use CFATTACH_DECL().

Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 27 20:40:01 2002 UTC (9 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Declare all cfattach structures const.

Revision 1.19.4.2 / (download) - annotate - [select for diffs], Fri Sep 6 08:45:14 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.19.4.1: +2939 -0 lines
Diff to previous 1.19.4.1 (colored) to branchpoint 1.19 (colored)

sync kqueue branch with HEAD

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Thu Aug 1 02:45:14 2002 UTC (9 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.19.2.1: +2939 -0 lines
Diff to previous 1.19.2.1 (colored) to branchpoint 1.19 (colored)

Catch up to -current.

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Sat Jul 20 11:35:08 2002 UTC (9 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18.2.2: +2 -2 lines
Diff to previous 1.18.2.2 (colored) next main 1.19 (colored)

catch up with -current.

Revision 1.19.4.1, Thu Jul 18 02:07:13 2002 UTC (9 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.19: +0 -2939 lines
FILE REMOVED

file if_bge.c was added on branch kqueue on 2002-09-06 08:45:14 +0000

Revision 1.19.2.1, Thu Jul 18 02:07:13 2002 UTC (9 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.19: +0 -2939 lines
FILE REMOVED

file if_bge.c was added on branch nathanw_sa on 2002-08-01 02:45:14 +0000

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 18 02:07:13 2002 UTC (9 years, 10 months ago) by mjl
Branch: MAIN
CVS Tags: gehenna-devsw-base
Branch point for: nathanw_sa, kqueue
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Correct obviously switched args to memset()

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:35:36 2002 UTC (9 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18.2.1: +2939 -0 lines
Diff to previous 1.18.2.1 (colored)

catch up with -current.

Revision 1.18.2.1, Sat Jul 13 22:48:40 2002 UTC (9 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18: +0 -2939 lines
FILE REMOVED

file if_bge.c was added on branch gehenna-devsw on 2002-07-15 10:35:36 +0000

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jul 13 22:48:40 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Branch point for: gehenna-devsw
Changes since 1.17: +7 -5 lines
Diff to previous 1.17 (colored)

Add a BGE_QUIRK_CSUM_BROKEN quirk, and give it to BCM5700 B0, rather
than testing for the revision all over the driver.  If the chip has
broken checksums, then don't advertise the capability to the stack.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jul 13 22:31:18 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.16: +13 -11 lines
Diff to previous 1.16 (colored)

Give BCM5700 Ax and Bx revs the BGE_QUIRK_LINK_STATE_BROKEN quirk,
and test for that, rather than checking revision where the quirk is
handled.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jul 13 22:21:20 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +96 -11 lines
Diff to previous 1.15 (colored)

Add a lookup table with ASIC revision, name, and any quirks.  Print
ASIC revision at attach time.  Add BCM5703 revisions.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jul 13 01:23:27 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +1 -51 lines
Diff to previous 1.14 (colored)

Move the BCM5401 DSP patch out of the bge driver and into
the brgphy driver; all users of the BCM5400 and BCM5401 need
the DSP patch and the sledgehammer-reset-at-media-set-time.

Also add a DSP patch for the BCM5411 gleaned from Apple's
GMAC driver for Darwin.

Tested with a 3Com 3c996-T (BCM5700 + BCM5401).

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 12 22:29:14 2002 UTC (9 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

Match Altima AC1001.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jul 1 22:42:47 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.12: +28 -32 lines
Diff to previous 1.12 (colored)

Fix multicast filter programming.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 28 18:46:46 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.11: +8 -3 lines
Diff to previous 1.11 (colored)

Fix a comment.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 28 18:44:45 2002 UTC (9 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.10: +39 -20 lines
Diff to previous 1.10 (colored)

When stopping the various functional blocks of the chip, clear the
bit and then read it back in a loop (with appropriate delays) waiting
for it to read back clear.

This fixes a problem where the bus would hang when bringing down
the interface or changing interface flags on a system with a
sufficiently fast CPU (e.g. 2GHz P4 Xeon).

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jun 28 18:39:45 2002 UTC (9 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.9: +4 -3 lines
Diff to previous 1.9 (colored)

Rearrange alignment code a bit.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 28 01:10:06 2002 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Increase previously added delays from 2us to 10us.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 28 00:55:20 2002 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.7: +7 -23 lines
Diff to previous 1.7 (colored)

* Only set the jumbo frame capability if we are able to allocate
  jumbo frame buffers.
* Garbage-collect some stuff we don't need.
* Fix timeout detection in the firmware handshake.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 27 23:56:20 2002 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +66 -33 lines
Diff to previous 1.6 (colored)

Use a table to match BCM570x products.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jun 27 23:21:34 2002 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored)

Don't call m_aux_find() in the inner loop when creating the Tx
descriptor list.  Instead, call it once and remember the result,
and only call it looking for VLAN tags if VLANs are configured
on the interface.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jun 27 22:31:30 2002 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

Put some delay in the loops that poll for MII transaction
completion.  Without this, reading the PHY can hang the bus
on a sufficiently fast CPU.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 27 22:10:11 2002 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

Disable TCP/UDP checksums on the receive side again.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 10:48:18 2002 UTC (9 years, 11 months ago) by cjs
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored)

Match newer NetGear GA302T cards.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jun 24 01:23:11 2002 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.1: +13 -16 lines
Diff to previous 1.1 (colored)

According to the Linux driver from Broadcom, only the 5700 B0 revision had
rx checksum problems. So only disable rx checksum for that revision.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jun 22 14:42:07 2002 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN

Driver for Broadcom 570x / Altima AC 1000 gigabit ethernet cards.
Written by Bill Paul for FreeBSD. This port started out with the
port done to OpenBSD by nate@openbsd.org, but ended up looking much
more like the port of the ti driver done by drochner@netbsd.org
(they are similar in structure).

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>