aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-10-13 15:39:49 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:49 -0400
commit0a9b6f8864362e31e348b12922a92b48b1b8cc94 (patch)
tree00aac30c355cf10cd5e2db7f99dd7cfb587c70db /drivers/ide/ide-atapi.c
parent35d9b17fe2dc48514fa3fbeec910e54103d13333 (diff)
ide: add ide_drive_t.dma flag
This flag is to accomodate ide-cd functionality into ide atapi. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index a1d8c3557a42..d55784173a79 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -545,7 +545,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
545 struct ide_atapi_pc *pc = drive->pc; 545 struct ide_atapi_pc *pc = drive->pc;
546 ide_hwif_t *hwif = drive->hwif; 546 ide_hwif_t *hwif = drive->hwif;
547 u16 bcount; 547 u16 bcount;
548 u8 dma = 0, scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI); 548 u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
549 549
550 /* We haven't transferred any data yet */ 550 /* We haven't transferred any data yet */
551 pc->xferred = 0; 551 pc->xferred = 0;
@@ -566,15 +566,16 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
566 (drive->dev_flags & IDE_DFLAG_USING_DMA)) { 566 (drive->dev_flags & IDE_DFLAG_USING_DMA)) {
567 if (scsi) 567 if (scsi)
568 hwif->sg_mapped = 1; 568 hwif->sg_mapped = 1;
569 dma = !hwif->dma_ops->dma_setup(drive); 569 drive->dma = !hwif->dma_ops->dma_setup(drive);
570 if (scsi) 570 if (scsi)
571 hwif->sg_mapped = 0; 571 hwif->sg_mapped = 0;
572 } 572 }
573 573
574 if (!dma) 574 if (!drive->dma)
575 pc->flags &= ~PC_FLAG_DMA_OK; 575 pc->flags &= ~PC_FLAG_DMA_OK;
576 576
577 ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount, dma); 577 ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount,
578 drive->dma);
578 579
579 /* Issue the packet command */ 580 /* Issue the packet command */
580 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { 581 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {