aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/ide/ide-atapi.c9
-rw-r--r--include/linux/ide.h1
2 files changed, 6 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) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 5a39dab2cc91..8247b286838d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -603,6 +603,7 @@ struct ide_drive_s {
603 u8 select; /* basic drive/head select reg value */ 603 u8 select; /* basic drive/head select reg value */
604 u8 retry_pio; /* retrying dma capable host in pio */ 604 u8 retry_pio; /* retrying dma capable host in pio */
605 u8 waiting_for_dma; /* dma currently in progress */ 605 u8 waiting_for_dma; /* dma currently in progress */
606 u8 dma; /* atapi dma flag */
606 607
607 u8 quirk_list; /* considered quirky, set for a specific host */ 608 u8 quirk_list; /* considered quirky, set for a specific host */
608 u8 init_speed; /* transfer rate set at boot */ 609 u8 init_speed; /* transfer rate set at boot */