Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142957
b: refs/heads/master
c: edafcf7
h: refs/heads/master
i:
  142955: 4448d89
v: v3
  • Loading branch information
Grant Grundler authored and Bartlomiej Zolnierkiewicz committed Apr 8, 2009
1 parent 6a98799 commit 7cfb827
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 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: d18812070efc658267f7573eec5ce7810128bfeb
refs/heads/master: edafcf73dca2f9531c78eec130df84a8c9654b3b
9 changes: 3 additions & 6 deletions trunk/drivers/ide/ide-dma-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,14 @@ void ide_dma_start(ide_drive_t *drive)
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
outb(dma_cmd | ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
}

wmb();
}
EXPORT_SYMBOL_GPL(ide_dma_start);

/* returns 1 on error, 0 otherwise */
int ide_dma_end(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
u8 dma_stat = 0, dma_cmd = 0, mask;
u8 dma_stat = 0, dma_cmd = 0;

/* stop DMA */
if (hwif->host_flags & IDE_HFLAG_MMIO) {
Expand All @@ -304,11 +302,10 @@ int ide_dma_end(ide_drive_t *drive)
/* clear INTR & ERROR bits */
ide_dma_sff_write_status(hwif, dma_stat | ATA_DMA_ERR | ATA_DMA_INTR);

wmb();
#define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)

/* verify good DMA status */
mask = ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR;
if ((dma_stat & mask) != ATA_DMA_INTR)
if ((dma_stat & CHECK_DMA_MASK) != ATA_DMA_INTR)
return 0x10 | dma_stat;
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/ide/scc_pata.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ static void scc_dma_start(ide_drive_t *drive)

/* start DMA */
scc_ide_outb(dma_cmd | 1, hwif->dma_base);
wmb();
}

static int __scc_dma_end(ide_drive_t *drive)
Expand All @@ -354,7 +353,6 @@ static int __scc_dma_end(ide_drive_t *drive)
/* clear the INTR & ERROR bits */
scc_ide_outb(dma_stat | 6, hwif->dma_base + 4);
/* verify good DMA status */
wmb();
return (dma_stat & 7) != 4 ? (0x10 | dma_stat) : 0;
}

Expand Down

0 comments on commit 7cfb827

Please sign in to comment.