Add new devices support for bge(4)
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 7 May 2007 04:54:32 +0000 (04:54 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 7 May 2007 04:54:32 +0000 (04:54 +0000)
commit0ecb11d74f1132777622aaa4a31d1dbf3f4d846a
tree2acda2707995f6a59b4ab9f7e994792db46e3a2f
parent555d10438ccf57eecf2946e2a11d12ce05bca07a
Add new devices support for bge(4)
- Recognize more devices, including PCI ids, chip ids and asic ids.
- Use meaningful macros to distinguish chip family and capability, instead of
  test against chip id or asic id directly.
- Pack bool fields of bge_softc into bge_softc.bge_flags,
  o  bge_softc.bge_extram is gone, which was never adopted.
  o  Add flags for jumbo frame capability.
  o  Add flags for various chip families.
  o  Add flags for the bus types (PCI-e/PCI-X).
  o  Add flags for various PHY bugs, which will be used by brgphy.
- Fix the detection of the bus type (PCI-e/PCI-X). (*)
- Properly initialize PCI-X bge(4).
- Fix support for certain 575x/578x chips (*):
  o  Correct bge_{read,write}mem_ind() by clearing BGE_PCI_MEMWIN_BASEADDR
     before returning.
  o  Use the appropriate register writing method when reseting the chip.
  o  Program the descriptor DMA engine correctly.
  o  Disable fastboot if the chips support it.
  o  Add some 'magical' magics on chip resetting path.
Obtained-from: FreeBSD
# (*) are done in if_bge.c rev 1.159 and 1.178 by scottl@freebsd.org and
# jkim@freebsd.org, based on code provided by David Christenson from Broadcom.

Adapt brgphy to work with the changes in bge(4)
- Recognize Broadcom 5755/5787 PHY.
- Add DSP code for various PHY bug workarounds.
- Detect PHY bugs based on the flags passed by bge(4) and load corresponding
  workaround DSP code.
Obtained-from: OpenBSD

- Set PHY jumbo frame settings.
Obtained-from: FreeBSD
sys/dev/netif/bge/if_bge.c
sys/dev/netif/bge/if_bgereg.h
sys/dev/netif/mii_layer/brgphy.c
sys/dev/netif/mii_layer/brgphyreg.h