e1000_osdep.h (287990) | e1000_osdep.h (295323) |
---|---|
1/****************************************************************************** 2 3 Copyright (c) 2001-2015, Intel Corporation 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 are met: 8 --- 16 unchanged lines hidden (view full) --- 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ | 1/****************************************************************************** 2 3 Copyright (c) 2001-2015, Intel Corporation 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 are met: 8 --- 16 unchanged lines hidden (view full) --- 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ |
33/*$FreeBSD: head/sys/dev/e1000/e1000_osdep.h 287990 2015-09-19 18:22:59Z sbruno $*/ | 33/*$FreeBSD: head/sys/dev/e1000/e1000_osdep.h 295323 2016-02-05 17:14:37Z erj $*/ |
34 35 36#ifndef _FREEBSD_OS_H_ 37#define _FREEBSD_OS_H_ 38 39#include <sys/types.h> 40#include <sys/param.h> 41#include <sys/systm.h> --- 13 unchanged lines hidden (view full) --- 55#include <machine/clock.h> 56#include <dev/pci/pcivar.h> 57#include <dev/pci/pcireg.h> 58 59 60#define ASSERT(x) if(!(x)) panic("EM: x") 61 62#define usec_delay(x) DELAY(x) | 34 35 36#ifndef _FREEBSD_OS_H_ 37#define _FREEBSD_OS_H_ 38 39#include <sys/types.h> 40#include <sys/param.h> 41#include <sys/systm.h> --- 13 unchanged lines hidden (view full) --- 55#include <machine/clock.h> 56#include <dev/pci/pcivar.h> 57#include <dev/pci/pcireg.h> 58 59 60#define ASSERT(x) if(!(x)) panic("EM: x") 61 62#define usec_delay(x) DELAY(x) |
63#define usec_delay_irq(x) DELAY(x) | 63#define usec_delay_irq(x) usec_delay(x) |
64#define msec_delay(x) DELAY(1000*(x)) 65#define msec_delay_irq(x) DELAY(1000*(x)) 66 | 64#define msec_delay(x) DELAY(1000*(x)) 65#define msec_delay_irq(x) DELAY(1000*(x)) 66 |
67#define DEBUGFUNC(F) DEBUGOUT(F); 68#define DEBUGOUT(S) do {} while (0) 69#define DEBUGOUT1(S,A) do {} while (0) 70#define DEBUGOUT2(S,A,B) do {} while (0) 71#define DEBUGOUT3(S,A,B,C) do {} while (0) 72#define DEBUGOUT7(S,A,B,C,D,E,F,G) do {} while (0) | 67/* Enable/disable debugging statements in shared code */ 68#define DBG 0 |
73 | 69 |
70#define DEBUGOUT(...) \ 71 do { if (DBG) printf(__VA_ARGS__); } while (0) 72#define DEBUGOUT1(...) DEBUGOUT(__VA_ARGS__) 73#define DEBUGOUT2(...) DEBUGOUT(__VA_ARGS__) 74#define DEBUGOUT3(...) DEBUGOUT(__VA_ARGS__) 75#define DEBUGOUT7(...) DEBUGOUT(__VA_ARGS__) 76#define DEBUGFUNC(F) DEBUGOUT(F "\n") 77 |
|
74#define STATIC static 75#define FALSE 0 76#define TRUE 1 | 78#define STATIC static 79#define FALSE 0 80#define TRUE 1 |
77#ifndef __bool_true_false_are_defined 78#define false FALSE 79#define true TRUE 80#endif | |
81#define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ 82#define PCI_COMMAND_REGISTER PCIR_COMMAND 83 84/* Mutex used in the shared code */ 85#define E1000_MUTEX struct mtx 86#define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \ 87 MTX_NETWORK_LOCK, \ 88 MTX_DEF | MTX_DUPOK) --- 5 unchanged lines hidden (view full) --- 94typedef uint64_t u64; 95typedef uint32_t u32; 96typedef uint16_t u16; 97typedef uint8_t u8; 98typedef int64_t s64; 99typedef int32_t s32; 100typedef int16_t s16; 101typedef int8_t s8; | 81#define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ 82#define PCI_COMMAND_REGISTER PCIR_COMMAND 83 84/* Mutex used in the shared code */ 85#define E1000_MUTEX struct mtx 86#define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \ 87 MTX_NETWORK_LOCK, \ 88 MTX_DEF | MTX_DUPOK) --- 5 unchanged lines hidden (view full) --- 94typedef uint64_t u64; 95typedef uint32_t u32; 96typedef uint16_t u16; 97typedef uint8_t u8; 98typedef int64_t s64; 99typedef int32_t s32; 100typedef int16_t s16; 101typedef int8_t s8; |
102#ifndef __bool_true_false_are_defined 103typedef boolean_t bool; 104#endif | |
105 106#define __le16 u16 107#define __le32 u32 108#define __le64 u64 109 110#if __FreeBSD_version < 800000 111#if defined(__i386__) || defined(__amd64__) 112#define mb() __asm volatile("mfence" ::: "memory") --- 111 unchanged lines hidden --- | 102 103#define __le16 u16 104#define __le32 u32 105#define __le64 u64 106 107#if __FreeBSD_version < 800000 108#if defined(__i386__) || defined(__amd64__) 109#define mb() __asm volatile("mfence" ::: "memory") --- 111 unchanged lines hidden --- |