diff options
-rw-r--r-- | drivers/ide/ide-dma.c | 3 | ||||
-rw-r--r-- | drivers/ide/pci/trm290.c | 9 | ||||
-rw-r--r-- | include/linux/ide.h | 3 |
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 1933254660a1..ca7f974a71f5 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -821,7 +821,7 @@ void ide_release_dma_engine(ide_hwif_t *hwif) | |||
821 | } | 821 | } |
822 | } | 822 | } |
823 | 823 | ||
824 | static int ide_allocate_dma_engine(ide_hwif_t *hwif) | 824 | int ide_allocate_dma_engine(ide_hwif_t *hwif) |
825 | { | 825 | { |
826 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 826 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
827 | 827 | ||
@@ -837,6 +837,7 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif) | |||
837 | 837 | ||
838 | return 1; | 838 | return 1; |
839 | } | 839 | } |
840 | EXPORT_SYMBOL_GPL(ide_allocate_dma_engine); | ||
840 | 841 | ||
841 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) | 842 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) |
842 | { | 843 | { |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 0677ab016ef8..7e354d33323b 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -254,16 +254,11 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
254 | hwif->config_data = cfg_base; | 254 | hwif->config_data = cfg_base; |
255 | hwif->dma_base = (cfg_base + 4) ^ (hwif->channel ? 0x80 : 0); | 255 | hwif->dma_base = (cfg_base + 4) ^ (hwif->channel ? 0x80 : 0); |
256 | 256 | ||
257 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx", | 257 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", |
258 | hwif->name, hwif->dma_base, hwif->dma_base + 3); | 258 | hwif->name, hwif->dma_base, hwif->dma_base + 3); |
259 | 259 | ||
260 | hwif->dmatable_cpu = pci_alloc_consistent(dev, PRD_ENTRIES * PRD_BYTES, | 260 | if (ide_allocate_dma_engine(hwif)) |
261 | &hwif->dmatable_dma); | ||
262 | if (!hwif->dmatable_cpu) { | ||
263 | printk(KERN_CONT " -- Error, unable to allocate DMA table.\n"); | ||
264 | return; | 261 | return; |
265 | } | ||
266 | printk(KERN_CONT "\n"); | ||
267 | 262 | ||
268 | local_irq_save(flags); | 263 | local_irq_save(flags); |
269 | /* put config reg into first byte of hwif->select_data */ | 264 | /* put config reg into first byte of hwif->select_data */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 989fe78b354f..b8a9d3b4d633 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1155,7 +1155,8 @@ void ide_destroy_dmatable(ide_drive_t *); | |||
1155 | 1155 | ||
1156 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF | 1156 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
1157 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1157 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1158 | extern void ide_release_dma_engine(ide_hwif_t *); | 1158 | int ide_allocate_dma_engine(ide_hwif_t *); |
1159 | void ide_release_dma_engine(ide_hwif_t *); | ||
1159 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); | 1160 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); |
1160 | 1161 | ||
1161 | void ide_dma_host_set(ide_drive_t *, int); | 1162 | void ide_dma_host_set(ide_drive_t *, int); |