Deleted Added
full compact
if_nvereg.h (144073) if_nvereg.h (147256)
1/*
2 * Copyright (c) 2005 by David E. O'Brien <obrien@FreeBSD.org>.
3 * Copyright (c) 2003 by Quinton Dolan <q@onthenet.com.au>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $Id: if_nvreg.h,v 1.6 2004/08/12 14:00:05 q Exp $
1/*
2 * Copyright (c) 2005 by David E. O'Brien <obrien@FreeBSD.org>.
3 * Copyright (c) 2003 by Quinton Dolan <q@onthenet.com.au>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $Id: if_nvreg.h,v 1.6 2004/08/12 14:00:05 q Exp $
28 * $FreeBSD: head/sys/dev/nve/if_nvereg.h 144073 2005-03-24 18:55:07Z obrien $
28 * $FreeBSD: head/sys/dev/nve/if_nvereg.h 147256 2005-06-10 16:49:24Z brooks $
29 */
30
31#ifndef _IF_NVEREG_H_
32#define _IF_NVEREG_H_
33
34#ifndef NVIDIA_VENDORID
35#define NVIDIA_VENDORID 0x10DE
36#endif

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

103 struct nve_tx_desc *next;
104 struct nve_map_buffer buf;
105 u_int16_t buflength;
106 u_int32_t numfrags;
107 bus_dma_segment_t frags[NV_MAX_FRAGS + 1];
108};
109
110struct nve_softc {
29 */
30
31#ifndef _IF_NVEREG_H_
32#define _IF_NVEREG_H_
33
34#ifndef NVIDIA_VENDORID
35#define NVIDIA_VENDORID 0x10DE
36#endif

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

103 struct nve_tx_desc *next;
104 struct nve_map_buffer buf;
105 u_int16_t buflength;
106 u_int32_t numfrags;
107 bus_dma_segment_t frags[NV_MAX_FRAGS + 1];
108};
109
110struct nve_softc {
111 struct arpcom arpcom; /* interface info */
111 struct ifnet *ifp; /* interface info */
112 struct resource *res;
113 struct resource *irq;
114
115 ADAPTER_API *hwapi;
116 OS_API osapi;
117
118 device_t miibus;
119 device_t dev;

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

160};
161
162struct nve_type {
163 u_int16_t vid_id;
164 u_int16_t dev_id;
165 char *name;
166};
167
112 struct resource *res;
113 struct resource *irq;
114
115 ADAPTER_API *hwapi;
116 OS_API osapi;
117
118 device_t miibus;
119 device_t dev;

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

160};
161
162struct nve_type {
163 u_int16_t vid_id;
164 u_int16_t dev_id;
165 char *name;
166};
167
168#define sc_if arpcom.ac_if
169#define sc_macaddr arpcom.ac_enaddr
170
171#define NVE_LOCK(_sc) mtx_lock(&(_sc)->mtx)
172#define NVE_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx)
173#define NVE_OSLOCK(_sc) mtx_lock_spin(&(_sc)->osmtx)
174#define NVE_OSUNLOCK(_sc) mtx_unlock_spin(&(_sc)->osmtx)
175
176#define IF_Kbps(x) ((x) * 1000) /* kilobits/sec. */
177#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */
178#define ETHER_ALIGN 2
179
180extern int ADAPTER_ReadPhy (PVOID pContext, ULONG ulPhyAddr, ULONG ulReg, ULONG *pulVal);
181extern int ADAPTER_WritePhy (PVOID pContext, ULONG ulPhyAddr, ULONG ulReg, ULONG ulVal);
182extern int ADAPTER_Init (PVOID pContext, USHORT usForcedSpeed, UCHAR ucForceDpx, UCHAR ucForceMode, UINT *puiLinkState);
183
184#endif /* _IF_NVEREG_H_ */
168#define NVE_LOCK(_sc) mtx_lock(&(_sc)->mtx)
169#define NVE_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx)
170#define NVE_OSLOCK(_sc) mtx_lock_spin(&(_sc)->osmtx)
171#define NVE_OSUNLOCK(_sc) mtx_unlock_spin(&(_sc)->osmtx)
172
173#define IF_Kbps(x) ((x) * 1000) /* kilobits/sec. */
174#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */
175#define ETHER_ALIGN 2
176
177extern int ADAPTER_ReadPhy (PVOID pContext, ULONG ulPhyAddr, ULONG ulReg, ULONG *pulVal);
178extern int ADAPTER_WritePhy (PVOID pContext, ULONG ulPhyAddr, ULONG ulReg, ULONG ulVal);
179extern int ADAPTER_Init (PVOID pContext, USHORT usForcedSpeed, UCHAR ucForceDpx, UCHAR ucForceMode, UINT *puiLinkState);
180
181#endif /* _IF_NVEREG_H_ */