busdma(9) fixes for bfe(4):
- Set low address of the top level dma tag to 1Gbytes, due to chipset limit.
- TX/RX rings need to be aligned on 4Kbytes.
- Correct dma map syncing direction.
- In bfe_txeof() and bfe_tx_ring_free(), unload dma map for all TX descs
instead of only for the TX desc holding the mbuf.
- In bfe_start():
o If number of free TX desc is less then 2, set IFF_OACTIVE and leave
o Pass reference of mbuf pointer into bfe_encap(), since the passed in
mbuf may be defragmented, i.e. changed.
- In bfe_encap():
o Assert that caller has make certain there is at least 2 free TX descs.
o Before setting up TX descs, count number of mbufs in the mbuf chain,
and do defragmentation if there are not enough free TX descs.
o After above changes, number of free TX descs will never be less than 2
when setting up TX descs; assert that.
o mbuf chain is always drained after setting up TX descs, nuke the goofy
if (m != NULL)
Obtained-from: FreeBSD (w/ modification)
Tested-by: Jörg Anslik <joerg@anslik.de>
Approved-by: dillon@