Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139426
b: refs/heads/master
c: a6d67ff
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent 59d17dc commit 3873fa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 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: 5ae5412d9a23b05ab08461b202bad21ad8f6b66d
refs/heads/master: a6d67ffa7dfe9515d8f2051a76b14c82b748475a
24 changes: 11 additions & 13 deletions trunk/drivers/ide/ns87415.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ static void ns87415_selectproc (ide_drive_t *drive)
!!(drive->dev_flags & IDE_DFLAG_USING_DMA));
}

static void ns87415_dma_start(ide_drive_t *drive)
{
ns87415_prepare_drive(drive, 1);
ide_dma_start(drive);
}

static int ns87415_dma_end(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
Expand All @@ -210,19 +216,11 @@ static int ns87415_dma_end(ide_drive_t *drive)
/* from ERRATA: clear the INTR & ERROR bits */
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
outb(dma_cmd | 6, hwif->dma_base + ATA_DMA_CMD);
/* verify good DMA status */
return (dma_stat & 7) != 4;
}

static int ns87415_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
{
/* select DMA xfer */
ns87415_prepare_drive(drive, 1);
if (ide_dma_setup(drive, cmd) == 0)
return 0;
/* DMA failed: select PIO xfer */
ns87415_prepare_drive(drive, 0);
return 1;

/* verify good DMA status */
return (dma_stat & 7) != 4;
}

static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
Expand Down Expand Up @@ -298,8 +296,8 @@ static const struct ide_port_ops ns87415_port_ops = {

static const struct ide_dma_ops ns87415_dma_ops = {
.dma_host_set = ide_dma_host_set,
.dma_setup = ns87415_dma_setup,
.dma_start = ide_dma_start,
.dma_setup = ide_dma_setup,
.dma_start = ns87415_dma_start,
.dma_end = ns87415_dma_end,
.dma_test_irq = ide_dma_test_irq,
.dma_lost_irq = ide_dma_lost_irq,
Expand Down

0 comments on commit 3873fa4

Please sign in to comment.