* [PATCH] hpt366: use ATA_DMA_* constants
@ 2009-04-09 12:38 Sergei Shtylyov
2009-04-16 18:58 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2009-04-09 12:38 UTC (permalink / raw)
To: bzolnier; +Cc: linux-ide
Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
This patch is atop the recent pata-2.6 series...
drivers/ide/hpt366.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6/drivers/ide/hpt366.c
===================================================================
--- linux-2.6.orig/drivers/ide/hpt366.c
+++ linux-2.6/drivers/ide/hpt366.c
@@ -3,7 +3,7 @@
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
- * Portions Copyright (C) 2005-2008 MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2009 MontaVista Software, Inc.
*
* Thanks to HighPoint Technologies for their assistance, and hardware.
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -810,7 +810,7 @@ static void hpt370_irq_timeout(ide_drive
/* get DMA command mode */
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
/* stop DMA */
- outb(dma_cmd & ~0x1, hwif->dma_base + ATA_DMA_CMD);
+ outb(dma_cmd & ~ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
hpt370_clear_engine(drive);
}
@@ -827,11 +827,11 @@ static int hpt370_dma_end(ide_drive_t *d
ide_hwif_t *hwif = drive->hwif;
u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
- if (dma_stat & 0x01) {
+ if (dma_stat & ATA_DMA_ACTIVE) {
/* wait a little */
udelay(20);
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
- if (dma_stat & 0x01)
+ if (dma_stat & ATA_DMA_ACTIVE)
hpt370_irq_timeout(drive);
}
return ide_dma_end(drive);
@@ -853,7 +853,7 @@ static int hpt374_dma_test_irq(ide_drive
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
/* return 1 if INTR asserted */
- if (dma_stat & 4)
+ if (dma_stat & ATA_DMA_INTR)
return 1;
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hpt366: use ATA_DMA_* constants
2009-04-09 12:38 [PATCH] hpt366: use ATA_DMA_* constants Sergei Shtylyov
@ 2009-04-16 18:58 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-04-16 18:58 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide
On Thursday 09 April 2009 14:38:50 Sergei Shtylyov wrote:
> Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.
>
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-16 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 12:38 [PATCH] hpt366: use ATA_DMA_* constants Sergei Shtylyov
2009-04-16 18:58 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).