if_sgereg.h (207380) | if_sgereg.h (207628) |
---|---|
1/*- 2 * Copyright (c) 2008, 2009, 2010 Nikolay Denev <ndenev@gmail.com> 3 * Copyright (c) 2007, 2008 Alexander Pohoyda <alexander.pohoyda@gmx.net> 4 * Copyright (c) 1997, 1998, 1999 5 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 33 * OF THE POSSIBILITY OF SUCH DAMAGE. 34 * | 1/*- 2 * Copyright (c) 2008, 2009, 2010 Nikolay Denev <ndenev@gmail.com> 3 * Copyright (c) 2007, 2008 Alexander Pohoyda <alexander.pohoyda@gmx.net> 4 * Copyright (c) 1997, 1998, 1999 5 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 33 * OF THE POSSIBILITY OF SUCH DAMAGE. 34 * |
35 * $FreeBSD: head/sys/dev/sge/if_sgereg.h 207380 2010-04-29 18:14:14Z yongari $ | 35 * $FreeBSD: head/sys/dev/sge/if_sgereg.h 207628 2010-05-04 19:04:51Z yongari $ |
36 */ 37 38#ifndef _IF_SGEREG_H 39#define _IF_SGEREG_H 40 41/* 42 * SiS PCI vendor ID. 43 */ --- 234 unchanged lines hidden (view full) --- 278 uint32_t sge_cmdsts; 279 uint32_t sge_ptr; 280 uint32_t sge_flags; 281}; 282 283#define SGE_RX_RING_CNT 256 /* [8, 1024] */ 284#define SGE_TX_RING_CNT 256 /* [8, 8192] */ 285#define SGE_DESC_ALIGN 16 | 36 */ 37 38#ifndef _IF_SGEREG_H 39#define _IF_SGEREG_H 40 41/* 42 * SiS PCI vendor ID. 43 */ --- 234 unchanged lines hidden (view full) --- 278 uint32_t sge_cmdsts; 279 uint32_t sge_ptr; 280 uint32_t sge_flags; 281}; 282 283#define SGE_RX_RING_CNT 256 /* [8, 1024] */ 284#define SGE_TX_RING_CNT 256 /* [8, 8192] */ 285#define SGE_DESC_ALIGN 16 |
286#define SGE_MAXTXSEGS 1 | 286#define SGE_MAXTXSEGS 16 |
287#define SGE_RX_BUF_ALIGN sizeof(uint64_t) 288 289#define SGE_RX_RING_SZ (SGE_RX_RING_CNT * sizeof(struct sge_desc)) 290#define SGE_TX_RING_SZ (SGE_TX_RING_CNT * sizeof(struct sge_desc)) 291#define SGE_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) 292 293struct sge_list_data { 294 struct sge_desc *sge_rx_ring; 295 struct sge_desc *sge_tx_ring; 296 /* physical bus addresses of sge_rx_ring/sge_tx_ring */ 297 bus_addr_t sge_rx_paddr; 298 bus_addr_t sge_tx_paddr; 299}; 300 | 287#define SGE_RX_BUF_ALIGN sizeof(uint64_t) 288 289#define SGE_RX_RING_SZ (SGE_RX_RING_CNT * sizeof(struct sge_desc)) 290#define SGE_TX_RING_SZ (SGE_TX_RING_CNT * sizeof(struct sge_desc)) 291#define SGE_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) 292 293struct sge_list_data { 294 struct sge_desc *sge_rx_ring; 295 struct sge_desc *sge_tx_ring; 296 /* physical bus addresses of sge_rx_ring/sge_tx_ring */ 297 bus_addr_t sge_rx_paddr; 298 bus_addr_t sge_tx_paddr; 299}; 300 |
301struct sge_txdesc { 302 struct mbuf *tx_m; 303 bus_dmamap_t tx_dmamap; 304 int tx_ndesc; 305}; 306 307struct sge_rxdesc { 308 struct mbuf *rx_m; 309 bus_dmamap_t rx_dmamap; 310}; 311 |
|
301struct sge_chain_data { 302 bus_dma_tag_t sge_tag; 303 bus_dma_tag_t sge_rx_tag; 304 bus_dma_tag_t sge_tx_tag; 305 bus_dmamap_t sge_rx_dmamap; 306 bus_dmamap_t sge_tx_dmamap; 307 bus_dma_tag_t sge_txmbuf_tag; 308 bus_dma_tag_t sge_rxmbuf_tag; | 312struct sge_chain_data { 313 bus_dma_tag_t sge_tag; 314 bus_dma_tag_t sge_rx_tag; 315 bus_dma_tag_t sge_tx_tag; 316 bus_dmamap_t sge_rx_dmamap; 317 bus_dmamap_t sge_tx_dmamap; 318 bus_dma_tag_t sge_txmbuf_tag; 319 bus_dma_tag_t sge_rxmbuf_tag; |
309 struct mbuf *sge_rx_mbuf[SGE_RX_RING_CNT]; 310 struct mbuf *sge_tx_mbuf[SGE_TX_RING_CNT]; 311 bus_dmamap_t sge_rx_map[SGE_RX_RING_CNT]; | 320 struct sge_txdesc sge_txdesc[SGE_TX_RING_CNT]; 321 struct sge_rxdesc sge_rxdesc[SGE_RX_RING_CNT]; |
312 bus_dmamap_t sge_rx_spare_map; | 322 bus_dmamap_t sge_rx_spare_map; |
313 bus_dmamap_t sge_tx_map[SGE_TX_RING_CNT]; | |
314 int sge_rx_cons; 315 int sge_tx_prod; 316 int sge_tx_cons; 317 int sge_tx_cnt; 318}; 319 320struct sge_type { 321 uint16_t sge_vid; --- 38 unchanged lines hidden --- | 323 int sge_rx_cons; 324 int sge_tx_prod; 325 int sge_tx_cons; 326 int sge_tx_cnt; 327}; 328 329struct sge_type { 330 uint16_t sge_vid; --- 38 unchanged lines hidden --- |