Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71780
b: refs/heads/master
c: a02bfd3
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 19, 2007
1 parent 8298ac1 commit 86be28f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52c8136137bc98103249fa195aaacaf84a970d51
refs/heads/master: a02bfd3ce9342453441202028df44dc58f90e225
32 changes: 10 additions & 22 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,10 +901,7 @@ void ide_dma_timeout (ide_drive_t *drive)

EXPORT_SYMBOL(ide_dma_timeout);

/*
* Needed for allowing full modular support of ide-driver
*/
static int ide_release_dma_engine(ide_hwif_t *hwif)
static void ide_release_dma_engine(ide_hwif_t *hwif)
{
if (hwif->dmatable_cpu) {
pci_free_consistent(hwif->pci_dev,
Expand All @@ -913,7 +910,6 @@ static int ide_release_dma_engine(ide_hwif_t *hwif)
hwif->dmatable_dma);
hwif->dmatable_cpu = NULL;
}
return 1;
}

static int ide_release_iomio_dma(ide_hwif_t *hwif)
Expand Down Expand Up @@ -956,12 +952,6 @@ static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base, unsigned in
{
printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);

hwif->dma_base = base;

if(hwif->mate)
hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
else
hwif->dma_master = base;
return 0;
}

Expand All @@ -975,8 +965,6 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port
return 1;
}

hwif->dma_base = base;

if (hwif->cds->extra) {
hwif->extra_base = base + (hwif->channel ? 8 : 16);

Expand All @@ -991,10 +979,6 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port
}
}

if(hwif->mate)
hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base:base;
else
hwif->dma_master = base;
return 0;
}

Expand All @@ -1006,19 +990,23 @@ static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int por
return ide_iomio_dma(hwif, base, ports);
}

/*
* This can be called for a dynamically installed interface. Don't __init it
*/
void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_ports)
void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports)
{
if (ide_dma_iobase(hwif, dma_base, num_ports))
if (ide_dma_iobase(hwif, base, num_ports))
return;

if (ide_allocate_dma_engine(hwif)) {
ide_release_dma(hwif);
return;
}

hwif->dma_base = base;

if (hwif->mate)
hwif->dma_master = hwif->channel ? hwif->mate->dma_base : base;
else
hwif->dma_master = base;

if (!(hwif->dma_command))
hwif->dma_command = hwif->dma_base;
if (!(hwif->dma_vendor1))
Expand Down

0 comments on commit 86be28f

Please sign in to comment.