aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2007-05-28 22:57:27 +0000
committerKip Macy <kmacy@FreeBSD.org>2007-05-28 22:57:27 +0000
commit10faa568707403e7f72d9e20467c2d06b5517e43 (patch)
tree22efa55439af192b9a098eff9426d5f1a92c7f2e
parent911d16b8cd81203a41dc774a98332b5dc10eafd0 (diff)
When building cxgb as a module make include paths relative to the driver's root.
This will make it possible to build the module out of tree against an older src tree. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=170076
-rw-r--r--sys/dev/cxgb/common/cxgb_ael1002.c13
-rw-r--r--sys/dev/cxgb/common/cxgb_common.h14
-rw-r--r--sys/dev/cxgb/common/cxgb_firmware_exports.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_mc5.c13
-rw-r--r--sys/dev/cxgb/common/cxgb_mv88e1xxx.c12
-rw-r--r--sys/dev/cxgb/common/cxgb_regs.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_sge_defs.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_t3_cpl.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_t3_hw.c15
-rw-r--r--sys/dev/cxgb/common/cxgb_tcb.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_version.h6
-rw-r--r--sys/dev/cxgb/common/cxgb_vsc8211.c12
-rw-r--r--sys/dev/cxgb/common/cxgb_xgmac.c13
-rw-r--r--sys/dev/cxgb/cxgb_adapter.h7
-rw-r--r--sys/dev/cxgb/cxgb_include.h37
-rw-r--r--sys/dev/cxgb/cxgb_l2t.c13
-rw-r--r--sys/dev/cxgb/cxgb_lro.c9
-rw-r--r--sys/dev/cxgb/cxgb_main.c26
-rw-r--r--sys/dev/cxgb/cxgb_offload.c13
-rw-r--r--sys/dev/cxgb/cxgb_sge.c14
-rw-r--r--sys/dev/cxgb/sys/mbufq.h5
-rw-r--r--sys/dev/cxgb/sys/uipc_mvec.c14
-rw-r--r--sys/modules/cxgb/Makefile2
23 files changed, 138 insertions, 130 deletions
diff --git a/sys/dev/cxgb/common/cxgb_ael1002.c b/sys/dev/cxgb/common/cxgb_ael1002.c
index 02c4c2f8e0ad..3d67b0620749 100644
--- a/sys/dev/cxgb/common/cxgb_ael1002.c
+++ b/sys/dev/cxgb/common/cxgb_ael1002.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,8 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
enum {
AEL100X_TX_DISABLE = 9,
diff --git a/sys/dev/cxgb/common/cxgb_common.h b/sys/dev/cxgb/common/cxgb_common.h
index ae73bffd7072..1a0477251ebf 100644
--- a/sys/dev/cxgb/common/cxgb_common.h
+++ b/sys/dev/cxgb/common/cxgb_common.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -35,7 +31,11 @@ $FreeBSD$
#ifndef __CHELSIO_COMMON_H
#define __CHELSIO_COMMON_H
+#ifdef CONFIG_DEFINED
+#include <cxgb_osdep.h>
+#else
#include <dev/cxgb/cxgb_osdep.h>
+#endif
enum {
MAX_NPORTS = 2, /* max # of ports */
@@ -538,7 +538,11 @@ struct addr_val_pair {
unsigned int val;
};
+#ifdef CONFIG_DEFINED
+#include <cxgb_adapter.h>
+#else
#include <dev/cxgb/cxgb_adapter.h>
+#endif
#ifndef PCI_VENDOR_ID_CHELSIO
# define PCI_VENDOR_ID_CHELSIO 0x1425
diff --git a/sys/dev/cxgb/common/cxgb_firmware_exports.h b/sys/dev/cxgb/common/cxgb_firmware_exports.h
index 99f97a824386..e361c959265d 100644
--- a/sys/dev/cxgb/common/cxgb_firmware_exports.h
+++ b/sys/dev/cxgb/common/cxgb_firmware_exports.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_mc5.c b/sys/dev/cxgb/common/cxgb_mc5.c
index abbf71f49497..9d3b94f888cd 100644
--- a/sys/dev/cxgb/common/cxgb_mc5.c
+++ b/sys/dev/cxgb/common/cxgb_mc5.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,8 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
enum {
IDT75P52100 = 4,
diff --git a/sys/dev/cxgb/common/cxgb_mv88e1xxx.c b/sys/dev/cxgb/common/cxgb_mv88e1xxx.c
index 688b6e000fd9..6cee581bb501 100644
--- a/sys/dev/cxgb/common/cxgb_mv88e1xxx.c
+++ b/sys/dev/cxgb/common/cxgb_mv88e1xxx.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,7 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
/* Marvell PHY interrupt status bits. */
#define MV_INTR_JABBER 0x0001
diff --git a/sys/dev/cxgb/common/cxgb_regs.h b/sys/dev/cxgb/common/cxgb_regs.h
index fe8cd1461579..63744c49191e 100644
--- a/sys/dev/cxgb/common/cxgb_regs.h
+++ b/sys/dev/cxgb/common/cxgb_regs.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_sge_defs.h b/sys/dev/cxgb/common/cxgb_sge_defs.h
index d421673545ea..d850103abc2a 100644
--- a/sys/dev/cxgb/common/cxgb_sge_defs.h
+++ b/sys/dev/cxgb/common/cxgb_sge_defs.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_t3_cpl.h b/sys/dev/cxgb/common/cxgb_t3_cpl.h
index c737b0558c54..06e99f264d74 100644
--- a/sys/dev/cxgb/common/cxgb_t3_cpl.h
+++ b/sys/dev/cxgb/common/cxgb_t3_cpl.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_t3_hw.c b/sys/dev/cxgb/common/cxgb_t3_hw.c
index c99008e98448..ac4a6308f3fc 100644
--- a/sys/dev/cxgb/common/cxgb_t3_hw.c
+++ b/sys/dev/cxgb/common/cxgb_t3_hw.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,10 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
-#include <dev/cxgb/common/cxgb_sge_defs.h>
-#include <dev/cxgb/common/cxgb_firmware_exports.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
/**
* t3_wait_op_done_val - wait until an operation is completed
diff --git a/sys/dev/cxgb/common/cxgb_tcb.h b/sys/dev/cxgb/common/cxgb_tcb.h
index 82a67ea2cced..5dc72f5467fb 100644
--- a/sys/dev/cxgb/common/cxgb_tcb.h
+++ b/sys/dev/cxgb/common/cxgb_tcb.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_version.h b/sys/dev/cxgb/common/cxgb_version.h
index 2e48b523b3ee..88296af4a152 100644
--- a/sys/dev/cxgb/common/cxgb_version.h
+++ b/sys/dev/cxgb/common/cxgb_version.h
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/sys/dev/cxgb/common/cxgb_vsc8211.c b/sys/dev/cxgb/common/cxgb_vsc8211.c
index f118c02baa67..c3b3532599ed 100644
--- a/sys/dev/cxgb/common/cxgb_vsc8211.c
+++ b/sys/dev/cxgb/common/cxgb_vsc8211.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,7 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
/* VSC8211 PHY specific registers. */
enum {
diff --git a/sys/dev/cxgb/common/cxgb_xgmac.c b/sys/dev/cxgb/common/cxgb_xgmac.c
index 68c388e8aff1..22cd22e686c7 100644
--- a/sys/dev/cxgb/common/cxgb_xgmac.c
+++ b/sys/dev/cxgb/common/cxgb_xgmac.c
@@ -9,11 +9,7 @@ modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Chelsio Corporation nor the names of its
+ 2. Neither the name of the Chelsio Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -34,8 +30,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
/*
* # of exact address filters. The first one is used for the station address,
diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h
index f5c8a4c2871f..e6780034e5d2 100644
--- a/sys/dev/cxgb/cxgb_adapter.h
+++ b/sys/dev/cxgb/cxgb_adapter.h
@@ -55,8 +55,11 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <dev/cxgb/ulp/toecore/toedev.h>
-#include <dev/cxgb/sys/mbufq.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
struct adapter;
struct sge_qset;
diff --git a/sys/dev/cxgb/cxgb_include.h b/sys/dev/cxgb/cxgb_include.h
new file mode 100644
index 000000000000..c4eb5add9ffe
--- /dev/null
+++ b/sys/dev/cxgb/cxgb_include.h
@@ -0,0 +1,37 @@
+/*
+ * $FreeBSD$
+ */
+
+
+#ifdef CONFIG_DEFINED
+#include <cxgb_osdep.h>
+#include <common/cxgb_common.h>
+#include <cxgb_ioctl.h>
+#include <cxgb_offload.h>
+#include <common/cxgb_regs.h>
+#include <common/cxgb_t3_cpl.h>
+#include <dev/cxgb/common/cxgb_ctl_defs.h>
+#include <dev/cxgb/common/cxgb_sge_defs.h>
+#include <common/cxgb_firmware_exports.h>
+#include <sys/mvec.h>
+#include <ulp/toecore/toedev.h>
+#include <sys/mbufq.h>
+#include <common/jhash.h>
+
+
+#else
+#include <dev/cxgb/cxgb_osdep.h>
+#include <dev/cxgb/common/cxgb_common.h>
+#include <dev/cxgb/cxgb_ioctl.h>
+#include <dev/cxgb/cxgb_offload.h>
+#include <dev/cxgb/common/cxgb_regs.h>
+#include <dev/cxgb/common/cxgb_t3_cpl.h>
+#include <dev/cxgb/common/cxgb_ctl_defs.h>
+#include <dev/cxgb/common/cxgb_sge_defs.h>
+#include <dev/cxgb/common/cxgb_firmware_exports.h>
+
+#include <dev/cxgb/sys/mvec.h>
+#include <dev/cxgb/ulp/toecore/toedev.h>
+#include <dev/cxgb/sys/mbufq.h>
+#include <dev/cxgb/common/jhash.h>
+#endif
diff --git a/sys/dev/cxgb/cxgb_l2t.c b/sys/dev/cxgb/cxgb_l2t.c
index 8cc8211ce5f6..046132da85d8 100644
--- a/sys/dev/cxgb/cxgb_l2t.c
+++ b/sys/dev/cxgb/cxgb_l2t.c
@@ -50,14 +50,11 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <netinet/if_ether.h>
-
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
-#include <dev/cxgb/common/cxgb_sge_defs.h>
-#include <dev/cxgb/common/cxgb_t3_cpl.h>
-#include <dev/cxgb/common/cxgb_firmware_exports.h>
-#include <dev/cxgb/common/jhash.h>
-#include <dev/cxgb/cxgb_offload.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
#define VLAN_NONE 0xfff
#define SDL(s) ((struct sockaddr_dl *)s)
diff --git a/sys/dev/cxgb/cxgb_lro.c b/sys/dev/cxgb/cxgb_lro.c
index 8b24298745b4..9745cdf7cfda 100644
--- a/sys/dev/cxgb/cxgb_lro.c
+++ b/sys/dev/cxgb/cxgb_lro.c
@@ -49,9 +49,12 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip.h>
#include <netinet/tcp.h>
-#include <dev/cxgb/cxgb_osdep.h>
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_t3_cpl.h>
+
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
#include <machine/in_cksum.h>
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index f4a0aa8a73f7..e500f7a9a3c3 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -72,16 +72,11 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcivar.h>
#include <dev/pci/pci_private.h>
-#include <dev/cxgb/cxgb_osdep.h>
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/cxgb_ioctl.h>
-#include <dev/cxgb/cxgb_offload.h>
-#include <dev/cxgb/common/cxgb_regs.h>
-#include <dev/cxgb/common/cxgb_t3_cpl.h>
-#include <dev/cxgb/common/cxgb_firmware_exports.h>
-
-#include <dev/cxgb/sys/mvec.h>
-
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
#ifdef PRIV_SUPPORTED
#include <sys/priv.h>
@@ -1598,21 +1593,20 @@ cxgb_start_tx(struct ifnet *ifp, uint32_t txmax)
mtx_unlock(&txq->lock);
if (__predict_false(err)) {
- if (cxgb_debug)
- printf("would set OFLAGS\n");
if (err == ENOMEM) {
IFQ_LOCK(&ifp->if_snd);
IFQ_DRV_PREPEND(&ifp->if_snd, m);
IFQ_UNLOCK(&ifp->if_snd);
}
}
- if (err == 0 && m == NULL)
- err = ENOBUFS;
-
+ if (err == 0 && m == NULL) {
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ return (ENOBUFS);
+ }
if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC) &&
(ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- err = ENOSPC;
+ return (ENOSPC);
}
return (err);
}
diff --git a/sys/dev/cxgb/cxgb_offload.c b/sys/dev/cxgb/cxgb_offload.c
index f3909111b21f..a6d7a9973bc1 100644
--- a/sys/dev/cxgb/cxgb_offload.c
+++ b/sys/dev/cxgb/cxgb_offload.c
@@ -55,14 +55,11 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/taskqueue.h>
-#include <dev/cxgb/cxgb_osdep.h>
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/cxgb_ioctl.h>
-#include <dev/cxgb/common/cxgb_regs.h>
-#include <dev/cxgb/common/cxgb_t3_cpl.h>
-#include <dev/cxgb/common/cxgb_ctl_defs.h>
-#include <dev/cxgb/common/cxgb_firmware_exports.h>
-#include <dev/cxgb/cxgb_offload.h>
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
#include <net/if_vlan_var.h>
#include <net/route.h>
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
index 6be25e4ad346..4bd2a91318d4 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -57,14 +57,12 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <dev/cxgb/common/cxgb_common.h>
-#include <dev/cxgb/common/cxgb_regs.h>
-#include <dev/cxgb/common/cxgb_sge_defs.h>
-#include <dev/cxgb/common/cxgb_t3_cpl.h>
-#include <dev/cxgb/common/cxgb_firmware_exports.h>
-#include <dev/cxgb/cxgb_offload.h>
-
-#include <dev/cxgb/sys/mvec.h>
+
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
uint32_t collapse_free = 0;
uint32_t mb_free_vec_free = 0;
diff --git a/sys/dev/cxgb/sys/mbufq.h b/sys/dev/cxgb/sys/mbufq.h
index 114ac8521670..d8de43296d63 100644
--- a/sys/dev/cxgb/sys/mbufq.h
+++ b/sys/dev/cxgb/sys/mbufq.h
@@ -29,6 +29,9 @@ $FreeBSD$
***************************************************************************/
+#ifndef CXGB_MBUFQ_H_
+#define CXGB_MBUFQ_H_
+
struct mbuf_head {
struct mbuf *head;
struct mbuf *tail;
@@ -84,3 +87,5 @@ mbufq_peek(struct mbuf_head *l)
{
return (l->head);
}
+
+#endif /* CXGB_MBUFQ_H_ */
diff --git a/sys/dev/cxgb/sys/uipc_mvec.c b/sys/dev/cxgb/sys/uipc_mvec.c
index bcf3e24c2a70..04082727eb7c 100644
--- a/sys/dev/cxgb/sys/uipc_mvec.c
+++ b/sys/dev/cxgb/sys/uipc_mvec.c
@@ -41,19 +41,19 @@ __FBSDID("$FreeBSD$");
#include <sys/sf_buf.h>
#include <machine/bus.h>
-#include <dev/cxgb/sys/mvec.h>
+
+#ifdef CONFIG_DEFINED
+#include <cxgb_include.h>
+#else
+#include <dev/cxgb/cxgb_include.h>
+#endif
+
#include "opt_zero.h"
#include <vm/vm.h>
#include <vm/vm_page.h>
#include <vm/pmap.h>
-#ifdef DEBUG
-#define DPRINTF printf
-#else
-#define DPRINTF(...)
-#endif
-
#ifdef INVARIANTS
#define M_SANITY m_sanity
#else
diff --git a/sys/modules/cxgb/Makefile b/sys/modules/cxgb/Makefile
index fa72d2a172e4..5df8112bfa57 100644
--- a/sys/modules/cxgb/Makefile
+++ b/sys/modules/cxgb/Makefile
@@ -10,7 +10,7 @@ SRCS+= cxgb_offload.c cxgb_l2t.c
SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h
SRCS+= uipc_mvec.c
-CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DDEFAULT_JUMBO -DCONFIG_DEFINED
+CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DDEFAULT_JUMBO -DCONFIG_DEFINED -I${CXGB}
#CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS -DDEBUG
.if ${MACHINE_ARCH} != "ia64"