Add new devices support for bge(4)
commitcc51c95bc62158d01801cab399b86c43e27de807
authorsephe <sephe>
Mon, 7 May 2007 04:54:32 +0000 (7 04:54 +0000)
committersephe <sephe>
Mon, 7 May 2007 04:54:32 +0000 (7 04:54 +0000)
tree976e2b025b3d3d87eb7bb41e18dc3a46dcd0a587
parent865e1ad1629d05c828ee3c12791399850aa5a773
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