From owner-svn-src-head@FreeBSD.ORG Fri Jul 12 22:36:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CEA077A7; Fri, 12 Jul 2013 22:36:27 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BFD5C1358; Fri, 12 Jul 2013 22:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CMaRVP075070; Fri, 12 Jul 2013 22:36:27 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CMaQq4075062; Fri, 12 Jul 2013 22:36:26 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201307122236.r6CMaQq4075062@svn.freebsd.org> From: Jack F Vogel Date: Fri, 12 Jul 2013 22:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253303 - in head/sys: dev/e1000 modules/em modules/igb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 22:36:27 -0000 Author: jfv Date: Fri Jul 12 22:36:26 2013 New Revision: 253303 URL: http://svnweb.freebsd.org/changeset/base/253303 Log: Change the E1000 driver option header handling to match the ixgbe driver. As it was, when building them as a module INET and INET6 are not defined. In these drivers it does not cause a panic, however it does result in different behavior in the ioctl routine when you are using a module vs static, and I think the behavior should be the same. MFC after: 3 days Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/modules/em/Makefile head/sys/modules/igb/Makefile Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/dev/e1000/if_em.c Fri Jul 12 22:36:26 2013 (r253303) @@ -32,10 +32,11 @@ ******************************************************************************/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/dev/e1000/if_igb.c Fri Jul 12 22:36:26 2013 (r253303) @@ -33,10 +33,11 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #include "opt_altq.h" #endif Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/dev/e1000/if_lem.c Fri Jul 12 22:36:26 2013 (r253303) @@ -32,10 +32,11 @@ ******************************************************************************/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/modules/em/Makefile Fri Jul 12 22:36:26 2013 (r253303) @@ -1,7 +1,10 @@ # $FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h opt_inet.h +SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c @@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include Modified: head/sys/modules/igb/Makefile ============================================================================== --- head/sys/modules/igb/Makefile Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/modules/igb/Makefile Fri Jul 12 22:36:26 2013 (r253303) @@ -1,7 +1,10 @@ #$FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_igb -SRCS = device_if.h bus_if.h pci_if.h opt_inet.h +SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS += if_igb.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c @@ -20,4 +23,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 - # ALTQ. #CFLAGS += -DIGB_LEGACY_TX +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include