From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 31 19:50:56 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7321065670; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B8D8FC16; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJotCg080168; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJotmk080164; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311950.pBVJotmk080164@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 19:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229145 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:50:56 -0000 Author: mdf Date: Sat Dec 31 19:50:55 2011 New Revision: 229145 URL: http://svn.freebsd.org/changeset/base/229145 Log: MFC r228441: 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. Modified: stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:55 2011 (r229145) @@ -889,13 +889,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; }; struct e1000_dev_spec_vf { Modified: stable/9/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:55 2011 (r229145) @@ -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 Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:55 2011 (r229145) @@ -225,7 +225,7 @@ static __inline void igb_rx_input(struct 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 *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -348,7 +348,7 @@ SYSCTL_INT(_hw_igb, OID_AUTO, max_interr ** 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); SYSCTL_INT(_hw_igb, OID_AUTO, header_split, CTLFLAG_RDTUN, &igb_header_split, 0, "Enable receive mbuf header split"); @@ -3396,7 +3396,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter;