lkml.org 
[lkml]   [2002]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Allow 2.5.45 IDE to compile without DMA
When I enable generic IDE chipset support, but do not enable DMA, the kernel won't compile.  The patch below (while admittedly inelegant) fixed that up for me.

For the record, I only enabled these IDE options:

CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y

-Phil Oester


diff -ru linux-2.5.45-orig/drivers/ide/pci/generic.c linux-2.5.45/drivers/ide/pci/generic.c
--- linux-2.5.45-orig/drivers/ide/pci/generic.c Wed Oct 30 19:42:57 2002
+++ linux-2.5.45/drivers/ide/pci/generic.c Fri Nov 1 14:42:16 2002
@@ -60,7 +60,11 @@

static void init_dma_generic (ide_hwif_t *hwif, unsigned long dmabase)
{
+#ifdef CONFIG_BLK_DEV_IDEDMA
ide_setup_dma(hwif, dmabase, 8);
+#else /* !CONFIG_BLK_DEV_IDEDMA */
+ return;
+#endif /* CONFIG_BLK_DEV_IDEDMA */
}

extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
diff -ru linux-2.5.45-orig/drivers/ide/setup-pci.c linux-2.5.45/drivers/ide/setup-pci.c
--- linux-2.5.45-orig/drivers/ide/setup-pci.c Wed Oct 30 19:42:28 2002
+++ linux-2.5.45/drivers/ide/setup-pci.c Fri Nov 1 14:00:55 2002
@@ -475,6 +475,8 @@
return hwif;
}

+#ifdef CONFIG_BLK_DEV_IDEDMA
+
/**
* ide_hwif_setup_dma - configure DMA interface
* @dev: PCI device
@@ -528,6 +530,8 @@
}
}

+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
/**
* ide_setup_pci_controller - set up IDE PCI
* @dev: PCI device
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.223 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site