Busdma(9)-fy, mainly obtained from FreeBSD:
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 04:16:26 +0000 (04:16 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 04:16:26 +0000 (04:16 +0000)
commit20c9a969cad95ead316171a4f2a613f5c99f13aa
tree357a8ebf67375ca55f8aaf1279f48392168e6663
parent64dfff29f668849c6f48cdf8d280c538d7a2b44d
Busdma(9)-fy, mainly obtained from FreeBSD:
if_bge.c rev 1.{45,76,81,85,101,105,106,109,151}
if_bgereg.h rev 1.{19,40}

Local changes:
- Factor out bge_dma_block_{alloc,free}() to avoid code duplication.
- Move jumbo buffer pool allocation/free into bge_dma_{alloc,free}().
- In bge_newbuf_std(), use bus_dmamap_load_mbuf() instead of bus_dmamap_load().
- Nuke vm header files inclusion.
- In bge_start():
  o   Bail out if OACTIVE is turned on or if bge(4) is not running yet.
  o   Move ifq_dequeue() before bge_encap(), since m_defrag() in bge_encap()
      will trash the mbuf parameter passed in.
  o   Make sure there are enough TX descriptors, before dequeuing mbuf and
      calling bge_encap().
- Don't call ifnet.if_start() on very interrupt, but at the end of bge_txeof().
- In bge_txeof(), if there are not enough TX descriptors, then don't clear
  OACTIVE.
- Minor style changes.
sys/dev/netif/bge/if_bge.c
sys/dev/netif/bge/if_bgereg.h