[PATCH] IB/ipath - fix driver build for platforms with PCI, but not HT
authorBryan O'Sullivan <bos@serpentine.com>
Thu, 16 Nov 2006 09:19:19 +0000 (01:19 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 16 Nov 2006 19:43:37 +0000 (11:43 -0800)
The PCI Express and Hypertransport chip-specific source files should only
be built when the kernel has the capability of actually compiling them.

This fixes the driver build on, for example, ia64.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/infiniband/hw/ipath/Kconfig
drivers/infiniband/hw/ipath/Makefile
drivers/infiniband/hw/ipath/ipath_driver.c

index 574a678e7fdd0a24199de80f9aab33bda82837a4..5ca471ac6542a269d516e89dc3cd7c24b5e275cc 100644 (file)
@@ -1,6 +1,6 @@
 config INFINIBAND_IPATH
        tristate "QLogic InfiniPath Driver"
-       depends on PCI_MSI && 64BIT && INFINIBAND
+       depends on (PCI_MSI || HT_IRQ) && 64BIT && INFINIBAND
        ---help---
        This is a driver for QLogic InfiniPath host channel adapters,
        including InfiniBand verbs support.  This driver allows these
index 5e29cb0095e568eefd85578eac42a71dbfe34b2d..7dc10551cf1857eda301afda1905e2def5a63f1a 100644 (file)
@@ -10,8 +10,6 @@ ib_ipath-y := \
        ipath_eeprom.o \
        ipath_file_ops.o \
        ipath_fs.o \
-       ipath_iba6110.o \
-       ipath_iba6120.o \
        ipath_init_chip.o \
        ipath_intr.o \
        ipath_keys.o \
@@ -31,5 +29,8 @@ ib_ipath-y := \
        ipath_verbs_mcast.o \
        ipath_verbs.o
 
+ib_ipath-$(CONFIG_HT_IRQ) += ipath_iba6110.o
+ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba6120.o
+
 ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o
 ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o
index 09a13c1fc46aa75c56955afaeccfb2e9358821d6..1aeddb48e355651a2a18843989bb49b81a8e7390 100644 (file)
@@ -390,12 +390,16 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
 
        /* setup the chip-specific functions, as early as possible. */
        switch (ent->device) {
+#ifdef CONFIG_HT_IRQ
        case PCI_DEVICE_ID_INFINIPATH_HT:
                ipath_init_iba6110_funcs(dd);
                break;
+#endif
+#ifdef CONFIG_PCI_MSI
        case PCI_DEVICE_ID_INFINIPATH_PE800:
                ipath_init_iba6120_funcs(dd);
                break;
+#endif
        default:
                ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, "
                              "failing\n", ent->device);