LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 5/7] ide: export ide_allocate_dma_engine()
@ 2008-03-08 21:32 Bartlomiej Zolnierkiewicz
2008-03-09 20:17 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-08 21:32 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
Export ide_allocate_dma_engine() and use it in trm290 host driver.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-dma.c | 3 ++-
drivers/ide/pci/trm290.c | 9 ++-------
include/linux/ide.h | 3 ++-
3 files changed, 6 insertions(+), 9 deletions(-)
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -821,7 +821,7 @@ void ide_release_dma_engine(ide_hwif_t *
}
}
-static int ide_allocate_dma_engine(ide_hwif_t *hwif)
+int ide_allocate_dma_engine(ide_hwif_t *hwif)
{
struct pci_dev *pdev = to_pci_dev(hwif->dev);
@@ -837,6 +837,7 @@ static int ide_allocate_dma_engine(ide_h
return 1;
}
+EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
{
Index: b/drivers/ide/pci/trm290.c
===================================================================
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -254,16 +254,11 @@ static void __devinit init_hwif_trm290(i
hwif->config_data = cfg_base;
hwif->dma_base = (cfg_base + 4) ^ (hwif->channel ? 0x80 : 0);
- printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
+ printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n",
hwif->name, hwif->dma_base, hwif->dma_base + 3);
- hwif->dmatable_cpu = pci_alloc_consistent(dev, PRD_ENTRIES * PRD_BYTES,
- &hwif->dmatable_dma);
- if (!hwif->dmatable_cpu) {
- printk(KERN_CONT " -- Error, unable to allocate DMA table.\n");
+ if (ide_allocate_dma_engine(hwif))
return;
- }
- printk(KERN_CONT "\n");
local_irq_save(flags);
/* put config reg into first byte of hwif->select_data */
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1157,7 +1157,8 @@ void ide_destroy_dmatable(ide_drive_t *)
#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
extern int ide_build_dmatable(ide_drive_t *, struct request *);
-extern void ide_release_dma_engine(ide_hwif_t *);
+int ide_allocate_dma_engine(ide_hwif_t *);
+void ide_release_dma_engine(ide_hwif_t *);
extern void ide_setup_dma(ide_hwif_t *, unsigned long);
void ide_dma_host_set(ide_drive_t *, int);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 5/7] ide: export ide_allocate_dma_engine()
2008-03-08 21:32 [PATCH 5/7] ide: export ide_allocate_dma_engine() Bartlomiej Zolnierkiewicz
@ 2008-03-09 20:17 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2008-03-09 20:17 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel
Bartlomiej Zolnierkiewicz wrote:
> Export ide_allocate_dma_engine() and use it in trm290 host driver.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-09 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-08 21:32 [PATCH 5/7] ide: export ide_allocate_dma_engine() Bartlomiej Zolnierkiewicz
2008-03-09 20:17 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).