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.391 / (download) - annotate - [select for diffs], Mon Apr 1 22:56:55 2024 UTC (2 weeks, 2 days ago) by andvar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.390: +3 -3 lines
Diff to previous 1.390 (colored) to selected 1.104.6.1 (colored)

s/Doucments/Documents/ in comment.

Revision 1.390 / (download) - annotate - [select for diffs], Fri Feb 9 22:08:35 2024 UTC (2 months, 1 week ago) by andvar
Branch: MAIN
Changes since 1.389: +6 -6 lines
Diff to previous 1.389 (colored) to selected 1.104.6.1 (colored)

fix spelling mistakes, mainly in comments and log messages.

Revision 1.389 / (download) - annotate - [select for diffs], Tue Aug 1 20:46:01 2023 UTC (8 months, 2 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.388: +3 -3 lines
Diff to previous 1.388 (colored) to selected 1.104.6.1 (colored)

s/diabled/disabled/ in comments.

Revision 1.388 / (download) - annotate - [select for diffs], Tue Oct 11 22:03:37 2022 UTC (18 months ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.387: +4 -4 lines
Diff to previous 1.387 (colored) to selected 1.104.6.1 (colored)

fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and
s/bus_dmamem_load/bus_dmamap_load/.
Inspired by recent similar fixes in OpenBSD.

Revision 1.387 / (download) - annotate - [select for diffs], Sun Sep 4 08:55:43 2022 UTC (19 months, 2 weeks ago) by skrll
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.386: +5 -5 lines
Diff to previous 1.386 (colored) to selected 1.104.6.1 (colored)

bge(4): Use BUS_DMA_WAITOK in ring initilization now that it's safe

Revision 1.386 / (download) - annotate - [select for diffs], Sun Sep 4 08:50:25 2022 UTC (19 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.385: +94 -52 lines
Diff to previous 1.385 (colored) to selected 1.104.6.1 (colored)

bge(4): fix the MP improvements and improve some more.

- Have two locks sc_core_lock at IPL_NONE and sc_intr_lock at IPL_NET and
  use appropriately.

- Use stopping flags instead of bge_if_flags so that bge_if_flags only
  needs to be protected by the sc_core_lock

- Use ifmedia_init_with_lock and provide the sc_intr_lock. mii operatiions
  are done from the interrupt handler.

- Fixup locking in bge_detach.

- Rename bge_watchdog to bge_watchdog_tick to avoid confusion with the
  if_watchdog method.

- Sprinkle some more asserts.

Revision 1.385 / (download) - annotate - [select for diffs], Sun Sep 4 08:42:02 2022 UTC (19 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.384: +9 -9 lines
Diff to previous 1.384 (colored) to selected 1.104.6.1 (colored)

bge(4): use a local variable to make bge_ifmedia initialization pretty.

NFC

Revision 1.384 / (download) - annotate - [select for diffs], Sat Aug 27 06:32:53 2022 UTC (19 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.383: +4 -4 lines
Diff to previous 1.383 (colored) to selected 1.104.6.1 (colored)

Convert bge_pending_rxintr_change to a bool (from int)

Revision 1.383 / (download) - annotate - [select for diffs], Sat Aug 27 06:12:14 2022 UTC (19 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.382: +2 -9 lines
Diff to previous 1.382 (colored) to selected 1.104.6.1 (colored)

Include headers once (and don't pretend this compiles without INET)

Revision 1.382 / (download) - annotate - [select for diffs], Sat Aug 27 05:35:17 2022 UTC (19 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.381: +3 -3 lines
Diff to previous 1.381 (colored) to selected 1.104.6.1 (colored)

Correct the abbreviation of approximately to 'approx.'

Revision 1.381 / (download) - annotate - [select for diffs], Thu Aug 25 06:43:30 2022 UTC (19 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.380: +2 -11 lines
Diff to previous 1.380 (colored) to selected 1.104.6.1 (colored)

G/C

Revision 1.380 / (download) - annotate - [select for diffs], Fri Aug 19 07:52:22 2022 UTC (19 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.379: +3 -3 lines
Diff to previous 1.379 (colored) to selected 1.104.6.1 (colored)

Make bge_detaching a bool. NFC.

Revision 1.379 / (download) - annotate - [select for diffs], Fri Aug 19 07:48:43 2022 UTC (19 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.378: +4 -4 lines
Diff to previous 1.378 (colored) to selected 1.104.6.1 (colored)

softc member naming consistency with wm(4). (Taylor made me do it... not
really)

Revision 1.378 / (download) - annotate - [select for diffs], Fri Aug 19 07:43:54 2022 UTC (19 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.377: +3 -3 lines
Diff to previous 1.377 (colored) to selected 1.104.6.1 (colored)

Should be checking ifp->if_flags in bge_init and not sc->bge_if_flags.

Spotted by Taylor.

Revision 1.377 / (download) - annotate - [select for diffs], Sun Aug 14 09:04:17 2022 UTC (20 months ago) by skrll
Branch: MAIN
Changes since 1.376: +11 -11 lines
Diff to previous 1.376 (colored) to selected 1.104.6.1 (colored)

bge: Use BUS_DMA_WAITOK in attach routines.

Revision 1.376 / (download) - annotate - [select for diffs], Sun Aug 14 09:03:05 2022 UTC (20 months ago) by skrll
Branch: MAIN
Changes since 1.375: +95 -82 lines
Diff to previous 1.375 (colored) to selected 1.104.6.1 (colored)

bge: Mirror the bus_dma RX buffer changes in the OpenBSD driver

This change reduces the amount of work done in the interrupt handler.

Revision 1.375 / (download) - annotate - [select for diffs], Sun Aug 14 09:01:25 2022 UTC (20 months ago) by skrll
Branch: MAIN
Changes since 1.374: +221 -87 lines
Diff to previous 1.374 (colored) to selected 1.104.6.1 (colored)

Make bge(4) MP safe

This started out as a fix so that LOCKDEBUG wouldn't explode with kernel
lock spinout.  LOCKDEBUG is too aggressive now and really should be
relaxed.

Revision 1.374 / (download) - annotate - [select for diffs], Sun Aug 14 08:42:33 2022 UTC (20 months ago) by skrll
Branch: MAIN
Changes since 1.373: +12 -10 lines
Diff to previous 1.373 (colored) to selected 1.104.6.1 (colored)

bge: Fix bge_ring_map bus_dmamap_sync POST{READ,WRITE} operations.

When the range of ring entries wraps around sync from the start of the
ring to the last entry.

Revision 1.373 / (download) - annotate - [select for diffs], Sun Aug 7 08:37:48 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.372: +30 -8 lines
Diff to previous 1.372 (colored) to selected 1.104.6.1 (colored)

Provide and use (when appropriate) a bge_free_jumbo_mem.

Revision 1.372 / (download) - annotate - [select for diffs], Sun Aug 7 08:26:18 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.371: +4 -4 lines
Diff to previous 1.371 (colored) to selected 1.104.6.1 (colored)

Misc tidyup. NFC.

Revision 1.371 / (download) - annotate - [select for diffs], Sun Aug 7 08:24:23 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.370: +5 -7 lines
Diff to previous 1.370 (colored) to selected 1.104.6.1 (colored)

Unwrap a long line and remove unecessary brackets. NFC.

Revision 1.370 / (download) - annotate - [select for diffs], Sun Aug 7 08:19:38 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.369: +3 -3 lines
Diff to previous 1.369 (colored) to selected 1.104.6.1 (colored)

Fix the KNF. oops.

Revision 1.369 / (download) - annotate - [select for diffs], Sun Aug 7 08:12:47 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.368: +3 -3 lines
Diff to previous 1.368 (colored) to selected 1.104.6.1 (colored)

whitespace

Revision 1.368 / (download) - annotate - [select for diffs], Sun Aug 7 07:48:19 2022 UTC (20 months, 1 week ago) by skrll
Branch: MAIN
Changes since 1.367: +3 -2 lines
Diff to previous 1.367 (colored) to selected 1.104.6.1 (colored)

KNF

Revision 1.367 / (download) - annotate - [select for diffs], Tue Jul 26 14:53:12 2022 UTC (20 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.366: +10 -10 lines
Diff to previous 1.366 (colored) to selected 1.104.6.1 (colored)

Whitespace

Revision 1.366 / (download) - annotate - [select for diffs], Fri Jul 22 06:31:08 2022 UTC (20 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.365: +6 -6 lines
Diff to previous 1.365 (colored) to selected 1.104.6.1 (colored)

malloc -> kmem.

Revision 1.365 / (download) - annotate - [select for diffs], Sun Jul 3 13:29:28 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.364: +3 -4 lines
Diff to previous 1.364 (colored) to selected 1.104.6.1 (colored)

*** empty log message ***

Revision 1.364 / (download) - annotate - [select for diffs], Sun Jul 3 13:25:18 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.363: +18 -18 lines
Diff to previous 1.363 (colored) to selected 1.104.6.1 (colored)

KNF

Revision 1.363 / (download) - annotate - [select for diffs], Sun Jul 3 13:21:28 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.362: +7 -7 lines
Diff to previous 1.362 (colored) to selected 1.104.6.1 (colored)

Perform a BUS_DMASYNC_POSTREAD on the bge_status_block before reading from
it as required by bus_dma(9).

Revision 1.362 / (download) - annotate - [select for diffs], Sat Jul 2 08:39:48 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.361: +15 -15 lines
Diff to previous 1.361 (colored) to selected 1.104.6.1 (colored)

KNF. Remove brackets around return values.

Revision 1.361 / (download) - annotate - [select for diffs], Sat Jul 2 08:33:26 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.360: +2 -7 lines
Diff to previous 1.360 (colored) to selected 1.104.6.1 (colored)

One timeout message (the write one) in bge_miibus_writereg is enough.

Revision 1.360 / (download) - annotate - [select for diffs], Sat Jul 2 08:31:43 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.359: +5 -7 lines
Diff to previous 1.359 (colored) to selected 1.104.6.1 (colored)

Modernise bge_update_all_threshes.  Same code before and after.

Revision 1.359 / (download) - annotate - [select for diffs], Sat Jul 2 07:32:16 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.358: +3 -5 lines
Diff to previous 1.358 (colored) to selected 1.104.6.1 (colored)

Simplification.  Same code before and after.

Revision 1.358 / (download) - annotate - [select for diffs], Sat Jul 2 07:07:07 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.357: +5 -9 lines
Diff to previous 1.357 (colored) to selected 1.104.6.1 (colored)

More const. Remove strange ifp assignments in bge_init.

Revision 1.357 / (download) - annotate - [select for diffs], Thu Jun 30 19:06:35 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.356: +10 -6 lines
Diff to previous 1.356 (colored) to selected 1.104.6.1 (colored)

KNF some comments

Revision 1.356 / (download) - annotate - [select for diffs], Thu Jun 30 16:49:55 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.355: +2 -4 lines
Diff to previous 1.355 (colored) to selected 1.104.6.1 (colored)

Remove strange (duplicate) assignment.

Revision 1.355 / (download) - annotate - [select for diffs], Thu Jun 30 16:36:11 2022 UTC (21 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.354: +8 -7 lines
Diff to previous 1.354 (colored) to selected 1.104.6.1 (colored)

KNF

Revision 1.354 / (download) - annotate - [select for diffs], Tue Jun 28 06:24:00 2022 UTC (21 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.353: +37 -46 lines
Diff to previous 1.353 (colored) to selected 1.104.6.1 (colored)

Sprinkle some const. Same code before and after.

Revision 1.335.2.2 / (download) - annotate - [select for diffs], Thu May 19 16:24:20 2022 UTC (23 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.335.2.1: +5 -5 lines
Diff to previous 1.335.2.1 (colored) to branchpoint 1.335 (colored) next main 1.336 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by buhrow in ticket #1456):

	sys/dev/pci/if_bge.c: revision 1.353

For chips which contain an ASF/IPMI firmware, instruct the chip to shut
the host ASF firmware down when attaching the device so the IPMI BMC
can use the same physical port even when NetBSD doesn't have a
network configuration on the device.
By contrast, when the device gets a network configuration assigned to
it and bge_init() is called, the host ASF firmware is brought up so
both NetBSD and the IPMI BMc can use the same physical port.

This now matches FreeBSD behavior, as well as  behavior from NetBSD-5.2.

Tested on a Sunfire X2200-M2 system with the following chip:

bge1 at pci7 dev 4 function 1: Broadcom BCM5715 Gigabit Ethernet
bge1: interrupting at ioapic0 pin 11
bge1: HW config 000000d4, 00000014, 00000000, 00000000 00000000
bge1: ASIC BCM5715 A3 (0x9003), Ethernet address 00:1e:68:XX:XX:XX
bge1: setting short Tx thresholds
brgphy1 at bge1 phy 1: BCM5714 1000BASE-T/X media interface, rev. 0
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

Revision 1.353 / (download) - annotate - [select for diffs], Thu May 19 04:43:43 2022 UTC (23 months ago) by buhrow
Branch: MAIN
Changes since 1.352: +5 -5 lines
Diff to previous 1.352 (colored) to selected 1.104.6.1 (colored)




For chips which contain an ASF/IPMI firmware, instruct the chip to shut the host ASF firmware
down when attaching the device so the IPMI BMC can use the same physical port even when NetBSD
doesn't have a network configuration on the device.  By contrast, when the device gets a
network configuration assigned to it and bge_init() is called, the host ASF firmware is brought
up so both NetBSD and the IPMI BMc can use the same
physical port.

This now matches FreeBSD behavior, as well as  behavior from NetBSD-5.2.

Tested on a Sunfire X2200-M2 system with the following chip:

bge1 at pci7 dev 4 function 1: Broadcom BCM5715 Gigabit Ethernet
bge1: interrupting at ioapic0 pin 11
bge1: HW config 000000d4, 00000014, 00000000, 00000000 00000000
bge1: ASIC BCM5715 A3 (0x9003), Ethernet address 00:1e:68:XX:XX:XX
bge1: setting short Tx thresholds
brgphy1 at bge1 phy 1: BCM5714 1000BASE-T/X media interface, rev. 0
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

Revision 1.352 / (download) - annotate - [select for diffs], Thu Apr 7 19:33:38 2022 UTC (2 years ago) by andvar
Branch: MAIN
Changes since 1.351: +3 -3 lines
Diff to previous 1.351 (colored) to selected 1.104.6.1 (colored)

fix various typos in comments.

Revision 1.351 / (download) - annotate - [select for diffs], Sat Jan 22 19:01:56 2022 UTC (2 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.350: +5 -4 lines
Diff to previous 1.350 (colored) to selected 1.104.6.1 (colored)

Explicitly cast a 40-bit mask to bus_addr_t in a dead branch (gcc apparently
is not clever enough and warns about the truncation)

Revision 1.350 / (download) - annotate - [select for diffs], Sat Jan 22 15:10:32 2022 UTC (2 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.349: +4 -5 lines
Diff to previous 1.349 (colored) to selected 1.104.6.1 (colored)

Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.

Revision 1.349 / (download) - annotate - [select for diffs], Thu Sep 16 20:17:47 2021 UTC (2 years, 7 months ago) by andvar
Branch: MAIN
Changes since 1.348: +3 -3 lines
Diff to previous 1.348 (colored) to selected 1.104.6.1 (colored)

fix various typos, mainly in comments.

Revision 1.348 / (download) - annotate - [select for diffs], Fri Sep 3 21:55:00 2021 UTC (2 years, 7 months ago) by andvar
Branch: MAIN
Changes since 1.347: +3 -3 lines
Diff to previous 1.347 (colored) to selected 1.104.6.1 (colored)

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/

Revision 1.347 / (download) - annotate - [select for diffs], Mon Aug 30 22:48:16 2021 UTC (2 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.346: +12 -8 lines
Diff to previous 1.346 (colored) to selected 1.104.6.1 (colored)

bge_txeof/bge_rxeof may be called with no pending descriptors, so skip
bus_dmamap_sync with len=0

Revision 1.346 / (download) - annotate - [select for diffs], Thu Jul 2 09:07:10 2020 UTC (3 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.345: +3 -3 lines
Diff to previous 1.345 (colored) to selected 1.104.6.1 (colored)

prop_data_data_nocopy -> prop_data_value

Revision 1.314.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:26 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.314.2.2: +7 -12 lines
Diff to previous 1.314.2.2 (colored) to branchpoint 1.314 (colored) next main 1.315 (colored) to selected 1.104.6.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.314.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:09 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.314.2.1: +124 -50 lines
Diff to previous 1.314.2.1 (colored) to branchpoint 1.314 (colored) to selected 1.104.6.1 (colored)

Merge changes from current as of 20200406

Revision 1.342.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:10 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.342: +34 -22 lines
Diff to previous 1.342 (colored) next main 1.343 (colored) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.345 / (download) - annotate - [select for diffs], Fri Feb 7 00:04:28 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.344: +5 -4 lines
Diff to previous 1.344 (colored) to selected 1.104.6.1 (colored)

Use callout_setfunc() / callout_schedule().

Revision 1.344 / (download) - annotate - [select for diffs], Tue Feb 4 05:44:14 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.343: +5 -5 lines
Diff to previous 1.343 (colored) to selected 1.104.6.1 (colored)

Use ifmedia_fini().

Revision 1.343 / (download) - annotate - [select for diffs], Sat Feb 1 06:17:23 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.342: +28 -17 lines
Diff to previous 1.342 (colored) to selected 1.104.6.1 (colored)

Adopt <net/if_stats.h>.

Revision 1.310.2.8 / (download) - annotate - [select for diffs], Thu Dec 5 16:44:32 2019 UTC (4 years, 4 months ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.310.2.7: +15 -13 lines
Diff to previous 1.310.2.7 (colored) to branchpoint 1.310 (colored) next main 1.311 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1462):
	sys/dev/pci/if_bge.c: revision 1.340
	sys/dev/pci/if_bge.c: revision 1.341
	sys/dev/pci/if_bge.c: revision 1.336
- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.
 Fix a bug that SK-9D41 can't detect fiber media. Check the subsystem ID
correctly. This bug was added in if_bge.c rev. 1.161.
- Use *_FLUSH() more. The main purpose is to wait following delay() correctly.
- Add missing DELAY(80) after writing BGE_MI_MODE register.

Revision 1.335.2.1 / (download) - annotate - [select for diffs], Wed Nov 27 11:08:24 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.335: +95 -32 lines
Diff to previous 1.335 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #487):

	sys/dev/pci/if_bge.c: revision 1.340
	sys/dev/pci/if_bge.c: revision 1.341
	sys/dev/pci/if_bge.c: revision 1.342
	sys/dev/pci/if_bge.c: revision 1.336

- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.

 Fix a bug that SK-9D41 can't detect fiber media. Check the subsystem ID
correctly. This bug was added in if_bge.c rev. 1.161.

- Use *_FLUSH() more. The main purpose is to wait following delay() correctly.
- Add missing DELAY(80) after writing BGE_MI_MODE register.

 Modify PHY initialization code. This change fix a bug that SK-9D21 doesn't
detect MII PHY.
 - Add error check to bge_miibus_writereg().
 - Change return value of bge_miibus_readreg() when a read error occurred.
   It also add error message using with aprint_debug_dev(). This error occurs
   on some devices while detecting MII devices.
 - Move the location of BGE_MI_MODE register's initialization to next to
   bge_chipinit().
 - Set BGE_MAC_MODE before calling ifmedia_init() and/or mii_attach().
 - Add retry code for mii_attach() failed. Same as FreeBSD.

Revision 1.342 / (download) - annotate - [select for diffs], Mon Nov 25 05:35:26 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.341: +83 -22 lines
Diff to previous 1.341 (colored) to selected 1.104.6.1 (colored)

 Modify PHY initialization code. This change fix a bug that SK-9D21 doesn't
detect MII PHY.
 - Add error check to bge_miibus_writereg().
 - Change return value of bge_miibus_readreg() when a read error occurred.
   It also add error message using with aprint_debug_dev(). This error occurs
   on some devices while detecting MII devices.
 - Move the location of BGE_MI_MODE register's initialization to next to
   bge_chipinit().
 - Set BGE_MAC_MODE before calling ifmedia_init() and/or mii_attach().
 - Add retry code for mii_attach() failed. Same as FreeBSD.

Revision 1.341 / (download) - annotate - [select for diffs], Mon Nov 25 05:18:59 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.340: +11 -10 lines
Diff to previous 1.340 (colored) to selected 1.104.6.1 (colored)

- Use *_FLUSH() more. The main purpose is to wait following delay() correctly.
- Add missing DELAY(80) after writing BGE_MI_MODE register.

Revision 1.340 / (download) - annotate - [select for diffs], Mon Nov 25 04:52:27 2019 UTC (4 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.339: +3 -3 lines
Diff to previous 1.339 (colored) to selected 1.104.6.1 (colored)

 Fix a bug that SK-9D41 can't detect fiber media. Check the subsystem ID
correctly. This bug was added in if_bge.c rev. 1.161.

Revision 1.339 / (download) - annotate - [select for diffs], Sun Nov 10 21:16:36 2019 UTC (4 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.338: +3 -9 lines
Diff to previous 1.338 (colored) to selected 1.104.6.1 (colored)

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

Revision 1.338 / (download) - annotate - [select for diffs], Mon Sep 23 07:47:45 2019 UTC (4 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.337: +3 -4 lines
Diff to previous 1.337 (colored) to selected 1.104.6.1 (colored)

Remove (unused) reference to m_pktdat.

Revision 1.337 / (download) - annotate - [select for diffs], Fri Sep 13 07:55:07 2019 UTC (4 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.336: +3 -3 lines
Diff to previous 1.336 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.336 / (download) - annotate - [select for diffs], Tue Jul 30 15:50:08 2019 UTC (4 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.335: +5 -4 lines
Diff to previous 1.335 (colored) to selected 1.104.6.1 (colored)

- Avoid undefined behavior in bge_setmulti(). found by kUBSan.
- Avoid undefined behavior when setting the MAC address in bge_init().
  found by kUBSan.

Revision 1.335 / (download) - annotate - [select for diffs], Tue Jul 9 08:46:58 2019 UTC (4 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.334: +3 -2 lines
Diff to previous 1.334 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.314.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:16 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.314: +566 -587 lines
Diff to previous 1.314 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.334 / (download) - annotate - [select for diffs], Wed May 29 10:07:29 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.333: +6 -4 lines
Diff to previous 1.333 (colored) to selected 1.104.6.1 (colored)

Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
 - Add ec_ifmedia into struct ethercom.
 - ec_mii in struct ethercom is kept and used as it is. It might be used in
   future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
   ec_mii for keeping the if_media. Those should be changed in future.

Revision 1.333 / (download) - annotate - [select for diffs], Tue May 28 07:41:49 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.332: +5 -2 lines
Diff to previous 1.332 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.332 / (download) - annotate - [select for diffs], Fri May 24 05:57:35 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.331: +25 -28 lines
Diff to previous 1.331 (colored) to selected 1.104.6.1 (colored)

No functional change:
- ac -> ec
- KNF.

Revision 1.331 / (download) - annotate - [select for diffs], Thu May 23 10:51:39 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.330: +33 -36 lines
Diff to previous 1.330 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.310.2.7 / (download) - annotate - [select for diffs], Mon May 13 12:40:13 2019 UTC (4 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.310.2.6: +3 -3 lines
Diff to previous 1.310.2.6 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up the following, via patch, requested by msaitoh in ticket #1263:

	sys/dev/mii/brgphy.c				1.84
	sys/dev/mii/ciphy.c				1.33 via patch
	sys/dev/mii/rgephy.c				1.53
	sys/arch/arm/imx/if_enet.c			1.18
	sys/arch/mips/adm5120/dev/if_admsw.c		1.19-1.20
	sys/dev/pci/if_bge.c				1.329
	sys/dev/pci/if_bnx.c				1.81
	sys/dev/pci/if_et.c				1.21
	sys/dev/pci/if_lii.c				1.22
	sys/dev/pci/if_msk.c				1.87
	sys/dev/pci/if_nfe.c				1.68
	sys/dev/pci/if_sk.c				1.95
	sys/dev/pci/if_ti.c				1.107
	sys/dev/pci/if_txp.c				1.52
	sys/dev/pci/if_vge.c				1.69
	sys/dev/usb/if_axen.c				1.38
	sys/dev/usb/if_aue.c				1.149

Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

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

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

Revision 1.329 / (download) - annotate - [select for diffs], Thu Apr 11 08:50:59 2019 UTC (5 years ago) by msaitoh
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.328: +3 -3 lines
Diff to previous 1.328 (colored) to selected 1.104.6.1 (colored)

 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

Revision 1.310.2.6 / (download) - annotate - [select for diffs], Sun Apr 7 13:46:39 2019 UTC (5 years ago) by martin
Branch: netbsd-8
Changes since 1.310.2.5: +4 -4 lines
Diff to previous 1.310.2.5 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1228):

	sys/dev/pci/if_bge.c: revision 1.328

Fix ASIC check, BGE_ASICREV(sc->bge_chipid) is not a chipid.

Fixes bogus input error reporting in stat. This is cosmetic, exept for
routed(8) which thinks that the interface is broken and stops accepting routes
from it.

Revision 1.328 / (download) - annotate - [select for diffs], Fri Apr 5 18:14:54 2019 UTC (5 years ago) by bouyer
Branch: MAIN
Changes since 1.327: +4 -4 lines
Diff to previous 1.327 (colored) to selected 1.104.6.1 (colored)

Fix ASIC check, BGE_ASICREV(sc->bge_chipid) is not a chipid.
Fixes bogus input error reporting in stat. This is cosmetic, exept for
routed(8) which thinks that the interface is broken and stops accepting routes
from it.

Revision 1.310.2.5 / (download) - annotate - [select for diffs], Thu Mar 7 17:38:59 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.310.2.4: +193 -379 lines
Diff to previous 1.310.2.4 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up the following, requested by msaitoh in ticket #1209:

	sys/dev/pci/if_bge.c			1.323-1.327
	sys/dev/pci/if_bgereg.h 		1.95
	sys/dev/mii/brgphy.c			1.80
	share/man/man4/bge.4			1.16

- Add BCM5717's another device ID support.
- Add BCM5702FE, another BCM5704S and SysKonnect SK-9Mxx support.
- Add support for BCM5762 ASIC devices.
- Add BCM5762, BCM5725, BCM5727, BCM57764, BCM57767 and BCM57787.
- Simplify PCI device table.
- Add /* FALLTHROUGH */

Revision 1.327 / (download) - annotate - [select for diffs], Wed Feb 20 17:00:20 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.326: +89 -18 lines
Diff to previous 1.326 (colored) to selected 1.104.6.1 (colored)

- Add support for BCM5762 ASIC devices.
- Add BCM5762, BCM5725, BCM5727, BCM57764, BCM57767 and BCM57787.

Revision 1.326 / (download) - annotate - [select for diffs], Wed Feb 20 15:56:51 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.325: +5 -2 lines
Diff to previous 1.325 (colored) to selected 1.104.6.1 (colored)

 Add BCM5702FE, another BCM5704S and SysKonnect SK-9Mxx support.

Revision 1.325 / (download) - annotate - [select for diffs], Wed Feb 20 08:03:58 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.324: +99 -367 lines
Diff to previous 1.324 (colored) to selected 1.104.6.1 (colored)

 Simplify PCI device table. No functional change.

Revision 1.324 / (download) - annotate - [select for diffs], Wed Feb 20 04:49:08 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.323: +6 -2 lines
Diff to previous 1.323 (colored) to selected 1.104.6.1 (colored)

 Add BCM5717's another device ID support.

Revision 1.323 / (download) - annotate - [select for diffs], Sun Feb 3 03:19:27 2019 UTC (5 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.322: +6 -2 lines
Diff to previous 1.322 (colored) to selected 1.104.6.1 (colored)

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily

Revision 1.313.2.6 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:07 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.313.2.5: +28 -24 lines
Diff to previous 1.313.2.5 (colored) to branchpoint 1.313 (colored) next main 1.314 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.322 / (download) - annotate - [select for diffs], Tue Jan 22 03:42:27 2019 UTC (5 years, 2 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.321: +28 -24 lines
Diff to previous 1.321 (colored) to selected 1.104.6.1 (colored)

 Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

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

Revision 1.313.2.5 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:27 2019 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.313.2.4: +3 -3 lines
Diff to previous 1.313.2.4 (colored) to branchpoint 1.313 (colored) to selected 1.104.6.1 (colored)

Synch with HEAD

Revision 1.321 / (download) - annotate - [select for diffs], Wed Jan 16 07:32:13 2019 UTC (5 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-20190118
Changes since 1.320: +3 -3 lines
Diff to previous 1.320 (colored) to selected 1.104.6.1 (colored)

 Remove the definition of BRGPHY_MII_1000CTL and use MII_GTCR.

Revision 1.313.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:50 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.313.2.3: +239 -92 lines
Diff to previous 1.313.2.3 (colored) to branchpoint 1.313 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.310.2.4 / (download) - annotate - [select for diffs], Sat Dec 8 12:10:22 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.310.2.3: +213 -61 lines
Diff to previous 1.310.2.3 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1130):

	sys/dev/pci/if_bge.c: revision 1.320
	sys/dev/pci/if_bgevar.h: revision 1.24
	sys/dev/pci/if_bge.c: revision 1.317
	sys/dev/pci/if_bgereg.h: revision 1.94

More TSO4 fixes, from the freebsd driver:
- the chip doens't want the lenght of options, but the complete lenght of
  ip headers (ip + tcp + options). Fix this for the BGE_IS_5717_PLUS()
  and BGE_IS_5705_PLUS() cases; FreeBSD doens't cover the last case so
  leave it as is for now. This fixes checksum failures for heavy transfers.
- It looks like the transmit engine hangs if the TCP segment crosses a 4GB
  boundary. FreeBSD fixes it by mapping everything below 4GB; instead
  try detect when this happens and do the bounce only when needed.

With these fixes I could transfers 3GB images over ftp at gigabit speed
(112MB/s with wget) without problems. Tested on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0

 -

Don't destroy the dma maps if we're not disabling the adapter, avoids
a KASSERT() when bus_dmamap_destroy() is called from interrupt
context via bge_watchdog()

Set IFF_OACTIVE only when bge_encap() fails on adapter ressource shortage.
Otherwise we may set IFF_OACTIVE while no transmit is in progress, and
nothing will clear it.

If bus_dmamap_load_mbuf() fails with EFBIG, m_defrag() the chain and retry.
Refine the check for the 4GB boundary workaround (a fragment should also
not cross the boundary), and do it only for TSO.

If bge_encap() fails and didn't set IFF_OACTIVE, drop the packet.

Bring in more hardware bug workarounds from freebsd.

With these it seems that a BCM5720 A0 can survive a few hours of internet
load with TSO4 enabled.

Revision 1.320 / (download) - annotate - [select for diffs], Sun Dec 2 17:02:04 2018 UTC (5 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.319: +133 -32 lines
Diff to previous 1.319 (colored) to selected 1.104.6.1 (colored)

Don't destroy the dma maps if we're not disabling the adapter, avoids
a KASSERT() when bus_dmamap_destroy() is called from interrupt
context via bge_watchdog()
Set IFF_OACTIVE only when bge_encap() fails on adapter ressource shortage.
Otherwise we may set IFF_OACTIVE while no transmit is in progress, and
nothing will clear it.
If bus_dmamap_load_mbuf() fails with EFBIG, m_defrag() the chain and retry.
Refine the check for the 4GB boundary workaround (a fragment should also
not cross the boundary), and do it only for TSO.
If bge_encap() fails and didn't set IFF_OACTIVE, drop the packet.
Bring in more hardware bug workarounds from freebsd.

With these it seems that a BCM5720 A0 can survive a few hours of internet
load with TSO4 enabled.

Revision 1.319 / (download) - annotate - [select for diffs], Fri Nov 30 17:53:08 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.318: +3 -3 lines
Diff to previous 1.318 (colored) to selected 1.104.6.1 (colored)

allow MSI-X if supported by the hardware, discussed with Manuel

Revision 1.318 / (download) - annotate - [select for diffs], Fri Nov 30 17:52:11 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.317: +28 -33 lines
Diff to previous 1.317 (colored) to selected 1.104.6.1 (colored)

simplify intr establish code - rely on pci_intr_alloc() to return
interrupt types which are possible for pci_intr_establish(); remove
fallbacks to retry with MSI explicitly disabled

bge(4) specifically needs to disable MSI on some boards which are
known to have broken MSI support, so this can't use pci_intr_alloc()
with just NULL counts

discussed on tech-kern@, and specifically bge(4) with Manuel

https://mail-index.netbsd.org/tech-kern/2018/11/27/msg024240.html

Revision 1.317 / (download) - annotate - [select for diffs], Tue Nov 27 19:17:02 2018 UTC (5 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.316: +86 -35 lines
Diff to previous 1.316 (colored) to selected 1.104.6.1 (colored)

More TSO4 fixes, from the freebsd driver:
- the chip doens't want the lenght of options, but the complete lenght of
  ip headers (ip + tcp + options). Fix this for the BGE_IS_5717_PLUS()
  and BGE_IS_5705_PLUS() cases; FreeBSD doens't cover the last case so
  leave it as is for now. This fixes checksum failures for heavy transfers.
- It looks like the transmit engine hangs if the TCP segment crosses a 4GB
  boundary. FreeBSD fixes it by mapping everything below 4GB; instead
  try detect when this happens and do the bounce only when needed.

With these fixes I could transfers 3GB images over ftp at gigabit speed
(112MB/s with wget) without problems. Tested on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0

Revision 1.310.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 17:22:32 2018 UTC (5 years, 4 months ago) by snj
Branch: netbsd-8
Changes since 1.310.2.2: +25 -7 lines
Diff to previous 1.310.2.2 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1107):
	sys/dev/pci/if_bge.c: revision 1.316
5717 and newer handle TSO in a sighly different way. From FreeBSD.
While there, use different lowat/hiwat values if MTU is larger than ETHERMTU,
from FreeBSD.
Tested at LIP6 on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0
with all ipv4 checksums and TSO4 enabled.

Revision 1.313.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:32 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.313.2.2: +25 -7 lines
Diff to previous 1.313.2.2 (colored) to branchpoint 1.313 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.316 / (download) - annotate - [select for diffs], Sat Nov 24 18:14:43 2018 UTC (5 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.315: +25 -7 lines
Diff to previous 1.315 (colored) to selected 1.104.6.1 (colored)

5717 and newer handle TSO in a sighly different way. From FreeBSD.
While there, use different lowat/hiwat values if MTU is larger than ETHERMTU,
from FreeBSD.
Tested at LIP6 on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0
with all ipv4 checksums and TSO4 enabled.

Revision 1.313.2.2 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:51 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.313.2.1: +3 -3 lines
Diff to previous 1.313.2.1 (colored) to branchpoint 1.313 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.315 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:32 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.314: +3 -3 lines
Diff to previous 1.314 (colored) to selected 1.104.6.1 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

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

Sync with HEAD

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

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

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

Revision 1.201.2.5 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:07 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.201.2.4: +338 -113 lines
Diff to previous 1.201.2.4 (colored) next main 1.202 (colored) to selected 1.104.6.1 (colored)

update from HEAD

Revision 1.310.2.2 / (download) - annotate - [select for diffs], Fri Nov 24 08:39:09 2017 UTC (6 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.310.2.1: +3 -3 lines
Diff to previous 1.310.2.1 (colored) to branchpoint 1.310 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #389):
	sys/net/if_ether.h: revision 1.69
	sys/net/if_vlan.c: revision 1.108
	sys/dev/pci/if_bge.c: revision 1.313
	sys/net/if_vlanvar.h: revision 1.11
	sys/net/if_vlanvar.h: revision 1.12
	sys/net/if_ether.h: revision 1.70
	sys/net/if_vlan.c: revision 1.110
	sys/dev/pci/if_wm.c: revision 1.544
	sys/dev/pci/if_wmreg.h: revision 1.105
  Fix a bug that a vlan packet which has priority or CFI bit in the tag causes
panic.
  Revert part of if_bge.c 1.312. It's not required to mask other than VLAN ID
bits in VLAN tag.
  Revert if_wmreg.h 1.104 and if_wm.c 1.542. It's not required to mask other
than VLAN ID bits in VLAN tag.
No functional change:
  - u_int16_t -> uint16_t
  - u_short -> uint16_t
  - tag_hash_func -> vlan_tag_hash
  - 0 -> NULL because vlr_parent is a pointer.

Revision 1.313 / (download) - annotate - [select for diffs], Wed Nov 22 02:35:54 2017 UTC (6 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.312: +3 -3 lines
Diff to previous 1.312 (colored) to selected 1.104.6.1 (colored)

 Revert part of if_bge.c 1.312. It's not reqired to mask other than VLAN ID
bits in VLAN tag.

Revision 1.310.2.1 / (download) - annotate - [select for diffs], Tue Oct 24 08:38:59 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.310: +10 -9 lines
Diff to previous 1.310 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.312 / (download) - annotate - [select for diffs], Thu Sep 28 16:24:39 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.311: +5 -4 lines
Diff to previous 1.311 (colored) to selected 1.104.6.1 (colored)

- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag

Revision 1.311 / (download) - annotate - [select for diffs], Tue Sep 26 07:42:06 2017 UTC (6 years, 6 months ago) by knakahara
Branch: MAIN
Changes since 1.310: +9 -9 lines
Diff to previous 1.310 (colored) to selected 1.104.6.1 (colored)

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

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

XXX need pullup to -8 branch

Revision 1.277.4.10 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:05 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.9: +88 -22 lines
Diff to previous 1.277.4.9 (colored) to branchpoint 1.277 (colored) next main 1.278 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.309.2.1 / (download) - annotate - [select for diffs], Tue May 2 03:19:18 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.309: +4 -4 lines
Diff to previous 1.309 (colored) next main 1.310 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD - tag prg-localcount2-base1

Revision 1.310 / (download) - annotate - [select for diffs], Thu Apr 27 10:01:54 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.309: +4 -4 lines
Diff to previous 1.309 (colored) to selected 1.104.6.1 (colored)

 Use {isa,pci}_intr_establish"_xname"() for intrctl(8).

Revision 1.298.2.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:12 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.298.2.1: +86 -20 lines
Diff to previous 1.298.2.1 (colored) to branchpoint 1.298 (colored) next main 1.299 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.309 / (download) - annotate - [select for diffs], Tue Apr 25 17:11:47 2017 UTC (6 years, 11 months ago) by snj
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-20170426
Branch point for: prg-localcount2
Changes since 1.308: +3 -3 lines
Diff to previous 1.308 (colored) to selected 1.104.6.1 (colored)

fix typo

Revision 1.300.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:47 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.300: +85 -19 lines
Diff to previous 1.300 (colored) next main 1.301 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.308 / (download) - annotate - [select for diffs], Thu Apr 20 09:18:05 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: bouyer-socketcan-base1
Changes since 1.307: +15 -15 lines
Diff to previous 1.307 (colored) to selected 1.104.6.1 (colored)

 5776[0156], 5778[02568] and 5779[015] are not Fast Ethernet but
Gigabit Ethernet.

Revision 1.307 / (download) - annotate - [select for diffs], Thu Apr 20 09:03:04 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.306: +3 -3 lines
Diff to previous 1.306 (colored) to selected 1.104.6.1 (colored)

 Fix device timeout problem when MSI is used on BCM57762, BCM57765 and
BCM57785. Check correctly for BGEF_TAGGED_STATUS. These devices' ASCI core is
BCM5776[56]. Other BSD's BGE_IS_5717_PLUS() include BCM5776[56] but ours
doesn't (because Linux tg3 does so).

 Tested with snj's MacBook (BCM57765 (BCM57765 B0 ASIC)) and my Acer Aspire
One 756 (BCM57785(BCM57765 B0 ASIC)). Also Thunderbolt Ethernet
(BCM57762 (BCM57766 A0 ASIC)) should work.

Revision 1.306 / (download) - annotate - [select for diffs], Thu Apr 13 09:25:33 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.305: +4 -2 lines
Diff to previous 1.305 (colored) to selected 1.104.6.1 (colored)

 Add forgotten BGE_EVCNT_INCR() for spurious interrupt.

Revision 1.305 / (download) - annotate - [select for diffs], Thu Apr 13 04:27:46 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.304: +17 -3 lines
Diff to previous 1.304 (colored) to selected 1.104.6.1 (colored)

- Read chip ID correctly on BCM57782 and BCM57786.
- Add BXCM57766 A0 string.
- Add comment for BCM5776[56]'s workaround.

Revision 1.304 / (download) - annotate - [select for diffs], Wed Apr 12 06:22:16 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.303: +29 -2 lines
Diff to previous 1.303 (colored) to selected 1.104.6.1 (colored)

 Add a workaround for BCM57780 to prevent device timeout. This change prevent
L1PM feature do wrongy. Tested with Dell latitude 2120.

Revision 1.303 / (download) - annotate - [select for diffs], Wed Apr 12 06:04:34 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.302: +7 -5 lines
Diff to previous 1.302 (colored) to selected 1.104.6.1 (colored)

 Fix a bug that BCM5785 write wrongly to the PCI config area.

Revision 1.302 / (download) - annotate - [select for diffs], Wed Apr 12 05:59:43 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.301: +6 -2 lines
Diff to previous 1.301 (colored) to selected 1.104.6.1 (colored)

 Add counters for spurious interrupts.

Revision 1.301 / (download) - annotate - [select for diffs], Wed Apr 12 05:50:52 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
Changes since 1.300: +19 -2 lines
Diff to previous 1.300 (colored) to selected 1.104.6.1 (colored)

 Detach sysctl and event counters in bge_release_resources().

Revision 1.277.4.9 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:29 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.8: +5 -10 lines
Diff to previous 1.277.4.8 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.298.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:33 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.298: +5 -10 lines
Diff to previous 1.298 (colored) to selected 1.104.6.1 (colored)

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

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

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

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

Proposed on tech-kern and tech-net

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

Apply deferred if_start framework

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

Revision 1.277.4.8 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:42 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.7: +3 -3 lines
Diff to previous 1.277.4.7 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.298 / (download) - annotate - [select for diffs], Mon Jul 11 06:14:51 2016 UTC (7 years, 9 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.297: +3 -3 lines
Diff to previous 1.297 (colored) to selected 1.104.6.1 (colored)

pci_intr_type() is required pci_chipset_tag_t argument by other than x86.

pointed out by nonaka@n.o.

Revision 1.277.4.7 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:04 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.6: +3 -3 lines
Diff to previous 1.277.4.6 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.297 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:14 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907
Changes since 1.296: +3 -3 lines
Diff to previous 1.296 (colored) to selected 1.104.6.1 (colored)

Introduce m_set_rcvif and m_reset_rcvif

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

No functional change.

Revision 1.277.4.6 / (download) - annotate - [select for diffs], Sun May 29 08:44:21 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.5: +6 -3 lines
Diff to previous 1.277.4.5 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.296 / (download) - annotate - [select for diffs], Thu May 12 02:24:16 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.295: +6 -3 lines
Diff to previous 1.295 (colored) to selected 1.104.6.1 (colored)

Protect ifnet list with psz and psref

The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.

Revision 1.277.4.5 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:10 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.4: +3 -3 lines
Diff to previous 1.277.4.4 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.295 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:11 2016 UTC (8 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.294: +3 -3 lines
Diff to previous 1.294 (colored) to selected 1.104.6.1 (colored)

Introduce softint-based if_input

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

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

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

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

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

Revision 1.277.4.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:50 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.3: +5 -28 lines
Diff to previous 1.277.4.3 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.294 / (download) - annotate - [select for diffs], Wed Nov 18 10:26:57 2015 UTC (8 years, 5 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.293: +5 -28 lines
Diff to previous 1.293 (colored) to selected 1.104.6.1 (colored)

 Delete #ifdef __HAVE_PCI_MSI_MSIX and use pci_intr_allo()/pci_intr_release()
on any systems. The third argument of pci_intr_alloc() is left because we will
use the code to support MSI-X in future.

Revision 1.152.4.7 / (download) - annotate - [select for diffs], Mon Nov 9 12:33:01 2015 UTC (8 years, 5 months ago) by sborrill
Branch: netbsd-5
Changes since 1.152.4.6: +1935 -744 lines
Diff to previous 1.152.4.6 (colored) to branchpoint 1.152 (colored) next main 1.153 (colored) to selected 1.104.6.1 (colored)

Pull up the following revisions(s) (requested by msaitoh in ticket #1983):
	sys/dev/pci/pcidevs:		revisions 1.1079, 1.1134, 1.1148-1.1149, 1.1151
	sys/dev/pci/pcidevs.h:		regen
	sys/dev/pci/pcidevs_data.h:	regen
	sys/dev/pci/if_bge.c:		revisions 1.183-1.185, 1.187, 1.189-1.193, 1.195-1.199, 1.202-1.226, 1.228-1.237, 1.240-1.264, 1.267-1.276, 1.278-1.280, 1.283-1.287 via patch
	sys/dev/pci/if_bgereg.h:	revisions 1.57-1.74, 1.76-1.90 via patch
	sys/dev/pci/if_bgevar.h:	revisions 1.6, 1.10-1.13, 1.15-1.17 via patch
	sys/dev/pci/if_bnx.c:		revisions 1.32, 1.34-1.43, 1.48-1.49, 1.52
	sys/dev/pci/if_bnxreg.h:	revisions 1.8, 1.11-1.14
	sys/dev/pci/if_bnxvar.h:	revisions 1.1-1.3
	sys/dev/mii/brgphy.c:		revisions 1.53-1.63, 1.65-69, 1.72-1.74 via patch
	sys/dev/mii/brgphyreg.h:	revisions 1.5-1.8
	sys/dev/mii/miivar.h:		revisions 1.61
	sys/dev/pci/pcireg.h:		patch

Sync bge(4) up to if_bge.c rev. 1.287. Sync brgphy(4) up to 1.74.
Fix some bugs on bnx(4).

Common:
- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
  BCM57766 (pcidevs only).
- Fix BCM5709 PHY detection.
- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4).
- Don't use the WIRESPEED function for fiber devices.
bge(4):
- Add some Fujitsu's device support from Michael Moll.
- Add BCM57762 support (PR#46961 from Ryo Onodera).
- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G,
  BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
- Fix DMA setting for read/write on conventional PCI bus devices.
  This bug was added in rev. 1.166.
- Fix printing "discarding oversize frame (len=-4)" message and
  crash by NULL pointer dereferencing.
- The BCM5785 is a PCIe chip but does not report PCIe capabilities.
  Check for this chip explicitely and enable PCIe. Fixes
  'firmware handshake timeout'.
- Allow disabling interrupt mitigation.
- Workaround for BCM5906 silicon bug. When auto-negotiation results
  in half-duplex operation, excess collision on the ethernet link may
  cause internal chip delays that may result in subsequent valid
  frames being dropped due to insufficient receive buffer resources.
  (FreeBSD: r214219, r214251, r214292).
- Allow write DMA to request larger DMA burst size to get better
  performance on BCM5785. (FreeBSD r213333: OpenBSD 1.294)
- Enable TX MAC state machine lockup fix for both BCM5755 or higher
  and BCM5906. Publicly available data sheet just says it may happen
  due to corrupted TxMbuf. (FreeBSD r214216)
- Follow Broadcom datasheet:
  Delay 100 microseconds after enabling transmit MAC.
  Delay 10 microseconds after enabling receive MAC. (FreeBSD
  r241220)
- Insert the completion barrier between register write and the
  consecutive delay(). It will fix some device timeout problems we have
  seen before.
- Add DELAY(40) after turning on write DMA state machine.
- Add some workarounds for 5717 A0 and 5776[56] to be stable.
- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case. Note that
  {tcp,udp}6csum flag is currently not added in the capability.
- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
  checking.
- Do not touch the jumbo replenish threshold register on chips that do
  not have jumbo support.
- Wait for the bootcode to complete initialization for 5717 and newer
  devices.
- 5718 and 57785 document say we should wait 100us in init.
- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
- Fix the setting of Tx Random Backoff Register.
- Check the hardware config words and print them.
- Set BGE_MISC_CTL's byte/word swap options before using
  bge_readmem_ind(). Fixes PR#47716.
- For BGE_IS_575X_PLUS() devices, don't set
  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
- Document says 5717 and newer chips have no
  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
  chips. Same as OpenBSD.
- Fix a bug that the PHY address bits in MI_MODE register is wrongly
  cleard. Set the PHY address correctly.
- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
  register to not to modify some GPIO bits.
- Set DMA watermark depend on the PCI max payload size.
- Set BGE_JUMBO_CAPABLE correctly.
- Fix a link detect bug on non-autopoll systems.
- Change the TX ring size for 5717 series and 57764 series.
- Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
- For PCI-X BCM5704, set maximum outstanding split transactions to 0.
- Add 40bit DMA bug workaround(BGEF_40BIT_BUG) from FreeBSD.
  This workaround is for 5714/5715 controllers and is not actually a
  MAC controller bug but an issue with the embedded PCIe to PCI-X
  bridge in the device. This change uses bus_dmatag_subregion(),
  so this workaround won't work on some archs which doesn't support
  bus_dmatag_subregion().
- Add 2500SX support (not tested).
- Don't use the PHY Auto Poll Mode on many chips. This fixes a bug
  that MII Fiber NIC drop packet about 50%. Tested on HP Moonshot.
- Add workaround for PR#48451. Some BCM5717-5720 based systems getNMI
  on boot. This problem doesn't occur when we don't use prefetchable
  memory in the APE area. Tested with HP MicroServer Gen8.
- In the BCM5703, the DMA read watermark should be set to less than
  or equal to the maximum memory read byte count of the PCI-X command
  register.
- Fix a bug that BGE_PHY_TEST_CTRL_REG isn't set correctly on some
  PCIe devices.
- Use another firmware command in bge_asf_driver_up(). Same as Linux.
  This change fixes a bug that watchdog timeout occurs every 25-30
  minutes on HP ML110 G6 reported enami@ in PR#49657.
- Fix mbuf leak on failure.
- Remove PCI_PRODUCT_BROADCOM_BCM5724 and
  PCI_PRODUCT_BROADCOM_BCM5750M. These devices have not released to
  public.
- Add some workaround code for BGE_ASICREV_BCM5784 from Linux.
- Change some printf() to aprint_*().
- Fix typo in comments.
- Cleanup.
brgphy(4):
- Fix bit definition of BRGPHY_MRBE_MSG_PG5_NP_T2 from FreeBSD.
- Add BCM5481, BCM5709S, BCM5756, BCM5717C, BCM5720C, BCM5785,
  BCM57765(PR#46961), BCM57780
- In brgphyattach(), set sc_isbge, sc_isbnx and sc_phyflags before
  PHY_RESET() because brgphy_reset() refers those flags.
- Call brgpy specific autonego function in MII_TICK. Before this
  commit, only MII_MEDIACHG calls brgphy_mii_phy_auto() and MII_TICK
  calls MI mii_phy_auto(). That was not intended.
- Remove extra delay in brgphy_mii_phy_auto. Same as {Free,Open}BSD.
bnx(4):
- Add missing ifmedia_delete_instance() in bnx_detach().
- Fix a bug that BNX_NO_WOL_FLAG isn't correctly set on some chips.
  Reported by From Henning Petersen in PR#44151.
- Fix SERDES initialization.
- Get out of the interrupt handler early if !IFF_RUNNING.

Revision 1.277.4.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:05:59 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.2: +41 -30 lines
Diff to previous 1.277.4.2 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.277.2.3 / (download) - annotate - [select for diffs], Thu Jul 30 09:23:05 2015 UTC (8 years, 8 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.277.2.2: +5 -3 lines
Diff to previous 1.277.2.2 (colored) to branchpoint 1.277 (colored) next main 1.278 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by maxv in ticket #889):
	sys/dev/pci/if_bge.c: revision 1.283
	sys/dev/pci/if_pcn.c: revision 1.60
Fix mbuf leaks in error branches (found by the Brainy code scanner)

Revision 1.293 / (download) - annotate - [select for diffs], Tue Jul 21 03:15:50 2015 UTC (8 years, 9 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.292: +36 -27 lines
Diff to previous 1.292 (colored) to selected 1.104.6.1 (colored)

mofity for if_wm and if_bge to use pci_intr_alloc()

Revision 1.292 / (download) - annotate - [select for diffs], Sun Jun 14 08:46:33 2015 UTC (8 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.291: +7 -5 lines
Diff to previous 1.291 (colored) to selected 1.104.6.1 (colored)

Make sure not to re-arm the statistics callout when we are about to detach.

Revision 1.277.4.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:09 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.277.4.1: +237 -77 lines
Diff to previous 1.277.4.1 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.291 / (download) - annotate - [select for diffs], Sat May 23 13:44:40 2015 UTC (8 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.290: +2 -3 lines
Diff to previous 1.290 (colored) to selected 1.104.6.1 (colored)

Remove debug printf().

Revision 1.290 / (download) - annotate - [select for diffs], Mon May 18 01:06:35 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.289: +5 -2 lines
Diff to previous 1.289 (colored) to selected 1.104.6.1 (colored)

 Add missing pci_intr_release() for the detach.

Revision 1.289 / (download) - annotate - [select for diffs], Sun May 17 14:23:15 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.288: +8 -2 lines
Diff to previous 1.288 (colored) to selected 1.104.6.1 (colored)

 Fix compile error on non-__HAVE_PCI_MSI_MSIX machines.

Revision 1.288 / (download) - annotate - [select for diffs], Sun May 17 12:06:26 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.287: +154 -59 lines
Diff to previous 1.287 (colored) to selected 1.104.6.1 (colored)

- Add MSI support.
- Use tagged status function for 5717 and newer devices. All controllers
  except BCM5700 support tagged status but we use tagged status only for MSI
  case on BCM5717. Otherwise MSI on BCM5717 does not work. Same as other *BSDs.

Revision 1.277.2.2 / (download) - annotate - [select for diffs], Sat May 9 08:37:53 2015 UTC (8 years, 11 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-0-RC2, netbsd-7-0-RC1
Changes since 1.277.2.1: +3 -3 lines
Diff to previous 1.277.2.1 (colored) to branchpoint 1.277 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #740):
	sys/dev/pci/if_bge.c: revision 1.285
	sys/dev/pci/if_bgereg.h: revision 1.90
Use another firmware command in bge_asf_driver_up(). Same as Lunux.
This change fixes a bug that watchdog timeout occurs every 25-30 minutes
on HP ML110 G6 reported enami@ in PR#49657.

Revision 1.287 / (download) - annotate - [select for diffs], Fri May 1 03:42:15 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.286: +65 -2 lines
Diff to previous 1.286 (colored) to selected 1.104.6.1 (colored)

 Add some workaround code for BGE_ASICREV_BCM5784 from Linux.

Revision 1.286 / (download) - annotate - [select for diffs], Fri May 1 03:26:43 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.285: +2 -11 lines
Diff to previous 1.285 (colored) to selected 1.104.6.1 (colored)

 Remove PCI_PRODUCT_BROADCOM_BCM5724 and PCI_PRODUCT_BROADCOM_BCM5750M.
These devices have not released to public. Same as OpenBSD and Linux.

Revision 1.285 / (download) - annotate - [select for diffs], Thu Apr 30 16:09:06 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.284: +3 -3 lines
Diff to previous 1.284 (colored) to selected 1.104.6.1 (colored)

 Use another firmware command in bge_asf_driver_up(). Same as Linux.
This change fixes a bug that watchdog timeout occurs every 25-30 minutes
on HP ML110 G6 reported enami@ in PR#49657.

Revision 1.284 / (download) - annotate - [select for diffs], Thu Apr 30 15:48:46 2015 UTC (8 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.283: +3 -2 lines
Diff to previous 1.283 (colored) to selected 1.104.6.1 (colored)

- BGE_CHIPID_BCM5784_A1 is not 0x5784100 but 0x5784001. Only dmesg output
  is affected.
- Add BGE_CHIPREV_5784_AX and BGE_CHIPID_BCM5784_B0.

Revision 1.283 / (download) - annotate - [select for diffs], Mon Apr 27 17:42:20 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.282: +5 -3 lines
Diff to previous 1.282 (colored) to selected 1.104.6.1 (colored)

fix mbuf leak on failure (Brainy)

Revision 1.282 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (9 years ago) by riastradh
Branch: MAIN
Changes since 1.281: +3 -3 lines
Diff to previous 1.281 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.277.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:10 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.277: +20 -8 lines
Diff to previous 1.277 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.281 / (download) - annotate - [select for diffs], Mon Apr 6 07:38:17 2015 UTC (9 years ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.280: +6 -3 lines
Diff to previous 1.280 (colored) to selected 1.104.6.1 (colored)

Make sure to halt (not just stop) the bge_tick callout during detach.

Revision 1.280 / (download) - annotate - [select for diffs], Tue Feb 17 23:07:56 2015 UTC (9 years, 2 months ago) by enami
Branch: MAIN
Changes since 1.279: +3 -3 lines
Diff to previous 1.279 (colored) to selected 1.104.6.1 (colored)

Make this file compiles again with BGE_DEBUG defined.

Revision 1.277.2.1 / (download) - annotate - [select for diffs], Tue Feb 17 14:48:10 2015 UTC (9 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.277: +7 -7 lines
Diff to previous 1.277 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #526):
	sys/dev/pci/if_bge.c: revision 1.278
Fix three bugs reported by enami@:
  - bge_miibus_writereg(): Fix a bug that BCM5906 may leave an APE lock.
  - Fix hwcfg4 isn't printed correctly.
  - Fix a bug that BGE_PHY_TEST_CTRL_REG isn't set correctly on some PCIe devices.

Revision 1.279 / (download) - annotate - [select for diffs], Tue Feb 17 10:11:24 2015 UTC (9 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.278: +11 -2 lines
Diff to previous 1.278 (colored) to selected 1.104.6.1 (colored)

 Print bit setting of bge_asf_mode if BGE_DEBUG is set.

Revision 1.200.2.5 / (download) - annotate - [select for diffs], Mon Feb 16 08:32:33 2015 UTC (9 years, 2 months ago) by martin
Branch: netbsd-6
Changes since 1.200.2.4: +7 -7 lines
Diff to previous 1.200.2.4 (colored) to branchpoint 1.200 (colored) next main 1.201 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1256):
	sys/dev/pci/if_bge.c: revision 1.278
Fix three bugs reported by enami@:
  - bge_miibus_writereg(): Fix a bug that BCM5906 may leave an APE lock.
  - Fix hwcfg4 isn't printed correctly.
  - Fix a bug that BGE_PHY_TEST_CTRL_REG isn't set correctly on some PCIe devices.

Revision 1.278 / (download) - annotate - [select for diffs], Wed Feb 11 23:07:13 2015 UTC (9 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.277: +7 -7 lines
Diff to previous 1.277 (colored) to selected 1.104.6.1 (colored)

Fix three bugs reported by enami@:
 - bge_miibus_writereg(): Fix a bug that BCM5906 may leave an APE lock.
 - Fix hwcfg4 isn't printed correctly.
 - Fix a bug that BGE_PHY_TEST_CTRL_REG isn't set correctly on some PCIe devices.

Revision 1.200.2.4 / (download) - annotate - [select for diffs], Sun Dec 7 16:39:55 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-6
Changes since 1.200.2.3: +98 -32 lines
Diff to previous 1.200.2.3 (colored) to branchpoint 1.200 (colored) to selected 1.104.6.1 (colored)

Pull up the following, requested by msaitoh in #1207:

sys/dev/mii/brgphy.c				1.69, 1.71-1.76 via patch
sys/dev/mii/brgphyreg.h				1.6-1.7, 1.9
sys/dev/pci/if_bge.c				1.259,1.267-1.276 via patch
sys/dev/pci/if_bgereg.h				1.87-1.88
sys/dev/pci/if_bnx.c				1.48, 1.49, 1.52-1.57 via patch
sys/dev/pci/if_bnxreg.h				1.15-1.18
sys/dev/pci/if_bnxvar.h				1.4-1.6

	Changes for bge(4), bnx(4) and brgphy(4):
	- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
	  BCM5719 into pcidevs.
	- Change BCM5720's device ID from 0x1658 to 0x165f. 0x1658 is only for
	  the pre-product and not released to public.
	- Fix detection of BGEPHYF_FIBER_{MII|TBI}
	- Fix typo in comment.
	- KNF
	- brgphy(4):
	  - Add BCM5708S support.
	  - Add 2500SX support.
	  - Fix bit definition of BRGPHY_MRBE_MSG_PG5_NP_T2 from FreeBSD.
	  - Remove extra delay in brgphy_mii_phy_auto. Same as {Free,Open}BSD.
	  - Fix media detect on some Fiber chips.
	  - Add BCM5706.
	- bge(4):
	  - Print yet another hardware config word in SRAM(BGE_SRAM_DATA_CFG_5)
	    for BCM5717 and newer devices.
	  - Fix a trivial bug in #ifdef NOTYET.
	  - Add BGEPHYF_NO_WIRESPEED flag for fiber devices.
	  - Print APE firmware correctly.
	  - Don't use the PHY Auto Poll Mode on many chips. This fixes a bug
	    that MII Fiber NIC drop packets about 50%. Same as {Free,Open}BSD.
	    Tested on HP Moonshot.
	  - Add workaround for PR#48451. Some BCM5717-5720 based systems get
	    NMI on boot. This problem doesn't occur when we don't use
	    prefetchable memory in the APE area. I don't know the reason...
	    Tested with HP MicroServer Gen8.
	  - Fix a bug that bge can't be initialized correctly on some sparc64
	    systems (PR#49018).
	  - Change initializaton order as the same as the document, Linux tg3
	    and FreeBSD (part of r241436).
	  - In the BCM5703, the DMA read watermark should be set to less than
	    or equal to the maximum memory read byte count of the PCI-X command
	    register. Same as FreeBSD r204978 and Linux tg3 driver.
	- bnx(4):
	  - Enclose #ifdef BNX_DEBUG correctly.
	  - Add 2500SX support.
	  - Print some information (ASCI revision, PCI status, etc).
	    From FreeBSD.

Revision 1.200.8.1 / (download) - annotate - [select for diffs], Sat Nov 29 11:42:12 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-6-1
Changes since 1.200: +15 -2 lines
Diff to previous 1.200 (colored) next main 1.201 (colored) to selected 1.104.6.1 (colored)

Pullup revision 1.260 (via patch), requested by msaitoh in #1200:

Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0.
This change fixes a serious stability problem on those chips.

Revision 1.200.6.1 / (download) - annotate - [select for diffs], Sat Nov 29 11:38:46 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-6-0
Changes since 1.200: +15 -2 lines
Diff to previous 1.200 (colored) next main 1.201 (colored) to selected 1.104.6.1 (colored)

Pullup revision 1.260 (via patch), requested by msaitoh in #1200:

Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0.
This change fixes a serious stability problem on those chips.

Revision 1.201.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:42 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.201.2.3: +316 -173 lines
Diff to previous 1.201.2.3 (colored) to selected 1.104.6.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.277 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:36 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base, netbsd-7-base
Branch point for: nick-nhusb, netbsd-7
Changes since 1.276: +3 -3 lines
Diff to previous 1.276 (colored) to selected 1.104.6.1 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.266.2.2 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:54 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.266.2.1: +95 -26 lines
Diff to previous 1.266.2.1 (colored) to branchpoint 1.266 (colored) next main 1.267 (colored) to selected 1.104.6.1 (colored)

Rebase.

Revision 1.276 / (download) - annotate - [select for diffs], Tue Aug 5 04:29:01 2014 UTC (9 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.275: +11 -2 lines
Diff to previous 1.275 (colored) to selected 1.104.6.1 (colored)

 In the BCM5703, the DMA read watermark should be set to less than
or equal to the maximum memory read byte count of the PCI-X command
register. Same as FreeBSD r204978 and Linux tg3 driver.

Revision 1.275 / (download) - annotate - [select for diffs], Thu Jul 24 13:22:49 2014 UTC (9 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.274: +20 -2 lines
Diff to previous 1.274 (colored) to selected 1.104.6.1 (colored)

 Yet another change for PR#48451. Don't use prefetchable memory for BAR0, too.
Reported by taca@.

Revision 1.274 / (download) - annotate - [select for diffs], Thu Jul 24 07:33:24 2014 UTC (9 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.273: +9 -8 lines
Diff to previous 1.273 (colored) to selected 1.104.6.1 (colored)

- Fix a bug that bge can't be initialized correctly on some sparc64 systems
  (PR#49018).
  See also: http://mail-index.netbsd.org/port-sparc64/2013/10/28/msg002036.html
- Change initializaton order as the same as the document, Linux tg3 and FreeBSD
  (part of r241436).

Revision 1.273 / (download) - annotate - [select for diffs], Tue Jul 22 17:25:19 2014 UTC (9 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.272: +27 -2 lines
Diff to previous 1.272 (colored) to selected 1.104.6.1 (colored)

 Add workaround for PR#48451. Some BCM5717-5720 based systems get NMI on boot.
This problem doesn't occur when we don't use prefetchable memory in the APE
area. I don't know the reason...  The way to not to use prefetchable memory
was adviced by Riastradh. Tested with HP MicroServer Gen8.

Revision 1.272 / (download) - annotate - [select for diffs], Wed Jul 2 22:25:14 2014 UTC (9 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.271: +15 -7 lines
Diff to previous 1.271 (colored) to selected 1.104.6.1 (colored)

 Don't use the PHY Auto Poll Mode on many chips. This fixes a bug that MII
Fiber NIC drop packet about 50%. Same as {Free,Open}BSD.
Tested on HP Moonshot. Thanks zafer@ for testing.

Revision 1.271 / (download) - annotate - [select for diffs], Mon Jun 23 17:44:31 2014 UTC (9 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.270: +3 -3 lines
Diff to previous 1.270 (colored) to selected 1.104.6.1 (colored)

Print APE firmware correctly.

Revision 1.270 / (download) - annotate - [select for diffs], Tue Jun 17 22:29:13 2014 UTC (9 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.269: +8 -6 lines
Diff to previous 1.269 (colored) to selected 1.104.6.1 (colored)

Add BGEPHYF_NO_WIRESPEED flag for fiber devices.

Revision 1.269 / (download) - annotate - [select for diffs], Tue Jun 17 21:37:20 2014 UTC (9 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.268: +9 -6 lines
Diff to previous 1.268 (colored) to selected 1.104.6.1 (colored)

- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4). The auto negotiation may have some bugs.
- Add 2500SX support (not tested).
- Fix bit definition of BRGPHY_MRBE_MSG_PG5_NP_T2 from FreeBSD.

Revision 1.268 / (download) - annotate - [select for diffs], Tue Jun 17 18:18:51 2014 UTC (9 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored) to selected 1.104.6.1 (colored)

Fix a variable name in last commit.

Revision 1.267 / (download) - annotate - [select for diffs], Tue Jun 17 17:37:08 2014 UTC (9 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.266: +10 -7 lines
Diff to previous 1.266 (colored) to selected 1.104.6.1 (colored)

- Print yet another hardware config word in SRAM(BGE_SRAM_DATA_CFG_5) for
  BCM5717 and newer devices.
- Fix a trivial bug in #ifdef NOTYET.

Revision 1.199.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:40:25 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.199.2.2: +1808 -755 lines
Diff to previous 1.199.2.2 (colored) to branchpoint 1.199 (colored) next main 1.200 (colored) to selected 1.104.6.1 (colored)

sync with head.

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

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

Revision 1.253.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:45:40 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.253.2.1: +160 -127 lines
Diff to previous 1.253.2.1 (colored) next main 1.254 (colored) to selected 1.104.6.1 (colored)

sync with head

Revision 1.266.2.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:33 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.266: +3 -3 lines
Diff to previous 1.266 (colored) to selected 1.104.6.1 (colored)

Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.266 / (download) - annotate - [select for diffs], Sat Mar 29 19:28:24 2014 UTC (10 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.265: +4 -3 lines
Diff to previous 1.265 (colored) to selected 1.104.6.1 (colored)

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

Revision 1.265 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:10 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.264: +2 -8 lines
Diff to previous 1.264 (colored) to selected 1.104.6.1 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.200.2.3 / (download) - annotate - [select for diffs], Sun Nov 17 18:24:05 2013 UTC (10 years, 5 months ago) by bouyer
Branch: netbsd-6
Changes since 1.200.2.2: +155 -114 lines
Diff to previous 1.200.2.2 (colored) to branchpoint 1.200 (colored) to selected 1.104.6.1 (colored)

Apply patch, requested by msaitoh in ticket #983:
	sys/dev/mii/brgphy.c			1.68 via patch
	sys/dev/pci/if_bge.c			1.260-1.262 via patch
	sys/dev/pci/if_bgereg.h			1.85-1.86 via patch
	sys/dev/pci/if_bgevar.h			1.17 via patch

Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0.
Same as Linux tg3 and FreeBSD (part of FreeBSD r204978).
Add 40bit DMA bug workaround(BGEF_40BIT_BUG) from FreeBSD
(part of r199670). This workaround is for 5714/5715 controllers and
is not actually a MAC controller bug but an issue with the embedded
PCIe to PCI-X bridge in the device.  This change
uses bus_dmatag_subregion(), so this workaround won't work on some
archs which doesn't support bus_dmatag_subregion().

Revision 1.264 / (download) - annotate - [select for diffs], Thu Nov 7 18:45:32 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.263: +0 -2 lines
Diff to previous 1.263 (colored) to selected 1.104.6.1 (colored)

Revert previos. Sorry.

Revision 1.263 / (download) - annotate - [select for diffs], Thu Nov 7 18:44:09 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.262: +4 -2 lines
Diff to previous 1.262 (colored) to selected 1.104.6.1 (colored)

Add Quark X1000 devices.

Revision 1.262 / (download) - annotate - [select for diffs], Thu Oct 31 06:01:39 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.261: +26 -2 lines
Diff to previous 1.261 (colored) to selected 1.104.6.1 (colored)

 Add 40bit DMA bug workaround(BGEF_40BIT_BUG) from FreeBSD (part of r199670).
This workaround is for 5714/5715 controllers and is not actually a MAC
controller bug but an issue with the embedded PCIe to PCI-X bridge in the
device.
 This change uses bus_dmatag_subregion(), so this workaround won't work on some
archs which doesn't support bus_dmatag_subregion().

Revision 1.261 / (download) - annotate - [select for diffs], Thu Oct 31 04:26:40 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.260: +117 -113 lines
Diff to previous 1.260 (colored) to selected 1.104.6.1 (colored)

Cleanup flag setting. No functional change.
- Split flags into bge_flags and bge_phy_flags.
- Rename flags. PHY related flags are prefixed with BGEPHYF_*.
  Other flags are prefixed with BGEF_*.

Revision 1.260 / (download) - annotate - [select for diffs], Mon Oct 28 05:37:24 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.259: +16 -3 lines
Diff to previous 1.259 (colored) to selected 1.104.6.1 (colored)

 Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0.
Same as Linux tg3 and FreeBSD (part of FreeBSD r204978).

Revision 1.259 / (download) - annotate - [select for diffs], Thu Sep 12 21:11:37 2013 UTC (10 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.258: +5 -8 lines
Diff to previous 1.258 (colored) to selected 1.104.6.1 (colored)

Remove unused variable

Revision 1.200.2.2 / (download) - annotate - [select for diffs], Sat Sep 7 16:39:32 2013 UTC (10 years, 7 months ago) by bouyer
Branch: netbsd-6
Changes since 1.200.2.1: +1687 -665 lines
Diff to previous 1.200.2.1 (colored) to branchpoint 1.200 (colored) to selected 1.104.6.1 (colored)

sys/dev/pci/if_bge.c		1.203-1.237, 1.239-1.241, 1.243-1.258 via patch
sys/dev/pci/if_bgereg.h		1.58-1.74, 1.76-1.83 via patch
sys/dev/pci/if_bgevar.h		1.10-1.16 via patch
sys/dev/pci/pcidevs		1.1149 via patch
sys/dev/pci/pcidevs.h		regen
sys/dev/pci/pcidevs_data.h	regen
sys/dev/mii/brgphy.c		1.61-1.63, 1.65, 1.67 via patch
sys/dev/mii/miivar.h		1.61 via patch
sys/dev/mii/miidevs		1.112-1.113 via patch
sys/dev/mii/miidevs.h		regen
sys/dev/mii/miidevs_data.h	regen
share/man/man4/bge.4		1.13-1.15 via patch

	Add some device support, fix a lot of bugs and add some enahcements.
	- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F,
	  BCM5785G, BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
	- brgphy(4): Add BCM5756, BCM5717C, BCM5719C, BCM5720C and BCM57780.
	- Add some bugfixes and enhancement from FreeBSD:
	  - Workaround for BCM5906 silicon bug. When auto-negotiation results in
	   half-duplex operation, excess collision on the ethernet link may
	   cause internal chip delays that may result in subsequent valid
	   frames being dropped due to insufficient receive buffer resources.
	   (FreeBSD: r214219, r214251, r214292)
	  - Allow write DMA to request larger DMA burst size to get better
	   performance on BCM5785.
	   (FreeBSD r213333: OpenBSD 1.294)
	  - Enable TX MAC state machine lockup fix for both BCM5755 or higher
	   and BCM5906. Publicly available data sheet just says it may happen
	   due to corrupted TxMbuf.
	   (FreeBSD r214216)
	  - Follow Broadcom datasheet:
	   Delay 100 microseconds after enabling transmit MAC.
	   Delay 10 microseconds after enabling receive MAC.
	   (FreeBSD r241220)
	- Insert the completion barrier between register write and the
	  consecutive delay(). It will fix some device timeout problems
	  we have seen before.
	- Add DELAY(40) after turning on write DMA state machine.
	- Add some workarounds for 5717 A0 and 5776[56] to be stable.
	  From Linux tg3 driver.
	- Sync with *BSD. No functional change:
	  - make bge_chipid() and use it.
	  - use switch() instead of a lot of if()s.
	- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case.
	  Note that {tcp,udp}6csum flag is currently not added in the
	  capability.
	- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
	  checking.  FreeBSD has the same delay().
	- Rename PHY related flags for the consistency. It's the same as
	  FreeBSD.
	- Remove BGE_10_100_ONLY flag because this was not used.
	  For 10/100 devices, when calling mii_attach(), mask BMSR_EXTSTAT
	  flag to not to check Gigabit flags. It's the same as FreeBSD.
	- In brgphyattach(), set sc_isbge, sc_isbnx and sc_phyflags before
	  PHY_RESET() because brgphy_reset() refers those flags.
	- Call brgpy specific autonego function in MII_TICK. Before this commit,
	  only MII_MEDIACHG calls brgphy_mii_phy_auto() and MII_TICK calls MI
	  mii_phy_auto(). That was not intended.
	- Sync with FreeBSD and OpenBSD. Almost the same as OpenBSD rev. 1.325:
	  - Sync the ring setup code closer to FreeBSD's driver
	  - Do not touch the jumbo replenish threshold register on chips that
	    do not have jumbo support
	- Wait for the bootcode to complete initialization for 5717 and newer
	  devices.  See BCM5718 programmer's guide's "step 13,
	  Device reset Procedure, Section7".
	  57781's document has the same note.
	- 5718 and 57785 document say we should wait 100us.
	- Change the order of register settings a little to match both
	  Broadcom's document and Linux tg3.
	- Add detach function.
	- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
	- Fix a bug that the NVRAM lock timeout occured on sparc64 onboard bge.
	- Check BGE_SGDIG_STS when the chip is NOT a 5717 A0, like freebsd
	  (OpenBSD rev. 1.327).
	- Fix the setting of Tx Random Backoff Register.
	- Add BGE_PCIMISCCTL_PCISTATE_RW in BGE_INIT. It's required to set the
	  PCISTATE register correctly.
	- Update comments from 57XX-PG105-R.pdf and 5718-PG106-R.pdf.
	- Add missing bus_dmamap_sync() in bge_intr(). The status word is
	  in DMAed area. Same as other *BSDs.
	- Check the hardware config words and print them. This change only
	  read them and print the values.
	- Set BGE_MISC_CTL's byte/word swap options before using
	  bge_readmem_ind().
	- For BGE_IS_575X_PLUS() devices, don't set
	  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
	- bge_init_tx_ring() uses BGE_RSLOTS (==256) but bge_free_tx_ring() uses
	  BGE_TX_RING_CNT (== 512). Delete BGE_RSLOTS and use BGE_TX_RING_CNT.
	  Same as OpenBSD's if_bge.c rev. 1.86.
	- Document says 5717 and newer chips have no
	  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
	  chips. Same as OpenBSD.
	- Fix a bug that the PHY address bits in MI_MODE register is wrongly
	  cleard.  Set the PHY address correctly.
	- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
	  register to not to modify some GPIO bits.
	- Call bge_poll_fw() before writing BGE_MODE_CTL register like the
	  latest linux tg3 dirver.
	- Set DMA watermark depend on the PCI max payload size.
	- Add BGE_JUMBO_CAPABLE flag to some chips. With this commit, 5714,
	  5780, 5717, 5718, 5719 (exclude rev. A0), 5720, 57765 and 57766 are
	  added to support jumbo frame.
	- Fix the setting of sc->bge_flags for 5717 and newer devices.
	- Fix a link detect bug on non-autopoll systems. Same as OpenBSD
	  (rev.1.329 and 1.336) and FreeBSD (r213710).
	- 57765 series is not based on 5717 series. 5717 series is based on
	  57765 series.
	- Set the TX DMA segment size based on the MTU size.
	- Change the TX ring size for 5717 series and 57764 series.
	- For 57766, set BGE_RDMAMODE_JMB_2K_MMRR for non-jumbo frame.
	  Same as Linux tg3.
	- For 57765 and newer devices, set BGE_MAX_RX_FRAME_LOWAT to 1.
	  This value is recommended by the document.
	- Change sysctl related functions for consistency.
	- Style change.
	- Use macro. Remove duplicated macro. Remove unused variable.
	- Fix comments. Add comments.
	- Remove extra semicolon. Remove unused code.
	[msaitoh, ticket #939]

Revision 1.253.2.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:25 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.253: +77 -36 lines
Diff to previous 1.253 (colored) to selected 1.104.6.1 (colored)

sync with head

Revision 1.200.2.1 / (download) - annotate - [select for diffs], Mon Aug 26 04:00:16 2013 UTC (10 years, 7 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.200: +42 -11 lines
Diff to previous 1.200 (colored) to selected 1.104.6.1 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #652):
	sys/dev/mii/brgphy.c                            1.60
	sys/dev/pci/if_bge.c                            1.202
	sys/dev/pci/if_bgereg.h                         1.57
Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
to Gigabit Ethernet adapter.  PR kern/46961.

Revision 1.258 / (download) - annotate - [select for diffs], Mon Jul 8 05:36:23 2013 UTC (10 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.257: +30 -4 lines
Diff to previous 1.257 (colored) to selected 1.104.6.1 (colored)

- Set the TX DMA segment size based on the MTU size.
- Change the TX ring size for 5717 series and 57764 series.
- For 57766, set BGE_RDMAMODE_JMB_2K_MMRR for non-jumbo frame.
  Same as Linux tg3.
- For 57765 and newer devices, set BGE_MAX_RX_FRAME_LOWAT to 1.
  This value is recommended by the document.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Jul 8 05:24:34 2013 UTC (10 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.256: +21 -21 lines
Diff to previous 1.256 (colored) to selected 1.104.6.1 (colored)

 57765 series is not based on 5717 series. 5717 series is based on 57765
series.

Revision 1.256 / (download) - annotate - [select for diffs], Fri Jul 5 07:08:26 2013 UTC (10 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.255: +22 -11 lines
Diff to previous 1.255 (colored) to selected 1.104.6.1 (colored)

 Fix a link detect bug on non-autopoll systems. Same as OpenBSD
(rev.1.329 and 1.336) and FreeBSD (r213710).

Revision 1.255 / (download) - annotate - [select for diffs], Wed Jul 3 15:21:35 2013 UTC (10 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.254: +3 -3 lines
Diff to previous 1.254 (colored) to selected 1.104.6.1 (colored)

 Fix the setting of sc->bge_flags for 5717 and newer devices. Reported by
Mike Belopuhov.

Revision 1.254 / (download) - annotate - [select for diffs], Wed Jul 3 05:49:36 2013 UTC (10 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.253: +9 -5 lines
Diff to previous 1.253 (colored) to selected 1.104.6.1 (colored)

 Add BGE_JUMBO_CAPABLE flag to some chips. Before this commit,
the following chips support the jumbo frame function:

	5700
	5701
	5702
	5703
	5704

With this commit, the following chip support it, too:

	5714
	5780
	5717
	5718
	5719 (exclude rev. A0)
	5720
	57765
	57766

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

resync from head

Revision 1.253 / (download) - annotate - [select for diffs], Fri May 31 17:48:12 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Branch point for: rmind-smpnet
Changes since 1.252: +17 -9 lines
Diff to previous 1.252 (colored) to selected 1.104.6.1 (colored)

- Revert rev. 1.250. I really misunderstood. Add some comments.
- Set DMA watermark depend on the PCI max payload size.

Revision 1.252 / (download) - annotate - [select for diffs], Thu May 30 05:50:06 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.251: +6 -21 lines
Diff to previous 1.251 (colored) to selected 1.104.6.1 (colored)

 0x4B657654(BGE_SRAM_FW_MB_MAGIC) == ~0xB49A89AB(BGE_SRAM_FW_MB_RESET_MAGIC),
so the same code I added in rev. 1.223 exists in bge_poll_fw(), too. Remove it.

 And then, call bge_poll_fw() before writing BGE_MODE_CTL register like the
latest linux tg3 dirver.

Revision 1.251 / (download) - annotate - [select for diffs], Wed May 29 08:24:06 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.250: +3 -3 lines
Diff to previous 1.250 (colored) to selected 1.104.6.1 (colored)

 Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL register
to not to modify some GPIO bits.

Revision 1.250 / (download) - annotate - [select for diffs], Tue May 28 17:03:34 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.249: +3 -3 lines
Diff to previous 1.249 (colored) to selected 1.104.6.1 (colored)

Fix a bug that the MAC_MODE register is incorrectly set in bge_reset().

Revision 1.249 / (download) - annotate - [select for diffs], Tue May 28 05:55:40 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.248: +8 -5 lines
Diff to previous 1.248 (colored) to selected 1.104.6.1 (colored)

 Fix a bug that the PHY address bits in MI_MODE register is wrongly cleard.
Set the PHY address correctly.

Revision 1.248 / (download) - annotate - [select for diffs], Fri May 24 11:47:47 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.247: +17 -23 lines
Diff to previous 1.247 (colored) to selected 1.104.6.1 (colored)

 On sparc64, the memory arbiter may be disabled by OF.
Move the HW config checking stuff to after bge_reset(). bge_reset()
initializes both byte order settings and the memory arbiter.

 The hwcfg stuff will be required in bge_reset() in future, so we should
rethink about hwconfig and bge_reset().

Revision 1.247 / (download) - annotate - [select for diffs], Fri May 24 02:35:28 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.246: +9 -4 lines
Diff to previous 1.246 (colored) to selected 1.104.6.1 (colored)

 Document says 5717 and newer chips have no BGE_PCISTATE_INTR_NOT_ACTIVE bit,
so don't use the bit on those chips. Same as OpenBSD.

Revision 1.246 / (download) - annotate - [select for diffs], Fri May 24 02:29:36 2013 UTC (10 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.245: +3 -3 lines
Diff to previous 1.245 (colored) to selected 1.104.6.1 (colored)

 bge_init_tx_ring() uses BGE_RSLOTS (==256) but bge_free_tx_ring() uses
BGE_TX_RING_CNT (== 512). Delete BGE_RSLOTS and use BGE_TX_RING_CNT. Same as
OpenBSD's if_bge.c rev. 1.86.

Revision 1.245 / (download) - annotate - [select for diffs], Tue May 21 06:59:28 2013 UTC (10 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.244: +4 -4 lines
Diff to previous 1.244 (colored) to selected 1.104.6.1 (colored)

Stopgap: disable access to BGE_SRAM_DATA_SIG, it is not implemented in all
variants and access may crash the kernel.
msaitoh: please fix properly, I have no idea how.

Revision 1.244 / (download) - annotate - [select for diffs], Mon May 13 17:10:58 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.243: +7 -1 lines
Diff to previous 1.243 (colored) to selected 1.104.6.1 (colored)

For BGE_IS_575X_PLUS() devices, don't set BGE_RXLPSTATCONTROL_DACK_FIX bits because
these bits are reserved.

Revision 1.243 / (download) - annotate - [select for diffs], Mon May 13 17:08:20 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.242: +9 -6 lines
Diff to previous 1.242 (colored) to selected 1.104.6.1 (colored)

 Set BGE_MISC_CTL's byte/word swap options before using bge_readmem_ind().
Fixes PR#47716.

 Re-enable NVRAM lock stuff again (i.e. revert rev. 1.233).

Revision 1.242 / (download) - annotate - [select for diffs], Fri May 10 16:37:10 2013 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.241: +2 -4 lines
Diff to previous 1.241 (colored) to selected 1.104.6.1 (colored)

no need for vlan.h here.

Revision 1.241 / (download) - annotate - [select for diffs], Wed May 8 04:05:46 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.240: +34 -16 lines
Diff to previous 1.240 (colored) to selected 1.104.6.1 (colored)

 Check the hardware config words and print them. This change only read them
and print the values.

Revision 1.240 / (download) - annotate - [select for diffs], Wed May 8 03:13:35 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.239: +6 -2 lines
Diff to previous 1.239 (colored) to selected 1.104.6.1 (colored)

 Add missing bus_dmamap_sync() in bge_intr(). The status word is in DMAed area.
Same as *BSDs.

Revision 1.239 / (download) - annotate - [select for diffs], Sun May 5 11:28:34 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.238: +9 -7 lines
Diff to previous 1.238 (colored) to selected 1.104.6.1 (colored)

Check whether sc->bge_dmatag != NULL or not. Fix a bug that
bge_release_resources() panics when bge_attach failed.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Apr 21 19:59:40 2013 UTC (10 years, 11 months ago) by msaitoh
Branch: MAIN
Changes since 1.237: +13 -13 lines
Diff to previous 1.237 (colored) to selected 1.104.6.1 (colored)

Delete "PCI_" from PCIX and PICE capability registers.

Revision 1.237 / (download) - annotate - [select for diffs], Fri Apr 12 03:33:17 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.236: +4 -4 lines
Diff to previous 1.236 (colored) to selected 1.104.6.1 (colored)

Cleanup. No functional change.

Revision 1.236 / (download) - annotate - [select for diffs], Thu Apr 11 11:24:07 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.235: +99 -23 lines
Diff to previous 1.235 (colored) to selected 1.104.6.1 (colored)

Update comments from 57XX-PG105-R.pdf and 5718-PG106-R.pdf.
No functional change.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Apr 8 15:55:58 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.234: +5 -5 lines
Diff to previous 1.234 (colored) to selected 1.104.6.1 (colored)

Fix the setting of Tx Random Backoff Register.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Apr 8 03:35:11 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.233: +3 -3 lines
Diff to previous 1.233 (colored) to selected 1.104.6.1 (colored)

Check BGE_SGDIG_STS when the chip is NOT a 5717 A0, like freebsd
(OpenBSD rev. 1.327).

Revision 1.233 / (download) - annotate - [select for diffs], Mon Apr 8 01:59:11 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.232: +6 -2 lines
Diff to previous 1.232 (colored) to selected 1.104.6.1 (colored)

 Temporary disable the NVRAM locking stuff for PR#47716.
I'll get PowerMac G5 in a few days and will fix correctly.

Revision 1.232 / (download) - annotate - [select for diffs], Tue Apr 2 12:27:02 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.231: +13 -3 lines
Diff to previous 1.231 (colored) to selected 1.104.6.1 (colored)

Fix a bug that the NVRAM lock timeout occured on sparc64 onboard bge.
Tested by martin.
- Don't acquire NVRAM lock if no EEPROM(or NVRAM?).
- Reset NVRAM before bge_reset(). It's required to acquire NVRAM lock in
  bge_reset().

Revision 1.231 / (download) - annotate - [select for diffs], Tue Apr 2 10:12:22 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.230: +3 -3 lines
Diff to previous 1.230 (colored) to selected 1.104.6.1 (colored)

Fix APE lock bug for PHYs (FreeBSD r248993)

Revision 1.230 / (download) - annotate - [select for diffs], Sat Mar 30 03:21:03 2013 UTC (11 years ago) by christos
Branch: MAIN
Changes since 1.229: +6 -6 lines
Diff to previous 1.229 (colored) to selected 1.104.6.1 (colored)

remove trailing whitespace

Revision 1.229 / (download) - annotate - [select for diffs], Wed Mar 27 12:03:51 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.228: +2 -29 lines
Diff to previous 1.228 (colored) to selected 1.104.6.1 (colored)

Revert 1.228 except BGE_NO_EEPROM flag for BCM5906. Sorry.

Revision 1.228 / (download) - annotate - [select for diffs], Wed Mar 27 10:26:05 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.227: +32 -2 lines
Diff to previous 1.227 (colored) to selected 1.104.6.1 (colored)

Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.

Revision 1.227 / (download) - annotate - [select for diffs], Sun Mar 24 22:33:59 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.226: +71 -19 lines
Diff to previous 1.226 (colored) to selected 1.104.6.1 (colored)

- Add detach function.
- Remove old unused bge_vpd_*.

Revision 1.226 / (download) - annotate - [select for diffs], Sun Mar 24 19:16:10 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.225: +7 -12 lines
Diff to previous 1.225 (colored) to selected 1.104.6.1 (colored)

 Back out rev. 1.210. The PCI config registers of bge are shadowed in the
device register window, so don't use pci_conf_*() again because those
access are slow.

Revision 1.225 / (download) - annotate - [select for diffs], Sat Mar 23 21:08:50 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.224: +8 -8 lines
Diff to previous 1.224 (colored) to selected 1.104.6.1 (colored)

 Change the order of register settings a little to match both Broadcom's
document and Linux tg3.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Mar 23 19:40:43 2013 UTC (11 years ago) by msaitoh
Branch: MAIN
Changes since 1.223: +6 -2 lines
Diff to previous 1.223 (colored) to selected 1.104.6.1 (colored)

5718 and 57785 document say we should wait 100us.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Mar 21 12:56:03 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.222: +16 -2 lines
Diff to previous 1.222 (colored) to selected 1.104.6.1 (colored)

Wait for the bootcode to complete initialization for 5717 and newer devices.
See BCM5718 programmer's guide's "step 13, Device reset Procedure, Section 7".
57781's document has the same note.

I verified the loop really looped on those chips.

But, I don't know why tg3 doesn't it.

Revision 1.222 / (download) - annotate - [select for diffs], Thu Mar 21 12:33:11 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.221: +116 -74 lines
Diff to previous 1.221 (colored) to selected 1.104.6.1 (colored)

- Sync with FreeBSD and OpenBSD. Almost the same as OpenBSD rev. 1.325:
 - Sync the ring setup code closer to FreeBSD's driver
 - Do not touch the jumbo replenish threshold register on chips that do not
   have jumbo support
 - Add/sync some of the comments
- Use macro.
- Remove unused code.

Revision 1.221 / (download) - annotate - [select for diffs], Tue Mar 19 16:49:11 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored) to selected 1.104.6.1 (colored)

Fix compile error if BGE_DEBUG is set.

Revision 1.220 / (download) - annotate - [select for diffs], Tue Mar 19 04:10:13 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.219: +33 -16 lines
Diff to previous 1.219 (colored) to selected 1.104.6.1 (colored)

- Rename PHY related flags for the consistency. It's the same as FreeBSD.
- Remove BGE_10_100_ONLY flag because this was not used.
  For 10/100 devices, when calling mii_attach(), mask BMSR_EXTSTAT flag to
  not to check Gigabit flags. It's the same as FreeBSD.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Mar 19 03:40:16 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.218: +50 -29 lines
Diff to previous 1.218 (colored) to selected 1.104.6.1 (colored)

Fix three bugs:
- An workaround for TX data corruption is only for 5719 "A0".
  Fix the wrong evaluation.
- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case.
  Note that {tcp,udp}6csum flag is currently not added in the capability.
- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link checking.
  FreeBSD has the same delay().

Revision 1.218 / (download) - annotate - [select for diffs], Tue Mar 19 02:56:16 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.217: +4 -14 lines
Diff to previous 1.217 (colored) to selected 1.104.6.1 (colored)

Fix Buffer Manager Mbuf Pool settings which was modified in rev. 1.202.

Revision 1.217 / (download) - annotate - [select for diffs], Sun Mar 17 18:46:10 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.216: +6 -5 lines
Diff to previous 1.216 (colored) to selected 1.104.6.1 (colored)

No functional change:
 - Fix comment
 - Use macro
 - Remove unused macro

Revision 1.216 / (download) - annotate - [select for diffs], Sun Mar 17 04:06:39 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.215: +887 -330 lines
Diff to previous 1.215 (colored) to selected 1.104.6.1 (colored)

- ADD support for BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
- Use macros.
- Remove unused code.
- Sync with the latest {Free,Open}BSD's bge.

Revision 1.215 / (download) - annotate - [select for diffs], Thu Mar 14 18:49:20 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.214: +80 -75 lines
Diff to previous 1.214 (colored) to selected 1.104.6.1 (colored)

Sync with *BSD. No functional change:
- make bge_chipid() and use it.
- use switch() instead of a lot of if()s.
- sort lines.

Revision 1.214 / (download) - annotate - [select for diffs], Wed Mar 13 09:44:20 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.213: +126 -9 lines
Diff to previous 1.213 (colored) to selected 1.104.6.1 (colored)

- Add some workarounds for 5717 A0 and 5776[56] to be stable.
  From Linux tg3 driver.
- Use macro.

Revision 1.213 / (download) - annotate - [select for diffs], Thu Mar 7 10:57:01 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.212: +4 -3 lines
Diff to previous 1.212 (colored) to selected 1.104.6.1 (colored)

Add DELAY(40) after turning on write DMA state machine.

Revision 1.212 / (download) - annotate - [select for diffs], Thu Mar 7 09:24:24 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.211: +4 -2 lines
Diff to previous 1.211 (colored) to selected 1.104.6.1 (colored)

BCM5720 is not supported yet.

Revision 1.211 / (download) - annotate - [select for diffs], Thu Mar 7 08:46:54 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.210: +40 -28 lines
Diff to previous 1.210 (colored) to selected 1.104.6.1 (colored)

Insert the completion barrier between register write and the
consecutive delay(). It will fix some device timeout problems
we have seen before.

Revision 1.210 / (download) - annotate - [select for diffs], Thu Mar 7 04:42:09 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.209: +12 -7 lines
Diff to previous 1.209 (colored) to selected 1.104.6.1 (colored)

Fix a bug that some PCI config registers are accessed not using
pci_conf_{read,write}. Registers named BGE_PCI_* are PCI config
registers.

Revision 1.209 / (download) - annotate - [select for diffs], Thu Mar 7 03:53:35 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.208: +22 -2 lines
Diff to previous 1.208 (colored) to selected 1.104.6.1 (colored)

Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G and BCM5787F.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Mar 3 20:20:14 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.207: +9 -10 lines
Diff to previous 1.207 (colored) to selected 1.104.6.1 (colored)

Style fix. No functional change.

Revision 1.207 / (download) - annotate - [select for diffs], Wed Feb 27 14:19:38 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.206: +18 -26 lines
Diff to previous 1.206 (colored) to selected 1.104.6.1 (colored)

No functional change:
- Fix comments.
- Change macro name.
- Change sysctl related functions for consistency.

Revision 1.206 / (download) - annotate - [select for diffs], Tue Feb 26 11:06:23 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.205: +24 -3 lines
Diff to previous 1.205 (colored) to selected 1.104.6.1 (colored)

Add some bugfixes and enhancement from FreeBSD:

- Workaround for BCM5906 silicon bug. When auto-negotiation results in
 half-duplex operation, excess collision on the ethernet link may cause
 internal chip delays that may result in subsequent valid frames being
 dropped due to insufficient receive buffer resources.
 (FreeBSD: r214219, r214251, r214292)

- Allow write DMA to request larger DMA burst size to get better
 performance on BCM5785.
 (FreeBSD r213333: OpenBSD 1.294)

- Enable TX MAC state machine lockup fix for both BCM5755 or higher
 and BCM5906. Publicly available data sheet just says it may happen
 due to corrupted TxMbuf.
 (FreeBSD r214216)

- Follow Broadcom datasheet:
 Delay 100 microseconds after enabling transmit MAC.
 Delay 10 microseconds after enabling receive MAC.
 (FreeBSD r241220)

Revision 1.205 / (download) - annotate - [select for diffs], Tue Feb 26 11:03:17 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.204: +5 -5 lines
Diff to previous 1.204 (colored) to selected 1.104.6.1 (colored)

Use macro. Remove extra semicolon. No functional change.

Revision 1.204 / (download) - annotate - [select for diffs], Mon Feb 25 00:36:22 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.203: +14 -17 lines
Diff to previous 1.203 (colored) to selected 1.104.6.1 (colored)

Use macro. Remove duplicated macro. Remove unused variable.
No functional Change.

Revision 1.201.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:17 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.201.2.1: +60 -64 lines
Diff to previous 1.201.2.1 (colored) to selected 1.104.6.1 (colored)

resync with head

Revision 1.203 / (download) - annotate - [select for diffs], Fri Feb 22 06:11:17 2013 UTC (11 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.202: +60 -64 lines
Diff to previous 1.202 (colored) to selected 1.104.6.1 (colored)

Style change. It's mainly intended to reduce the diff between Fx and Nx.

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:15 2012 UTC (11 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.201: +42 -11 lines
Diff to previous 1.201 (colored) to selected 1.104.6.1 (colored)

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

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

sync with head

Revision 1.202 / (download) - annotate - [select for diffs], Mon Sep 17 11:54:36 2012 UTC (11 years, 7 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.201: +42 -11 lines
Diff to previous 1.201 (colored) to selected 1.104.6.1 (colored)

Add support for BCM57762, found in Apple's Thunderbolt to Gigabit Ethernet
Adapter.  PR kern/46961 from Ryo ONODERA.

Also revert weird BGE_MAX_FRAMELEN macro definition to sync its usage
with the original FreeBSD's bge.

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

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

Revision 1.122.2.12 / (download) - annotate - [select for diffs], Wed Jun 13 15:55:03 2012 UTC (11 years, 10 months ago) by sborrill
Branch: netbsd-4
Changes since 1.122.2.11: +4 -4 lines
Diff to previous 1.122.2.11 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored) to selected 1.104.6.1 (colored)

Pull up the following revisions(s) (requested by buhrow in ticket #1449):
	sys/dev/pci/if_bge.c:		1.194 via patch

Instruct hardware to perform checksumming over the entire packet not just
over the payload and notify upper layers appropriately. Fixes PR kern/40018.

Revision 1.199.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:45 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.199: +4 -13 lines
Diff to previous 1.199 (colored) to selected 1.104.6.1 (colored)

sync with head

Revision 1.199.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:38 2012 UTC (12 years, 2 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) to selected 1.104.6.1 (colored)

merge to -current.

Revision 1.200 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:05 2012 UTC (12 years, 2 months ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.199: +4 -13 lines
Diff to previous 1.199 (colored) to selected 1.104.6.1 (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 (12 years, 5 months 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) to selected 1.104.6.1 (colored)

allow disabling interrupt mitigation

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:04 2011 UTC (12 years, 9 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) to selected 1.104.6.1 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.180.4.6 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:16 2011 UTC (12 years, 10 months 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.198 / (download) - annotate - [select for diffs], Thu Jun 9 12:04:29 2011 UTC (12 years, 10 months 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) to selected 1.104.6.1 (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 (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.190: +23 -5 lines
Diff to previous 1.190 (colored) next main 1.191 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.197 / (download) - annotate - [select for diffs], Fri Jun 3 09:51:40 2011 UTC (12 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.196: +7 -2 lines
Diff to previous 1.196 (colored) to selected 1.104.6.1 (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 (12 years, 10 months 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.196 / (download) - annotate - [select for diffs], Sun May 22 08:15:20 2011 UTC (12 years, 11 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) to selected 1.104.6.1 (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 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.194: +4 -3 lines
Diff to previous 1.194 (colored) to selected 1.104.6.1 (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 (12 years, 11 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.152.4.5: +4 -4 lines
Diff to previous 1.152.4.5 (colored) to branchpoint 1.152 (colored) to selected 1.104.6.1 (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 years 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.194 / (download) - annotate - [select for diffs], Mon Apr 18 22:05:39 2011 UTC (13 years ago) by buhrow
Branch: MAIN
Changes since 1.193: +4 -4 lines
Diff to previous 1.193 (colored) to selected 1.104.6.1 (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 years ago) by sborrill
Branch: MAIN
Changes since 1.192: +2 -18 lines
Diff to previous 1.192 (colored) to selected 1.104.6.1 (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 years ago) by sborrill
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored) to selected 1.104.6.1 (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 years ago) by sborrill
Branch: MAIN
Changes since 1.190: +18 -2 lines
Diff to previous 1.190 (colored) to selected 1.104.6.1 (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 (13 years, 1 month 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.190 / (download) - annotate - [select for diffs], Sun Jan 9 13:01:03 2011 UTC (13 years, 3 months 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) to selected 1.104.6.1 (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 (13 years, 3 months ago) by sketch
Branch: MAIN
Changes since 1.188: +4 -3 lines
Diff to previous 1.188 (colored) to selected 1.104.6.1 (colored)

Use aprint_verbose_dev.

Revision 1.152.4.5 / (download) - annotate - [select for diffs], Fri Nov 19 23:58:40 2010 UTC (13 years, 5 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) to selected 1.104.6.1 (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 (13 years, 5 months ago) by uebayasi
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.187: +2 -3 lines
Diff to previous 1.187 (colored) to selected 1.104.6.1 (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 (13 years, 5 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) to selected 1.104.6.1 (colored)

Sync with HEAD (-D20101022).

Revision 1.187 / (download) - annotate - [select for diffs], Sat Oct 16 06:29:33 2010 UTC (13 years, 6 months 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) to selected 1.104.6.1 (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 (13 years, 8 months 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.145.10.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:45 2010 UTC (13 years, 8 months 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.186 / (download) - annotate - [select for diffs], Wed Jul 21 15:35:39 2010 UTC (13 years, 9 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) to selected 1.104.6.1 (colored)

Use ether_set_ifflags_cb()

Revision 1.180.4.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:36 2010 UTC (13 years, 9 months 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.185 / (download) - annotate - [select for diffs], Thu Jun 3 00:05:36 2010 UTC (13 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.104.6.1 (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 (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.180: +20 -16 lines
Diff to previous 1.180 (colored) to selected 1.104.6.1 (colored)

sync with head

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

Fix some typos in comments.

Revision 1.180.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:33 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.180: +15 -11 lines
Diff to previous 1.180 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

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

console spam

Revision 1.152.4.2.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:40 2010 UTC (14 years 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) to selected 1.104.6.1 (colored)

sync to netbsd-5

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

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Wed Feb 3 15:36:36 2010 UTC (14 years, 2 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) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.178: +5 -4 lines
Diff to previous 1.178 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.177: +56 -66 lines
Diff to previous 1.177 (colored) to selected 1.104.6.1 (colored)

ANSI C, KNF and tabify

Revision 1.177 / (download) - annotate - [select for diffs], Thu Jan 28 03:09:13 2010 UTC (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.176: +311 -135 lines
Diff to previous 1.176 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.175: +3 -14 lines
Diff to previous 1.175 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.173: +25 -5 lines
Diff to previous 1.173 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.171: +572 -293 lines
Diff to previous 1.171 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.170: +8 -13 lines
Diff to previous 1.170 (colored) to selected 1.104.6.1 (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 (14 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.169: +121 -122 lines
Diff to previous 1.169 (colored) to selected 1.104.6.1 (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 (14 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.168: +4 -11 lines
Diff to previous 1.168 (colored) to selected 1.104.6.1 (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 (14 years, 7 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.168 / (download) - annotate - [select for diffs], Sat Sep 5 14:09:55 2009 UTC (14 years, 7 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) to selected 1.104.6.1 (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 (14 years, 8 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.122.2.11 / (download) - annotate - [select for diffs], Tue Aug 18 10:10:19 2009 UTC (14 years, 8 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) to selected 1.104.6.1 (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 (14 years, 8 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-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1
Changes since 1.152.4.3: +6 -5 lines
Diff to previous 1.152.4.3 (colored) to branchpoint 1.152 (colored) to selected 1.104.6.1 (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 (14 years, 8 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) to selected 1.104.6.1 (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 (14 years, 8 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) to selected 1.104.6.1 (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 (14 years, 8 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jul 23 05:05:13 2009 UTC (14 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: jymxensuspend-base
Changes since 1.165: +18 -38 lines
Diff to previous 1.165 (colored) to selected 1.104.6.1 (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 (14 years, 11 months 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:20:24 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.155: +861 -971 lines
Diff to previous 1.155 (colored) to selected 1.104.6.1 (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 (14 years, 11 months 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) to selected 1.104.6.1 (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 (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.145: +1077 -946 lines
Diff to previous 1.145 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.152.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:56 2009 UTC (14 years, 11 months 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Apr 23 10:47:44 2009 UTC (14 years, 11 months 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) to selected 1.104.6.1 (colored)

use proplib

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

remove obsolete code.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Apr 19 11:10:36 2009 UTC (15 years ago) by msaitoh
Branch: MAIN
Changes since 1.161: +29 -13 lines
Diff to previous 1.161 (colored) to selected 1.104.6.1 (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 (15 years ago) by msaitoh
Branch: MAIN
Changes since 1.160: +323 -133 lines
Diff to previous 1.160 (colored) to selected 1.104.6.1 (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 (15 years ago) by msaitoh
Branch: MAIN
Changes since 1.159: +4 -4 lines
Diff to previous 1.159 (colored) to selected 1.104.6.1 (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 (15 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.158: +20 -3 lines
Diff to previous 1.158 (colored) to selected 1.104.6.1 (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 (15 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.157: +956 -1128 lines
Diff to previous 1.157 (colored) to selected 1.104.6.1 (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 (15 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.156: +159 -284 lines
Diff to previous 1.156 (colored) to selected 1.104.6.1 (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 (15 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.155: +11 -7 lines
Diff to previous 1.155 (colored) to selected 1.104.6.1 (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 (15 years, 1 month 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.152.4.2 / (download) - annotate - [select for diffs], Mon Feb 2 20:44:16 2009 UTC (15 years, 2 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) to selected 1.104.6.1 (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 (15 years, 2 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) to selected 1.104.6.1 (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 (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.152: +9 -7 lines
Diff to previous 1.152 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.145.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:59 2009 UTC (15 years, 3 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.148.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:14:35 2008 UTC (15 years, 4 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) to selected 1.104.6.1 (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 (15 years, 5 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) to selected 1.104.6.1 (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 (15 years, 5 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) to selected 1.104.6.1 (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 (15 years, 5 months ago) by dyoung
Branch: MAIN
Changes since 1.152: +4 -2 lines
Diff to previous 1.152 (colored) to selected 1.104.6.1 (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 (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.148: +319 -78 lines
Diff to previous 1.148 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.145.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:26 2008 UTC (15 years, 6 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.145.12.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:06 2008 UTC (15 years, 7 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) to selected 1.104.6.1 (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 (15 years, 7 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) to selected 1.104.6.1 (colored)

Sync with netbsd-4.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Aug 31 19:57:03 2008 UTC (15 years, 7 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) to selected 1.104.6.1 (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 (15 years, 7 months ago) by cegger
Branch: MAIN
Changes since 1.150: +307 -86 lines
Diff to previous 1.150 (colored) to selected 1.104.6.1 (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 (15 years, 8 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) to selected 1.104.6.1 (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 (15 years, 8 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Jul 25 19:45:06 2008 UTC (15 years, 8 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) to selected 1.104.6.1 (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 (15 years, 8 months ago) by sborrill
Branch: MAIN
Changes since 1.148: +23 -2 lines
Diff to previous 1.148 (colored) to selected 1.104.6.1 (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 (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.145: +24 -23 lines
Diff to previous 1.145 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.145.12.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:11 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.145: +24 -23 lines
Diff to previous 1.145 (colored) to selected 1.104.6.1 (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 (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.146: +23 -22 lines
Diff to previous 1.146 (colored) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.145.8.1 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:40 2008 UTC (15 years, 10 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Jun 17 06:08:46 2008 UTC (15 years, 10 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) to selected 1.104.6.1 (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 (15 years, 10 months ago) by mlelstv
Branch: MAIN
Changes since 1.146: +2 -20 lines
Diff to previous 1.146 (colored) to selected 1.104.6.1 (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 (15 years, 10 months ago) by mlelstv
Branch: MAIN
Branch point for: simonb-wapbl
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored) to selected 1.104.6.1 (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 (15 years, 10 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) to selected 1.104.6.1 (colored)

Sync with netbsd-4.

Revision 1.122.2.9 / (download) - annotate - [select for diffs], Sat May 17 16:23:50 2008 UTC (15 years, 11 months 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) to selected 1.104.6.1 (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 (16 years 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) to selected 1.104.6.1 (colored)

sync with HEAD

Revision 1.139.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:56 2008 UTC (16 years, 2 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.90.2.9 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:38 2008 UTC (16 years, 2 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.145 / (download) - annotate - [select for diffs], Thu Feb 7 01:21:55 2008 UTC (16 years, 2 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) to selected 1.104.6.1 (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 (16 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.143: +30 -10 lines
Diff to previous 1.143 (colored) to selected 1.104.6.1 (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 (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.7: +4 -3 lines
Diff to previous 1.90.2.7 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Feb 2 12:12:09 2008 UTC (16 years, 2 months ago) by tron
Branch: MAIN
Changes since 1.142: +4 -3 lines
Diff to previous 1.142 (colored) to selected 1.104.6.1 (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 (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.6: +78 -136 lines
Diff to previous 1.90.2.6 (colored) to selected 1.104.6.1 (colored)

sync with head

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:36 2008 UTC (16 years, 3 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) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.142 / (download) - annotate - [select for diffs], Sat Jan 19 22:10:18 2008 UTC (16 years, 3 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) to selected 1.104.6.1 (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 (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.136.2.2: +66 -125 lines
Diff to previous 1.136.2.2 (colored) to selected 1.104.6.1 (colored)

sync with HEAD

Revision 1.139.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:15 2007 UTC (16 years, 3 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

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

Sync with head.

Revision 1.140.4.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:32:04 2007 UTC (16 years, 4 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:08 2007 UTC (16 years, 4 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) to selected 1.104.6.1 (colored)

Merge jmcneill-pm branch.

Revision 1.132.6.10 / (download) - annotate - [select for diffs], Sat Dec 8 16:21:27 2007 UTC (16 years, 4 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) to selected 1.104.6.1 (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 (16 years, 5 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) to selected 1.104.6.1 (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 (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.90.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:20 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.5: +3 -3 lines
Diff to previous 1.90.2.5 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:01:16 2007 UTC (16 years, 5 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) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.132.6.9 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:38 2007 UTC (16 years, 5 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.136.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 10:59:53 2007 UTC (16 years, 5 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) to selected 1.104.6.1 (colored)

sync with -HEAD

Revision 1.140 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:18 2007 UTC (16 years, 5 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) to selected 1.104.6.1 (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 (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.136: +113 -116 lines
Diff to previous 1.136 (colored) to selected 1.104.6.1 (colored)

sync with HEAD

Revision 1.132.6.8 / (download) - annotate - [select for diffs], Tue Nov 6 14:27:24 2007 UTC (16 years, 5 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) to selected 1.104.6.1 (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 (16 years, 5 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) to selected 1.104.6.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 (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.4: +111 -114 lines
Diff to previous 1.90.2.4 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.122.2.8 / (download) - annotate - [select for diffs], Mon Oct 15 15:52:44 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-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) to selected 1.104.6.1 (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 (16 years, 6 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.122.2.7 / (download) - annotate - [select for diffs], Sun Oct 7 14:15:20 2007 UTC (16 years, 6 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) to selected 1.104.6.1 (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 (16 years, 6 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.132.6.7 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:31 2007 UTC (16 years, 6 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.132.6.6 / (download) - annotate - [select for diffs], Mon Oct 1 05:37:38 2007 UTC (16 years, 6 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) to selected 1.104.6.1 (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 (16 years, 6 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) to selected 1.104.6.1 (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 (16 years, 6 months ago) by joerg
Branch: MAIN
Changes since 1.137: +103 -107 lines
Diff to previous 1.137 (colored) to selected 1.104.6.1 (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 (16 years, 7 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

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

sync with head.

Revision 1.132.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:20:59 2007 UTC (16 years, 7 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.122.2.3.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:04:29 2007 UTC (16 years, 7 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.122.2.3: +93 -15 lines
Diff to previous 1.122.2.3 (colored) to selected 1.104.6.1 (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 (16 years, 7 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) to selected 1.104.6.1 (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 (16 years, 7 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) to selected 1.104.6.1 (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 (16 years, 7 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) to selected 1.104.6.1 (colored)

Constify: LLADDR() -> CLLADDR().

Revision 1.136 / (download) - annotate - [select for diffs], Sun Aug 26 22:45:57 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.135: +5 -5 lines
Diff to previous 1.135 (colored) to selected 1.104.6.1 (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 (16 years, 7 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) to selected 1.104.6.1 (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 (16 years, 8 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) to selected 1.104.6.1 (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 (16 years, 8 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) to selected 1.104.6.1 (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 (16 years, 8 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.132.6.2 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:09 2007 UTC (16 years, 8 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:31 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.132: +93 -14 lines
Diff to previous 1.132 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Aug 10 12:27:35 2007 UTC (16 years, 8 months ago) by taca
Branch: MAIN
Changes since 1.134: +7 -2 lines
Diff to previous 1.134 (colored) to selected 1.104.6.1 (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 (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.132: +88 -14 lines
Diff to previous 1.132 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Tue Aug 7 01:13:57 2007 UTC (16 years, 8 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) to selected 1.104.6.1 (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 (16 years, 8 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 (16 years, 8 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) to selected 1.104.6.1 (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 (16 years, 8 months ago) by markd
Branch: MAIN
Changes since 1.132: +85 -13 lines
Diff to previous 1.132 (colored) to selected 1.104.6.1 (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 (16 years, 9 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.127.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:07:32 2007 UTC (16 years, 9 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Jul 9 21:00:53 2007 UTC (16 years, 9 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) to selected 1.104.6.1 (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 (16 years, 9 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) to selected 1.104.6.1 (colored)

Adapt to callout API change.

Revision 1.122.2.4 / (download) - annotate - [select for diffs], Sun Jun 10 20:58:15 2007 UTC (16 years, 10 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) to selected 1.104.6.1 (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 (16 years, 10 months ago) by mlelstv
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored) to selected 1.104.6.1 (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 (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.127: +19 -4 lines
Diff to previous 1.127 (colored) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Mon May 21 15:36:26 2007 UTC (16 years, 11 months ago) by cube
Branch: MAIN
Changes since 1.129: +6 -2 lines
Diff to previous 1.129 (colored) to selected 1.104.6.1 (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 (16 years, 11 months 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.122.2.3 / (download) - annotate - [select for diffs], Sat Apr 28 18:17:27 2007 UTC (16 years, 11 months 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) to selected 1.104.6.1 (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 (16 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.128: +5 -4 lines
Diff to previous 1.128 (colored) to selected 1.104.6.1 (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 (17 years 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) to selected 1.104.6.1 (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 (17 years ago) by tron
Branch: MAIN
Changes since 1.127: +12 -2 lines
Diff to previous 1.127 (colored) to selected 1.104.6.1 (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 (17 years, 1 month 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.87.2.6 / (download) - annotate - [select for diffs], Mon Mar 5 15:07:14 2007 UTC (17 years, 1 month 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) to selected 1.104.6.1 (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 (17 years, 1 month 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) to selected 1.104.6.1 (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 (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.125: +23 -22 lines
Diff to previous 1.125 (colored) to selected 1.104.6.1 (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 (17 years, 1 month ago) by riz
Branch: netbsd-4
Changes since 1.122: +22 -12 lines
Diff to previous 1.122 (colored) to selected 1.104.6.1 (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 (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.123: +22 -12 lines
Diff to previous 1.123 (colored) to selected 1.104.6.1 (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 (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.2: +25 -14 lines
Diff to previous 1.90.2.2 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Feb 19 18:44:05 2007 UTC (17 years, 2 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) to selected 1.104.6.1 (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 (17 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.123: +27 -9 lines
Diff to previous 1.123 (colored) to selected 1.104.6.1 (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 (17 years, 2 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) to selected 1.104.6.1 (colored)

Merge newlock2 to head.

Revision 1.109.6.3 / (download) - annotate - [select for diffs], Tue Feb 6 13:11:47 2007 UTC (17 years, 2 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) to selected 1.104.6.1 (colored)

Quieten noisy boot messages.

Revision 1.109.6.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:41 2007 UTC (17 years, 3 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.90.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:48:44 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.90.2.1: +85 -54 lines
Diff to previous 1.90.2.1 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.109.8.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:17:43 2006 UTC (17 years, 4 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Sun Nov 26 06:09:09 2006 UTC (17 years, 4 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) to selected 1.104.6.1 (colored)

Sync two alternative IDs with pcidevs.

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

Fix a typo.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Nov 26 04:00:45 2006 UTC (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.119: +17 -9 lines
Diff to previous 1.119 (colored) to selected 1.104.6.1 (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 (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.118: +26 -2 lines
Diff to previous 1.118 (colored) to selected 1.104.6.1 (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 (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.117: +21 -17 lines
Diff to previous 1.117 (colored) to selected 1.104.6.1 (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 (17 years, 4 months ago) by tsutsui
Branch: MAIN
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored) to selected 1.104.6.1 (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 (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.109: +21 -26 lines
Diff to previous 1.109 (colored) to selected 1.104.6.1 (colored)

Sync with head.

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

__unused removal on arguments; approved by core.

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

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

Revision 1.114 / (download) - annotate - [select for diffs], Sat Oct 28 18:26:15 2006 UTC (17 years, 5 months ago) by tsutsui
Branch: MAIN
Changes since 1.113: +7 -10 lines
Diff to previous 1.113 (colored) to selected 1.104.6.1 (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 (17 years, 5 months ago) by tsutsui
Branch: MAIN
Changes since 1.112: +6 -7 lines
Diff to previous 1.112 (colored) to selected 1.104.6.1 (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 (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.109: +10 -10 lines
Diff to previous 1.109 (colored) to selected 1.104.6.1 (colored)

sync with head

Revision 1.112 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:29 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.111: +7 -7 lines
Diff to previous 1.111 (colored) to selected 1.104.6.1 (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 (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.110: +3 -4 lines
Diff to previous 1.110 (colored) to selected 1.104.6.1 (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 (17 years, 6 months ago) by jmcneill
Branch: MAIN
Changes since 1.109: +4 -3 lines
Diff to previous 1.109 (colored) to selected 1.104.6.1 (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 (17 years, 7 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) to selected 1.104.6.1 (colored)

sync with head

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

sync with head.

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

sync with head.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:01:35 2006 UTC (17 years, 10 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.87.2.5 / (download) - annotate - [select for diffs], Sun Jun 4 08:59:42 2006 UTC (17 years, 10 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) to selected 1.104.6.1 (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 (17 years, 10 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Jun 1 02:20:54 2006 UTC (17 years, 10 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) to selected 1.104.6.1 (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 (17 years, 10 months ago) by jonathan
Branch: MAIN
Changes since 1.107: +4 -5 lines
Diff to previous 1.107 (colored) to selected 1.104.6.1 (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 (17 years, 10 months ago) by blymn
Branch: MAIN
Changes since 1.106: +10 -10 lines
Diff to previous 1.106 (colored) to selected 1.104.6.1 (colored)

Clean up bogus whitespace

Revision 1.104.6.1 / (download) - annotate - [selected], Wed May 24 15:50:27 2006 UTC (17 years, 10 months 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 (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.104: +21 -2 lines
Diff to previous 1.104 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.104.4.2 / (download) - annotate - [select for diffs], Thu May 11 23:28:47 2006 UTC (17 years, 11 months 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) to selected 1.104.6.1 (colored)

sync with head

Revision 1.106 / (download) - annotate - [select for diffs], Thu Apr 27 18:09:54 2006 UTC (17 years, 11 months 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) to selected 1.104.6.1 (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 (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.102: +147 -248 lines
Diff to previous 1.102 (colored) to selected 1.104.6.1 (colored)

Sync with head.

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

sync with head.

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

Static'ify.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:21 2006 UTC (18 years, 1 month 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Feb 22 15:18:55 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored) to selected 1.104.6.1 (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 (18 years, 3 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) to selected 1.104.6.1 (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 (18 years, 4 months ago) by skrll
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored) to selected 1.104.6.1 (colored)

Typo in comment.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Dec 12 19:58:11 2005 UTC (18 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored) to selected 1.104.6.1 (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 (18 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.98: +30 -5 lines
Diff to previous 1.98 (colored) to selected 1.104.6.1 (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 (18 years, 4 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) to selected 1.104.6.1 (colored)

Sync with head.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Dec 7 04:43:05 2005 UTC (18 years, 4 months ago) by jonathan
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.97: +26 -3 lines
Diff to previous 1.97 (colored) to selected 1.104.6.1 (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 (18 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.96: +6 -2 lines
Diff to previous 1.96 (colored) to selected 1.104.6.1 (colored)

Match the 5789.

Revision 1.93.6.2 / (download) - annotate - [select for diffs], Tue Nov 29 21:23:14 2005 UTC (18 years, 4 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) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Nov 24 13:47:46 2005 UTC (18 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: yamt-readahead-base3
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.104.6.1 (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 (18 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.94: +297 -20 lines
Diff to previous 1.94 (colored) to selected 1.104.6.1 (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 (18 years, 4 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) to selected 1.104.6.1 (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 (18 years, 4 months ago) by yamt
Branch: yamt-readahead
Changes since 1.93: +12 -6 lines
Diff to previous 1.93 (colored) to selected 1.104.6.1 (colored)

sync with head.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Nov 15 06:05:44 2005 UTC (18 years, 5 months ago) by jonathan
Branch: MAIN
CVS Tags: yamt-readahead-base2
Changes since 1.93: +12 -6 lines
Diff to previous 1.93 (colored) to selected 1.104.6.1 (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 (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.10: +17 -6 lines
Diff to previous 1.42.2.10 (colored) to selected 1.104.6.1 (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 (18 years, 7 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) to selected 1.104.6.1 (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 (18 years, 7 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) to selected 1.104.6.1 (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 (18 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.87: +7 -2 lines
Diff to previous 1.87 (colored) to selected 1.104.6.1 (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 (18 years, 7 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) to selected 1.104.6.1 (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 (18 years, 8 months ago) by gavan
Branch: MAIN
Changes since 1.91: +6 -2 lines
Diff to previous 1.91 (colored) to selected 1.104.6.1 (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 (18 years, 8 months ago) by gavan
Branch: MAIN
Changes since 1.90: +7 -2 lines
Diff to previous 1.90 (colored) to selected 1.104.6.1 (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 (18 years, 10 months ago) by atatat
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.104.6.1 (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 (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored) to selected 1.104.6.1 (colored)

No 0x in front of %p...

Revision 1.88 / (download) - annotate - [select for diffs], Mon May 2 15:34:32 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.87: +5 -3 lines
Diff to previous 1.87 (colored) to selected 1.104.6.1 (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 (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.80: +72 -55 lines
Diff to previous 1.80 (colored) next main 1.81 (colored) to selected 1.104.6.1 (colored)

sync with -current

Revision 1.81.2.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:10 2005 UTC (19 years, 1 month 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) to selected 1.104.6.1 (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 (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.9: +33 -54 lines
Diff to previous 1.42.2.9 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.87 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:32 2005 UTC (19 years, 1 month 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) to selected 1.104.6.1 (colored)

nuke trailing whitespace

Revision 1.86 / (download) - annotate - [select for diffs], Mon Feb 21 02:12:48 2005 UTC (19 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored) to selected 1.104.6.1 (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 (19 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.84: +6 -27 lines
Diff to previous 1.84 (colored) to selected 1.104.6.1 (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 (19 years, 2 months ago) by heas
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored) to selected 1.104.6.1 (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 (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.81: +40 -2 lines
Diff to previous 1.81 (colored) to selected 1.104.6.1 (colored)

sync with head.

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

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jan 26 22:15:26 2005 UTC (19 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (colored) to selected 1.104.6.1 (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 (19 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.81: +39 -2 lines
Diff to previous 1.81 (colored) to selected 1.104.6.1 (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 (19 years, 2 months ago) by he
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.66.2.3: +2 -1 lines
Diff to previous 1.66.2.3 (colored) next main 1.67 (colored) to selected 1.104.6.1 (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 (19 years, 2 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) to selected 1.104.6.1 (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 (19 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.7: +7 -2 lines
Diff to previous 1.42.2.7 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jan 8 16:00:03 2005 UTC (19 years, 3 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) to selected 1.104.6.1 (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 (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.6: +6 -2 lines
Diff to previous 1.42.2.6 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Nov 19 17:59:09 2004 UTC (19 years, 5 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) to selected 1.104.6.1 (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 (19 years, 5 months ago) by tacha
Branch: MAIN
Changes since 1.77: +6 -2 lines
Diff to previous 1.77 (colored) to selected 1.104.6.1 (colored)

Add support for Broadcom BCM5705K.

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

Sync with HEAD.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Oct 30 18:09:22 2004 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +4 -3 lines
Diff to previous 1.76 (colored) to selected 1.104.6.1 (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 (19 years, 5 months ago) by cube
Branch: MAIN
Changes since 1.75: +93 -14 lines
Diff to previous 1.75 (colored) to selected 1.104.6.1 (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 (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.4: +3 -3 lines
Diff to previous 1.42.2.4 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Wed Sep 29 11:22:03 2004 UTC (19 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored) to selected 1.104.6.1 (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 (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.3: +3 -2 lines
Diff to previous 1.42.2.3 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Sep 21 21:57:30 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.73: +3 -2 lines
Diff to previous 1.73 (colored) to selected 1.104.6.1 (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 (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.2: +2 -2 lines
Diff to previous 1.42.2.2 (colored) to selected 1.104.6.1 (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 (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.1: +0 -0 lines
Diff to previous 1.42.2.1 (colored) to selected 1.104.6.1 (colored)

Sync with HEAD.

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

Sync with HEAD

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Sat May 29 09:00:24 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.66.2.2: +7 -4 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored) to selected 1.104.6.1 (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 (19 years, 10 months ago) by atatat
Branch: MAIN
Changes since 1.72: +7 -4 lines
Diff to previous 1.72 (colored) to selected 1.104.6.1 (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 (19 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.71: +61 -2 lines
Diff to previous 1.71 (colored) to selected 1.104.6.1 (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 (19 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +15 -5 lines
Diff to previous 1.70 (colored) to selected 1.104.6.1 (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 (19 years, 11 months 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) to selected 1.104.6.1 (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 (19 years, 11 months ago) by tron
Branch: MAIN
Changes since 1.69: +11 -7 lines
Diff to previous 1.69 (colored) to selected 1.104.6.1 (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 (20 years ago) by thorpej
Branch: MAIN
Changes since 1.68: +50 -5 lines
Diff to previous 1.68 (colored) to selected 1.104.6.1 (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 (20 years ago) by keihan
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored) to selected 1.104.6.1 (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 (20 years ago) by tron
Branch: netbsd-2-0
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.104.6.1 (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 (20 years ago) by jonathan
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.104.6.1 (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 (20 years 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) to selected 1.104.6.1 (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 (20 years ago) by atatat
Branch: MAIN
Changes since 1.64: +4 -8 lines
Diff to previous 1.64 (colored) to selected 1.104.6.1 (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 (20 years ago) by jonathan
Branch: MAIN
Changes since 1.63: +84 -3 lines
Diff to previous 1.63 (colored) to selected 1.104.6.1 (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 (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.62: +104 -2 lines
Diff to previous 1.62 (colored) to selected 1.104.6.1 (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 (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.61: +6 -4 lines
Diff to previous 1.61 (colored) to selected 1.104.6.1 (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 (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.60: +10 -5 lines
Diff to previous 1.60 (colored) to selected 1.104.6.1 (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 (20 years, 1 month 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) to selected 1.104.6.1 (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 (20 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.104.6.1 (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 (20 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.58: +6 -2 lines
Diff to previous 1.58 (colored) to selected 1.104.6.1 (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 (20 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.57: +17 -2 lines
Diff to previous 1.57 (colored) to selected 1.104.6.1 (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 (20 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.56: +4 -8 lines
Diff to previous 1.56 (colored) to selected 1.104.6.1 (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 (20 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.55: +5 -4 lines
Diff to previous 1.55 (colored) to selected 1.104.6.1 (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 (20 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.54: +9 -1 lines
Diff to previous 1.54 (colored) to selected 1.104.6.1 (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 (20 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.53: +18 -12 lines
Diff to previous 1.53 (colored) to selected 1.104.6.1 (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 (20 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.52: +2 -5 lines
Diff to previous 1.52 (colored) to selected 1.104.6.1 (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 (20 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.51: +5 -3 lines
Diff to previous 1.51 (colored) to selected 1.104.6.1 (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 (20 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.50: +140 -53 lines
Diff to previous 1.50 (colored) to selected 1.104.6.1 (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 (20 years, 6 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) to selected 1.104.6.1 (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 (20 years, 7 months ago) by tron
Branch: MAIN
Changes since 1.49: +2 -5 lines
Diff to previous 1.49 (colored) to selected 1.104.6.1 (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 (20 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.48: +8 -3 lines
Diff to previous 1.48 (colored) to selected 1.104.6.1 (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 (20 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.104.6.1 (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 (20 years, 8 months ago) by cjep
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored) to selected 1.104.6.1 (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 (20 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.45: +93 -14 lines
Diff to previous 1.45 (colored) to selected 1.104.6.1 (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 (20 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.44: +123 -46 lines
Diff to previous 1.44 (colored) to selected 1.104.6.1 (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 (20 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.43: +165 -83 lines
Diff to previous 1.43 (colored) to selected 1.104.6.1 (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 (20 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.42: +4 -1 lines
Diff to previous 1.42 (colored) to selected 1.104.6.1 (colored)

add missing __KERNEL_RCSID()

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jun 30 13:20:21 2003 UTC (20 years, 9 months ago) by ragge
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored) to selected 1.104.6.1 (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 (20 years, 10 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) to selected 1.104.6.1 (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 (20 years, 10 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) to selected 1.104.6.1 (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 (20 years, 10 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) to selected 1.104.6.1 (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 (20 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.40: +5 -2 lines
Diff to previous 1.40 (colored) to selected 1.104.6.1 (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 (20 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.39: +12 -2 lines
Diff to previous 1.39 (colored) to selected 1.104.6.1 (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 (20 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.38: +8 -8 lines
Diff to previous 1.38 (colored) to selected 1.104.6.1 (colored)

DMA, not dma nor Dma.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 24 12:06:05 2003 UTC (21 years, 1 month ago) by tron
Branch: MAIN
Changes since 1.37: +1 -5 lines
Diff to previous 1.37 (colored) to selected 1.104.6.1 (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 (21 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.36: +41 -8 lines
Diff to previous 1.36 (colored) to selected 1.104.6.1 (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 (21 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored) to selected 1.104.6.1 (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 (21 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.34: +10 -4 lines
Diff to previous 1.34 (colored) to selected 1.104.6.1 (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 (21 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.33: +28 -35 lines
Diff to previous 1.33 (colored) to selected 1.104.6.1 (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 (21 years, 2 months ago) by tsutsui
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored) to selected 1.104.6.1 (colored)

hz -> Hz

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

Correct typo in an e-mail address.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 31 05:00:24 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored) to selected 1.104.6.1 (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 (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +23 -19 lines
Diff to previous 1.29 (colored) to selected 1.104.6.1 (colored)

Use aprint_*().

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Tue Jan 28 06:19:13 2003 UTC (21 years, 2 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) to selected 1.104.6.1 (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 (21 years, 3 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.29.2.1, Fri Jan 17 08:27:35 2003 UTC (21 years, 3 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 (21 years, 3 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) to selected 1.104.6.1 (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 (21 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.27: +11 -10 lines
Diff to previous 1.27 (colored) to selected 1.104.6.1 (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 (21 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.26: +2 -3 lines
Diff to previous 1.26 (colored) to selected 1.104.6.1 (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 (21 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored) to selected 1.104.6.1 (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 (21 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.24: +255 -10 lines
Diff to previous 1.24 (colored) to selected 1.104.6.1 (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 (21 years, 3 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) to selected 1.104.6.1 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Dec 26 20:55:30 2002 UTC (21 years, 3 months ago) by matt
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.23: +30 -7 lines
Diff to previous 1.23 (colored) to selected 1.104.6.1 (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 (21 years, 6 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) to selected 1.104.6.1 (colored)

Catch up to -current.

Revision 1.19.4.3 / (download) - annotate - [select for diffs], Thu Oct 10 18:40:38 2002 UTC (21 years, 6 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) to selected 1.104.6.1 (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 (21 years, 6 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) to selected 1.104.6.1 (colored)

Do not try to print uninitialized variable.

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

Add trailing ; to CFATTACH_DECL.

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

Use CFATTACH_DECL().

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

Declare all cfattach structures const.

Revision 1.19.4.2 / (download) - annotate - [select for diffs], Fri Sep 6 08:45:14 2002 UTC (21 years, 7 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) to selected 1.104.6.1 (colored)

sync kqueue branch with HEAD

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Thu Aug 1 02:45:14 2002 UTC (21 years, 8 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) to selected 1.104.6.1 (colored)

Catch up to -current.

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Sat Jul 20 11:35:08 2002 UTC (21 years, 9 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) to selected 1.104.6.1 (colored)

catch up with -current.

Revision 1.19.4.1, Thu Jul 18 02:07:13 2002 UTC (21 years, 9 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 (21 years, 9 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 (21 years, 9 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) to selected 1.104.6.1 (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 (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18.2.1: +2939 -0 lines
Diff to previous 1.18.2.1 (colored) to selected 1.104.6.1 (colored)

catch up with -current.

Revision 1.18.2.1, Sat Jul 13 22:48:40 2002 UTC (21 years, 9 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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Branch point for: gehenna-devsw
Changes since 1.17: +7 -5 lines
Diff to previous 1.17 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.16: +13 -11 lines
Diff to previous 1.16 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +96 -11 lines
Diff to previous 1.15 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +1 -51 lines
Diff to previous 1.14 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by enami
Branch: MAIN
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored) to selected 1.104.6.1 (colored)

Match Altima AC1001.

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

Fix multicast filter programming.

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

Fix a comment.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 28 18:44:45 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.10: +39 -20 lines
Diff to previous 1.10 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.9: +4 -3 lines
Diff to previous 1.9 (colored) to selected 1.104.6.1 (colored)

Rearrange alignment code a bit.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 28 01:10:06 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.7: +7 -23 lines
Diff to previous 1.7 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +66 -33 lines
Diff to previous 1.6 (colored) to selected 1.104.6.1 (colored)

Use a table to match BCM570x products.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jun 27 23:21:34 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored) to selected 1.104.6.1 (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 (21 years, 9 months ago) by cjs
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored) to selected 1.104.6.1 (colored)

Match newer NetGear GA302T cards.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jun 24 01:23:11 2002 UTC (21 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.1: +13 -16 lines
Diff to previous 1.1 (colored) to selected 1.104.6.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 (21 years, 10 months ago) by fvdl
Branch: MAIN
Diff to selected 1.104.6.1 (colored)

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>