sk(4): Rework busdma(9) related bits
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 24 Jan 2009 05:56:27 +0000 (13:56 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 17 Feb 2009 10:35:32 +0000 (18:35 +0800)
commit105b9b5d79f63e546621f9c94767e50cee99df12
tree6d99617fec927703d3dfb7069a3cdee05204f663
parentfcbf2fb6011bab9eb7f2ce4e96b5265c104cd793
sk(4): Rework busdma(9) related bits

- According to data sheet, sk(4) does support 64bits address space.
  However, the RX/TX descriptors' high 32bits must be same, i.e.
  descriptors' can't spread above and below 4Gbytes boundary.  Since
  sk(4)'s RX/TX descriptors are in contiguous memory, this means we
  only need to make sure that the contiguous memory does not cross
  4Gbytes boundary.
- RX/TX descriptors' is 8bytes aligned not 64bytes aligned.
- Split RX/TX descriptor rings.
- Use bus_dmamem_coherent() to allocate RX/TX descriptor rings.
- Don't sync coherent memory.
sys/dev/netif/sk/if_sk.c
sys/dev/netif/sk/if_skreg.h
sys/dev/netif/sk/if_skvar.h