Commit 253275c5 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Bartlomiej Zolnierkiewicz

tx4939ide: remove wmb()

* define CHECK_DMA_MASK
* remove use of wmb()
Reported-by: default avatarGrant Grundler <grundler@google.com>
Reviewed-by: default avatarGrant Grundler <grundler@google.com>
Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
parent edafcf73
...@@ -327,15 +327,15 @@ static int tx4939ide_dma_end(ide_drive_t *drive) ...@@ -327,15 +327,15 @@ static int tx4939ide_dma_end(ide_drive_t *drive)
/* read and clear the INTR & ERROR bits */ /* read and clear the INTR & ERROR bits */
dma_stat = tx4939ide_clear_dma_status(base); dma_stat = tx4939ide_clear_dma_status(base);
wmb(); #define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)
/* verify good DMA status */ /* verify good DMA status */
if ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) == 0 && if ((dma_stat & CHECK_DMA_MASK) == 0 &&
(ctl & (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST)) == (ctl & (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST)) ==
(TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST)) (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST))
/* INT_IDE lost... bug? */ /* INT_IDE lost... bug? */
return 0; return 0;
return ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) != return ((dma_stat & CHECK_DMA_MASK) !=
ATA_DMA_INTR) ? 0x10 | dma_stat : 0; ATA_DMA_INTR) ? 0x10 | dma_stat : 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment