diff options
author | mdf <mdf@FreeBSD.org> | 2011-12-12 18:27:34 +0000 |
---|---|---|
committer | mdf <mdf@FreeBSD.org> | 2011-12-12 18:27:34 +0000 |
commit | 98f9a875cd1c50e495aa69b59fd909c43ea5480a (patch) | |
tree | ebbb954d8fa30f6e72c4bb07b3847d93bd8723d7 /sys/dev | |
parent | d81aa8478d59e3f8a566db86aa513e80514e81e6 (diff) | |
download | FreeBSD-src-98f9a875cd1c50e495aa69b59fd909c43ea5480a.zip FreeBSD-src-98f9a875cd1c50e495aa69b59fd909c43ea5480a.tar.gz |
Consistently use types in e1000 driver code:
- Two struct members eee_disable are used in a function that expects
an int *, so declare them int, not bool.
- igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int.
- igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool.
- igb_tso_setup() returns a bool, so declare it bool, not boolean_t.
- Do not re-define bool/true/false if the symbols already exist.
MFC after: 2 weeks
Sponsored by: Isilon Systems, LLC
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/e1000/e1000_hw.h | 4 | ||||
-rw-r--r-- | sys/dev/e1000/e1000_osdep.h | 6 | ||||
-rw-r--r-- | sys/dev/e1000/if_igb.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/e1000/e1000_hw.h b/sys/dev/e1000/e1000_hw.h index 0a8bd4f..16cfa8f 100644 --- a/sys/dev/e1000/e1000_hw.h +++ b/sys/dev/e1000/e1000_hw.h @@ -911,13 +911,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - bool eee_disable; + int eee_disable; bool module_plugged; u32 mtu; }; diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h index 25231a7..7eb7bb6 100644 --- a/sys/dev/e1000/e1000_osdep.h +++ b/sys/dev/e1000/e1000_osdep.h @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index dc643c7..b486c71 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -223,7 +223,7 @@ static __inline void igb_rx_input(struct rx_ring *, static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, int, struct ip *, struct tcphdr *); static void igb_set_promisc(struct adapter *); @@ -335,7 +335,7 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", &igb_max_interrupt_rate); ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); /* @@ -3441,7 +3441,7 @@ igb_free_transmit_buffers(struct tx_ring *txr) * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, int ehdrlen, struct ip *ip, struct tcphdr *th) { |