Commit Graph

3 Commits

Author SHA1 Message Date
tsutsui
056982dcb8 Make vge(4) look a NetBSD native driver like pcn(4) or epic(4) etc:
- merge if_vgevar.h into if_vge.c since no other file refers it
- rename some macro (VGE_TX_DESC_CNT -> VGE_NTXDESC etc.) and structs
- change prefixes of structure members to represent parents
- put TX and RX descriptors into single struct vge_control_data and
  allocate DMA memory at once
- no need to specify BUS_DMA_ALLOCNOW
- define appropriate macro for offsets and addresses of DMA descriptors
- define struct vge_txsoft and vge_rxsoft, and put common data for
  each descriptor into them
- remove struct vge_list_data and move its members into struct vge_softc
- remove #ifdef DEVICE_POLLING code we don't support
- merge vge_[tr]x_list_init() functions into vge_init()
- use aprint_error() to print errors
- put splnet(9) where appropriate and remove unused VGE_{LOCK,UNLOCK}() macro
- clear TX timeout only if there is no pending descriptor
- check dm_nsegs properly otherwise padding short packets could fail
- prepare zero'ed DMA memory to pad short packets rather than putting
  random data
- fix a wrong VGE_TXDESCSYNC() usage which should be VGE_TXFRAGSYNC()

Tested on my i386 which is my development machine.
(more bus_dmamap_sync(9) cleanup will be done later)
2006-10-31 14:13:30 +00:00
tsutsui
607772f8e4 - call bus_dmamap_sync() properly (sigh)
- merge vge_dma_map_rx_desc() and vge_dma_map_tx_desc() into callers
- declare DMA descs volatile
- remove unused macro/declarations
- bzero -> memset
- some more cosmetics
2006-10-14 19:10:35 +00:00
jdolecek
81abc346eb Add device driver support for the VIA Networking Technologies VT6122
gigabit ethernet chip and integrated 10/100/1000 copper PHY.

Obtained from: FreeBSD
2005-02-20 18:34:33 +00:00