aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:56 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:56 -0400
commit5e3310958204912f3f00be2592c945fbc37db6ae (patch)
tree90f43165564207eaa8adb97b49faac032bcf73f4
parent1b06e92aa03018e4b3ba281e03a7711d9b71a998 (diff)
ide-{floppy,tape}: PC_FLAG_DMA_RECOMMENDED -> PC_FLAG_DMA_OK
* Use PC_FLAG_DMA_OK flag instead of PC_FLAG_DMA_RECOMMENDED one. * Remove no longer used PC_FLAG_DMA_RECOMMENDED flag. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-floppy.c6
-rw-r--r--drivers/ide/ide-tape.c6
-rw-r--r--include/linux/ide.h9
3 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index a9f3127a74ed..dbefe35c1396 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -630,7 +630,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
630 } 630 }
631 dma = 0; 631 dma = 0;
632 632
633 if ((pc->flags & PC_FLAG_DMA_RECOMMENDED) && drive->using_dma) 633 if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma)
634 dma = !hwif->dma_ops->dma_setup(drive); 634 dma = !hwif->dma_ops->dma_setup(drive);
635 635
636 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma); 636 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma);
@@ -755,7 +755,7 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
755 pc->flags |= PC_FLAG_WRITING; 755 pc->flags |= PC_FLAG_WRITING;
756 pc->buf = NULL; 756 pc->buf = NULL;
757 pc->req_xfer = pc->buf_size = blocks * floppy->block_size; 757 pc->req_xfer = pc->buf_size = blocks * floppy->block_size;
758 pc->flags |= PC_FLAG_DMA_RECOMMENDED; 758 pc->flags |= PC_FLAG_DMA_OK;
759} 759}
760 760
761static void idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy, 761static void idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy,
@@ -769,7 +769,7 @@ static void idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy,
769 pc->flags |= PC_FLAG_WRITING; 769 pc->flags |= PC_FLAG_WRITING;
770 pc->buf = rq->data; 770 pc->buf = rq->data;
771 if (rq->bio) 771 if (rq->bio)
772 pc->flags |= PC_FLAG_DMA_RECOMMENDED; 772 pc->flags |= PC_FLAG_DMA_OK;
773 /* 773 /*
774 * possibly problematic, doesn't look like ide-floppy correctly 774 * possibly problematic, doesn't look like ide-floppy correctly
775 * handled scattered requests if dma fails... 775 * handled scattered requests if dma fails...
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index ce9b6d327528..e8a5852fa2d4 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1050,7 +1050,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
1050 pc->flags &= ~PC_FLAG_DMA_ERROR; 1050 pc->flags &= ~PC_FLAG_DMA_ERROR;
1051 ide_dma_off(drive); 1051 ide_dma_off(drive);
1052 } 1052 }
1053 if ((pc->flags & PC_FLAG_DMA_RECOMMENDED) && drive->using_dma) 1053 if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma)
1054 dma_ok = !hwif->dma_ops->dma_setup(drive); 1054 dma_ok = !hwif->dma_ops->dma_setup(drive);
1055 1055
1056 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma_ok); 1056 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma_ok);
@@ -1138,7 +1138,7 @@ static void idetape_create_read_cmd(idetape_tape_t *tape,
1138 pc->buf_size = length * tape->blk_size; 1138 pc->buf_size = length * tape->blk_size;
1139 pc->req_xfer = pc->buf_size; 1139 pc->req_xfer = pc->buf_size;
1140 if (pc->req_xfer == tape->buffer_size) 1140 if (pc->req_xfer == tape->buffer_size)
1141 pc->flags |= PC_FLAG_DMA_RECOMMENDED; 1141 pc->flags |= PC_FLAG_DMA_OK;
1142} 1142}
1143 1143
1144static void idetape_create_write_cmd(idetape_tape_t *tape, 1144static void idetape_create_write_cmd(idetape_tape_t *tape,
@@ -1157,7 +1157,7 @@ static void idetape_create_write_cmd(idetape_tape_t *tape,
1157 pc->buf_size = length * tape->blk_size; 1157 pc->buf_size = length * tape->blk_size;
1158 pc->req_xfer = pc->buf_size; 1158 pc->req_xfer = pc->buf_size;
1159 if (pc->req_xfer == tape->buffer_size) 1159 if (pc->req_xfer == tape->buffer_size)
1160 pc->flags |= PC_FLAG_DMA_RECOMMENDED; 1160 pc->flags |= PC_FLAG_DMA_OK;
1161} 1161}
1162 1162
1163static ide_startstop_t idetape_do_request(ide_drive_t *drive, 1163static ide_startstop_t idetape_do_request(ide_drive_t *drive,
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f079456adfdb..63cee2947f60 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -602,12 +602,11 @@ enum {
602 PC_FLAG_SUPPRESS_ERROR = (1 << 1), 602 PC_FLAG_SUPPRESS_ERROR = (1 << 1),
603 PC_FLAG_WAIT_FOR_DSC = (1 << 2), 603 PC_FLAG_WAIT_FOR_DSC = (1 << 2),
604 PC_FLAG_DMA_OK = (1 << 3), 604 PC_FLAG_DMA_OK = (1 << 3),
605 PC_FLAG_DMA_RECOMMENDED = (1 << 4), 605 PC_FLAG_DMA_IN_PROGRESS = (1 << 4),
606 PC_FLAG_DMA_IN_PROGRESS = (1 << 5), 606 PC_FLAG_DMA_ERROR = (1 << 5),
607 PC_FLAG_DMA_ERROR = (1 << 6), 607 PC_FLAG_WRITING = (1 << 6),
608 PC_FLAG_WRITING = (1 << 7),
609 /* command timed out */ 608 /* command timed out */
610 PC_FLAG_TIMEDOUT = (1 << 8), 609 PC_FLAG_TIMEDOUT = (1 << 7),
611}; 610};
612 611
613struct ide_atapi_pc { 612struct ide_atapi_pc {