Deleted Added
full compact
if_tsec.h (194101) if_tsec.h (209908)
1/*-
1/*-
2 * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski <ppk@semihalf.com>
2 * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski
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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright

--- 6 unchanged lines hidden (view full) ---

17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
19 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright

--- 6 unchanged lines hidden (view full) ---

17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
19 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/dev/tsec/if_tsec.h 194101 2009-06-13 08:57:04Z raj $
25 * $FreeBSD: head/sys/dev/tsec/if_tsec.h 209908 2010-07-11 21:08:29Z raj $
26 */
27
28#ifndef _IF_TSEC_H
29#define _IF_TSEC_H
30
26 */
27
28#ifndef _IF_TSEC_H
29#define _IF_TSEC_H
30
31#include <dev/ofw/openfirm.h>
32
31#define TSEC_RX_NUM_DESC 256
32#define TSEC_TX_NUM_DESC 256
33
34/* Interrupt Coalescing types */
35#define TSEC_IC_RX 0
36#define TSEC_IC_TX 1
37
38/* eTSEC ID */

--- 5 unchanged lines hidden (view full) ---

44
45struct tsec_softc {
46 /* XXX MII bus requires that struct ifnet is first!!! */
47 struct ifnet *tsec_ifp;
48
49 struct mtx transmit_lock; /* transmitter lock */
50 struct mtx receive_lock; /* receiver lock */
51
33#define TSEC_RX_NUM_DESC 256
34#define TSEC_TX_NUM_DESC 256
35
36/* Interrupt Coalescing types */
37#define TSEC_IC_RX 0
38#define TSEC_IC_TX 1
39
40/* eTSEC ID */

--- 5 unchanged lines hidden (view full) ---

46
47struct tsec_softc {
48 /* XXX MII bus requires that struct ifnet is first!!! */
49 struct ifnet *tsec_ifp;
50
51 struct mtx transmit_lock; /* transmitter lock */
52 struct mtx receive_lock; /* receiver lock */
53
54 phandle_t node;
52 device_t dev;
53 device_t tsec_miibus;
54 struct mii_data *tsec_mii; /* MII media control */
55 int tsec_link;
56
57 bus_dma_tag_t tsec_tx_dtag; /* TX descriptors tag */
58 bus_dmamap_t tsec_tx_dmap; /* TX descriptors map */
59 struct tsec_desc *tsec_tx_vaddr;/* vadress of TX descriptors */

--- 63 unchanged lines hidden (view full) ---

123 struct mtx ic_lock;
124 uint32_t rx_ic_time; /* RW, valid values 0..65535 */
125 uint32_t rx_ic_count; /* RW, valid values 0..255 */
126 uint32_t tx_ic_time;
127 uint32_t tx_ic_count;
128
129 /* currently received frame */
130 struct mbuf *frame;
55 device_t dev;
56 device_t tsec_miibus;
57 struct mii_data *tsec_mii; /* MII media control */
58 int tsec_link;
59
60 bus_dma_tag_t tsec_tx_dtag; /* TX descriptors tag */
61 bus_dmamap_t tsec_tx_dmap; /* TX descriptors map */
62 struct tsec_desc *tsec_tx_vaddr;/* vadress of TX descriptors */

--- 63 unchanged lines hidden (view full) ---

126 struct mtx ic_lock;
127 uint32_t rx_ic_time; /* RW, valid values 0..65535 */
128 uint32_t rx_ic_count; /* RW, valid values 0..255 */
129 uint32_t tx_ic_time;
130 uint32_t tx_ic_count;
131
132 /* currently received frame */
133 struct mbuf *frame;
134
135 int phyaddr;
131};
132
133/* interface to get/put generic objects */
134#define TSEC_CNT_INIT(cnt, wrap) ((cnt) = ((wrap) - 1))
135
136#define TSEC_INC(count, wrap) (count = ((count) + 1) & ((wrap) - 1))
137
138#define TSEC_GET_GENERIC(hand, tab, count, wrap) \

--- 231 unchanged lines hidden ---
136};
137
138/* interface to get/put generic objects */
139#define TSEC_CNT_INIT(cnt, wrap) ((cnt) = ((wrap) - 1))
140
141#define TSEC_INC(count, wrap) (count = ((count) + 1) & ((wrap) - 1))
142
143#define TSEC_GET_GENERIC(hand, tab, count, wrap) \

--- 231 unchanged lines hidden ---