if_gemvar.h (169269) | if_gemvar.h (170273) |
---|---|
1/*- 2 * Copyright (C) 2001 Eduardo Horvath. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * from: NetBSD: gemvar.h,v 1.8 2002/05/15 02:36:12 matt Exp 27 * | 1/*- 2 * Copyright (C) 2001 Eduardo Horvath. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * from: NetBSD: gemvar.h,v 1.8 2002/05/15 02:36:12 matt Exp 27 * |
28 * $FreeBSD: head/sys/dev/gem/if_gemvar.h 169269 2007-05-04 19:15:28Z phk $ | 28 * $FreeBSD: head/sys/dev/gem/if_gemvar.h 170273 2007-06-04 06:01:04Z yongari $ |
29 */ 30 31#ifndef _IF_GEMVAR_H 32#define _IF_GEMVAR_H 33 34 35#include <sys/queue.h> 36#include <sys/callout.h> --- 62 unchanged lines hidden (view full) --- 99 int txs_firstdesc; /* first descriptor in packet */ 100 int txs_lastdesc; /* last descriptor in packet */ 101 int txs_ndescs; /* number of descriptors */ 102 STAILQ_ENTRY(gem_txsoft) txs_q; 103}; 104 105STAILQ_HEAD(gem_txsq, gem_txsoft); 106 | 29 */ 30 31#ifndef _IF_GEMVAR_H 32#define _IF_GEMVAR_H 33 34 35#include <sys/queue.h> 36#include <sys/callout.h> --- 62 unchanged lines hidden (view full) --- 99 int txs_firstdesc; /* first descriptor in packet */ 100 int txs_lastdesc; /* last descriptor in packet */ 101 int txs_ndescs; /* number of descriptors */ 102 STAILQ_ENTRY(gem_txsoft) txs_q; 103}; 104 105STAILQ_HEAD(gem_txsq, gem_txsoft); 106 |
107/* Argument structure for busdma callback */ 108struct gem_txdma { 109 struct gem_softc *txd_sc; 110 struct gem_txsoft *txd_txs; 111}; 112 | |
113/* 114 * Software state for receive jobs. 115 */ 116struct gem_rxsoft { 117 struct mbuf *rxs_mbuf; /* head of our mbuf chain */ 118 bus_dmamap_t rxs_dmamap; /* our DMA map */ 119 bus_addr_t rxs_paddr; /* physical address of the segment */ 120}; --- 63 unchanged lines hidden (view full) --- 184 185 int sc_rxptr; /* next ready RX descriptor/descsoft */ 186 int sc_rxfifosize; /* Rx FIFO size (bytes) */ 187 188 /* ========== */ 189 int sc_inited; 190 int sc_debug; 191 int sc_ifflags; | 107/* 108 * Software state for receive jobs. 109 */ 110struct gem_rxsoft { 111 struct mbuf *rxs_mbuf; /* head of our mbuf chain */ 112 bus_dmamap_t rxs_dmamap; /* our DMA map */ 113 bus_addr_t rxs_paddr; /* physical address of the segment */ 114}; --- 63 unchanged lines hidden (view full) --- 178 179 int sc_rxptr; /* next ready RX descriptor/descsoft */ 180 int sc_rxfifosize; /* Rx FIFO size (bytes) */ 181 182 /* ========== */ 183 int sc_inited; 184 int sc_debug; 185 int sc_ifflags; |
186 int sc_csum_features; |
|
192 193 struct mtx sc_mtx; 194}; 195 196#define GEM_DMA_READ(sc, v) (((sc)->sc_pci) ? le64toh(v) : be64toh(v)) 197#define GEM_DMA_WRITE(sc, v) (((sc)->sc_pci) ? htole64(v) : htobe64(v)) 198 199#define GEM_CDTXADDR(sc, x) ((sc)->sc_cddma + GEM_CDTXOFF((x))) --- 50 unchanged lines hidden --- | 187 188 struct mtx sc_mtx; 189}; 190 191#define GEM_DMA_READ(sc, v) (((sc)->sc_pci) ? le64toh(v) : be64toh(v)) 192#define GEM_DMA_WRITE(sc, v) (((sc)->sc_pci) ? htole64(v) : htobe64(v)) 193 194#define GEM_CDTXADDR(sc, x) ((sc)->sc_cddma + GEM_CDTXOFF((x))) --- 50 unchanged lines hidden --- |