diff options
author | Kip Macy <kmacy@FreeBSD.org> | 2008-09-24 01:19:08 +0000 |
---|---|---|
committer | Kip Macy <kmacy@FreeBSD.org> | 2008-09-24 01:19:08 +0000 |
commit | a7db7fbd35c9f965223bc8db830e85b48966d872 (patch) | |
tree | c2cefca565e13236646646e71b61f22be5442714 | |
parent | a63c2f9df09939b5cb2315f9a1a9883ffed9ed45 (diff) | |
download | src-a7db7fbd35c9f965223bc8db830e85b48966d872.tar.gz src-a7db7fbd35c9f965223bc8db830e85b48966d872.zip |
- Remove default NIC dependency on ulp headers
- make toe module build dependent on kernel support
Submitted by: Chelsio Inc.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=183321
-rw-r--r-- | sys/dev/cxgb/cxgb_adapter.h | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_include.h | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_offload.h | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/toecore/toedev.c | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_l2t.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_listen.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_tom.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_tom.h | 1 | ||||
-rw-r--r-- | sys/modules/cxgb/Makefile | 31 |
12 files changed, 36 insertions, 8 deletions
diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h index db79fe3010ce..2f274ebf69af 100644 --- a/sys/dev/cxgb/cxgb_adapter.h +++ b/sys/dev/cxgb/cxgb_adapter.h @@ -56,7 +56,6 @@ $FreeBSD$ #include <cxgb_osdep.h> #include <t3cdev.h> -#include <ulp/toecore/cxgb_toedev.h> #include <sys/mbufq.h> #ifdef LRO_SUPPORTED diff --git a/sys/dev/cxgb/cxgb_include.h b/sys/dev/cxgb/cxgb_include.h index ec318f619377..90080b531317 100644 --- a/sys/dev/cxgb/cxgb_include.h +++ b/sys/dev/cxgb/cxgb_include.h @@ -16,4 +16,3 @@ #include <common/cxgb_sge_defs.h> #include <common/cxgb_firmware_exports.h> #include <common/jhash.h> -#include <ulp/toecore/cxgb_toedev.h> diff --git a/sys/dev/cxgb/cxgb_offload.h b/sys/dev/cxgb/cxgb_offload.h index 54d73375fb7e..dccefdcbb702 100644 --- a/sys/dev/cxgb/cxgb_offload.h +++ b/sys/dev/cxgb/cxgb_offload.h @@ -35,7 +35,6 @@ $FreeBSD$ #include <common/cxgb_version.h> #include <cxgb_config.h> -#include <ulp/tom/cxgb_l2t.h> #include <common/cxgb_tcb.h> #include <t3cdev.h> @@ -71,6 +70,7 @@ void cxgb_remove_clients(struct t3cdev *tdev); typedef int (*cxgb_cpl_handler_func)(struct t3cdev *dev, struct mbuf *m, void *ctx); +struct l2t_entry; struct cxgb_client { char *name; void (*add) (struct t3cdev *); diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c index f2e59d2909e1..cf42e38774ac 100644 --- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c +++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <contrib/rdma/ib_verbs.h> #include <cxgb_include.h> +#include <ulp/tom/cxgb_l2t.h> #include <ulp/iw_cxgb/iw_cxgb_wr.h> #include <ulp/iw_cxgb/iw_cxgb_hal.h> #include <ulp/iw_cxgb/iw_cxgb_provider.h> diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c index 708c35906ab5..83c742fcae81 100644 --- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c +++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <contrib/rdma/ib_user_verbs.h> #include <cxgb_include.h> +#include <ulp/tom/cxgb_l2t.h> #include <ulp/iw_cxgb/iw_cxgb_wr.h> #include <ulp/iw_cxgb/iw_cxgb_hal.h> #include <ulp/iw_cxgb/iw_cxgb_provider.h> diff --git a/sys/dev/cxgb/ulp/toecore/toedev.c b/sys/dev/cxgb/ulp/toecore/toedev.c index 78d38749857f..01a7d902a563 100644 --- a/sys/dev/cxgb/ulp/toecore/toedev.c +++ b/sys/dev/cxgb/ulp/toecore/toedev.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); * XXX */ #include <cxgb_include.h> - +#include <ulp/toecore/cxgb_toedev.h> static struct mtx offload_db_lock; static TAILQ_HEAD(, toedev) offload_dev_list; diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c index 073d291fc4ab..62ffdaa00134 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <sys/mvec.h> #include <ulp/toecore/cxgb_toedev.h> +#include <ulp/tom/cxgb_l2t.h> #include <ulp/tom/cxgb_defs.h> #include <ulp/tom/cxgb_tom.h> #include <ulp/tom/cxgb_t3_ddp.h> diff --git a/sys/dev/cxgb/ulp/tom/cxgb_l2t.c b/sys/dev/cxgb/ulp/tom/cxgb_l2t.c index 1fcd53d9389d..67856e6a7195 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_l2t.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_l2t.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include <netinet/if_ether.h> #include <cxgb_include.h> +#include <ulp/tom/cxgb_l2t.h> #define VLAN_NONE 0xfff #define SDL(s) ((struct sockaddr_dl *)s) diff --git a/sys/dev/cxgb/ulp/tom/cxgb_listen.c b/sys/dev/cxgb/ulp/tom/cxgb_listen.c index 8836b58e87bb..5dc2d9f09fcf 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_listen.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_listen.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include <common/cxgb_ctl_defs.h> #include <cxgb_offload.h> #include <ulp/toecore/cxgb_toedev.h> +#include <ulp/tom/cxgb_l2t.h> #include <ulp/tom/cxgb_defs.h> #include <ulp/tom/cxgb_tom.h> #include <ulp/tom/cxgb_t3_ddp.h> diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tom.c b/sys/dev/cxgb/ulp/tom/cxgb_tom.c index 1067b3292c2a..d586883adad9 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_tom.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_tom.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include <common/cxgb_t3_cpl.h> #include <cxgb_offload.h> #include <ulp/toecore/cxgb_toedev.h> +#include <ulp/tom/cxgb_l2t.h> #include <ulp/tom/cxgb_tom.h> #include <ulp/tom/cxgb_defs.h> #include <ulp/tom/cxgb_t3_ddp.h> diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tom.h b/sys/dev/cxgb/ulp/tom/cxgb_tom.h index bcda2c3c57aa..2f3201db7c52 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_tom.h +++ b/sys/dev/cxgb/ulp/tom/cxgb_tom.h @@ -33,6 +33,7 @@ $FreeBSD$ #ifndef CXGB_TOM_H_ #define CXGB_TOM_H_ #include <sys/protosw.h> +#include <netinet/toedev.h> #define LISTEN_INFO_HASH_SIZE 32 diff --git a/sys/modules/cxgb/Makefile b/sys/modules/cxgb/Makefile index ed43eae3dd7c..7d56988dd95e 100644 --- a/sys/modules/cxgb/Makefile +++ b/sys/modules/cxgb/Makefile @@ -1,15 +1,38 @@ # $FreeBSD$ SUBDIR= cxgb -SUBDIR+= toecore -SUBDIR+= tom +SUBDIR+= ${_toecore} +SUBDIR+= ${_tom} SUBDIR+= ${_iw_cxgb} SUBDIR+= cxgb_t3fw -.if ${MACHINE_ARCH} == "i386" +.if defined(SYSDIR) +_sysdir = ${SYSDIR} +.endif + +# Based on bsd.kmod.mk but we don't modify SYSDIR in this one. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + /sys /usr/src/sys +.if !defined(_sysdir) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +_sysdir = ${_dir} +.endif +.endfor +.if !defined(_sysdir) || !exists(${_sysdir}/kern/) || \ + !exists(${_sysdir}/conf/kmod.mk) +.error "can't find kernel source tree" +.endif + +_toe_header = ${_sysdir}/netinet/toedev.h + +.if exists(${_toe_header}) +_toecore = toecore +_tom = tom +.endif + +.if ${MACHINE_ARCH} == "i386" && exists(${_toe_header}) _iw_cxgb = iw_cxgb .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_ARCH} == "amd64" && exists(${_toe_header}) _iw_cxgb = iw_cxgb .endif |