aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorGrant Grundler <grundler@google.com>2009-04-08 08:12:49 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-04-08 08:12:49 -0400
commitedafcf73dca2f9531c78eec130df84a8c9654b3b (patch)
tree71f01d37becfe14c2f26f9cee2ea5f6af03112e0 /drivers/ide
parentd18812070efc658267f7573eec5ce7810128bfeb (diff)
ide: remove wmb() from ide-dma-sff.c and scc_pata.c
This patch: o replaces "mask" variable in ide_dma_end() with #define. o removes use of wmb() in ide-dma-sff.c and scc_pata.c. o is not tested - I don't have (or want) the HW. Signed-off-by: Grant Grundler <grundler@google.com> Cc: KOBAYASHI Yoshitake <yoshitake.kobayashi@toshiba.co.jp> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-dma-sff.c9
-rw-r--r--drivers/ide/scc_pata.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ide/ide-dma-sff.c b/drivers/ide/ide-dma-sff.c
index 16fc46edc32d..e4cdf78cc3e9 100644
--- a/drivers/ide/ide-dma-sff.c
+++ b/drivers/ide/ide-dma-sff.c
@@ -277,8 +277,6 @@ void ide_dma_start(ide_drive_t *drive)
277 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); 277 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
278 outb(dma_cmd | ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD); 278 outb(dma_cmd | ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
279 } 279 }
280
281 wmb();
282} 280}
283EXPORT_SYMBOL_GPL(ide_dma_start); 281EXPORT_SYMBOL_GPL(ide_dma_start);
284 282
@@ -286,7 +284,7 @@ EXPORT_SYMBOL_GPL(ide_dma_start);
286int ide_dma_end(ide_drive_t *drive) 284int ide_dma_end(ide_drive_t *drive)
287{ 285{
288 ide_hwif_t *hwif = drive->hwif; 286 ide_hwif_t *hwif = drive->hwif;
289 u8 dma_stat = 0, dma_cmd = 0, mask; 287 u8 dma_stat = 0, dma_cmd = 0;
290 288
291 /* stop DMA */ 289 /* stop DMA */
292 if (hwif->host_flags & IDE_HFLAG_MMIO) { 290 if (hwif->host_flags & IDE_HFLAG_MMIO) {
@@ -304,11 +302,10 @@ int ide_dma_end(ide_drive_t *drive)
304 /* clear INTR & ERROR bits */ 302 /* clear INTR & ERROR bits */
305 ide_dma_sff_write_status(hwif, dma_stat | ATA_DMA_ERR | ATA_DMA_INTR); 303 ide_dma_sff_write_status(hwif, dma_stat | ATA_DMA_ERR | ATA_DMA_INTR);
306 304
307 wmb(); 305#define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)
308 306
309 /* verify good DMA status */ 307 /* verify good DMA status */
310 mask = ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR; 308 if ((dma_stat & CHECK_DMA_MASK) != ATA_DMA_INTR)
311 if ((dma_stat & mask) != ATA_DMA_INTR)
312 return 0x10 | dma_stat; 309 return 0x10 | dma_stat;
313 return 0; 310 return 0;
314} 311}
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 6d8dbd9c10bc..55e48db7d1be 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -337,7 +337,6 @@ static void scc_dma_start(ide_drive_t *drive)
337 337
338 /* start DMA */ 338 /* start DMA */
339 scc_ide_outb(dma_cmd | 1, hwif->dma_base); 339 scc_ide_outb(dma_cmd | 1, hwif->dma_base);
340 wmb();
341} 340}
342 341
343static int __scc_dma_end(ide_drive_t *drive) 342static int __scc_dma_end(ide_drive_t *drive)
@@ -354,7 +353,6 @@ static int __scc_dma_end(ide_drive_t *drive)
354 /* clear the INTR & ERROR bits */ 353 /* clear the INTR & ERROR bits */
355 scc_ide_outb(dma_stat | 6, hwif->dma_base + 4); 354 scc_ide_outb(dma_stat | 6, hwif->dma_base + 4);
356 /* verify good DMA status */ 355 /* verify good DMA status */
357 wmb();
358 return (dma_stat & 7) != 4 ? (0x10 | dma_stat) : 0; 356 return (dma_stat & 7) != 4 ? (0x10 | dma_stat) : 0;
359} 357}
360 358