aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
commit5e37bdc081a980dd0d669e6387bcf15ca9666f81 (patch)
treed842166c3bd23fbf3dfba0ccaa0f9ed5cc3096db /drivers/ide/ide-io.c
parent1fd1890594bd355a4217f5658a34763e77decee3 (diff)
ide: add struct ide_dma_ops (take 3)
Add struct ide_dma_ops and convert core code + drivers to use it. While at it: * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods. * Drop "ide_" "infixes" from DMA methods. * au1xxx-ide.c: - use auide_dma_{test_irq,end}() directly in auide_dma_timeout() * pdc202xx_old.c: - drop "old_" "infixes" from DMA methods * siimage.c: - add siimage_dma_test_irq() helper - print SATA warning in siimage_init_one() * Remove no longer needed ->init_hwif implementations. v2: * Changes based on review from Sergei: - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/ - s/drive->hwif/hwif/ in idefloppy_pc_intr(). - fix patch description w.r.t. au1xxx-ide changes - fix au1xxx-ide build - fix naming for cmd64*_dma_ops - drop "ide_" and "old_" infixes - s/hpt3xxx_dma_ops/hpt37x_dma_ops/ - s/hpt370x_dma_ops/hpt370_dma_ops/ - use correct DMA ops for HPT302/N, HPT371/N and HPT374 - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/ v3: * Two bugs slipped in v2 (noticed by Sergei): - use correct DMA ops for HPT374 (for real this time) - handle HPT370/HPT370A properly Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 0d3f9c7aa336..0fe89a599275 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -218,7 +218,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
218 * we could be smarter and check for current xfer_speed 218 * we could be smarter and check for current xfer_speed
219 * in struct drive etc... 219 * in struct drive etc...
220 */ 220 */
221 if (drive->hwif->dma_host_set == NULL) 221 if (drive->hwif->dma_ops == NULL)
222 break; 222 break;
223 /* 223 /*
224 * TODO: respect ->using_dma setting 224 * TODO: respect ->using_dma setting
@@ -1238,12 +1238,12 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
1238 1238
1239 if (error < 0) { 1239 if (error < 0) {
1240 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); 1240 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name);
1241 (void)HWIF(drive)->ide_dma_end(drive); 1241 (void)hwif->dma_ops->dma_end(drive);
1242 ret = ide_error(drive, "dma timeout error", 1242 ret = ide_error(drive, "dma timeout error",
1243 ide_read_status(drive)); 1243 ide_read_status(drive));
1244 } else { 1244 } else {
1245 printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); 1245 printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name);
1246 hwif->dma_timeout(drive); 1246 hwif->dma_ops->dma_timeout(drive);
1247 } 1247 }
1248 1248
1249 /* 1249 /*
@@ -1355,7 +1355,7 @@ void ide_timer_expiry (unsigned long data)
1355 startstop = handler(drive); 1355 startstop = handler(drive);
1356 } else if (drive_is_ready(drive)) { 1356 } else if (drive_is_ready(drive)) {
1357 if (drive->waiting_for_dma) 1357 if (drive->waiting_for_dma)
1358 hwgroup->hwif->dma_lost_irq(drive); 1358 hwif->dma_ops->dma_lost_irq(drive);
1359 (void)ide_ack_intr(hwif); 1359 (void)ide_ack_intr(hwif);
1360 printk(KERN_WARNING "%s: lost interrupt\n", drive->name); 1360 printk(KERN_WARNING "%s: lost interrupt\n", drive->name);
1361 startstop = handler(drive); 1361 startstop = handler(drive);