aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:36 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:36 -0400
commit97100fc816badbbc162644cfde7ad39ae9211fb4 (patch)
tree904faf5453c2dea32fa3fde5fda230118f3effda /drivers/ide/ide-taskfile.c
parentbe3c096ebdbe3c828aacb5473751a22840753eff (diff)
ide: add device flags
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields to IDE_DFLAG_* flags. While at it: - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48 - fixup some comments - remove needless g->flags zeroing from ide*_probe() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 487b18b3ebae..8da8d26db7ed 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -116,7 +116,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
116 WAIT_WORSTCASE, NULL); 116 WAIT_WORSTCASE, NULL);
117 return ide_started; 117 return ide_started;
118 default: 118 default:
119 if (drive->using_dma == 0 || dma_ops->dma_setup(drive)) 119 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
120 dma_ops->dma_setup(drive))
120 return ide_stopped; 121 return ide_stopped;
121 dma_ops->dma_exec_cmd(drive, tf->command); 122 dma_ops->dma_exec_cmd(drive, tf->command);
122 dma_ops->dma_start(drive); 123 dma_ops->dma_start(drive);
@@ -469,13 +470,12 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq)
469 if (ide_wait_stat(&startstop, drive, ATA_DRQ, 470 if (ide_wait_stat(&startstop, drive, ATA_DRQ,
470 drive->bad_wstat, WAIT_DRQ)) { 471 drive->bad_wstat, WAIT_DRQ)) {
471 printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n", 472 printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n",
472 drive->name, 473 drive->name, drive->hwif->data_phase ? "MULT" : "",
473 drive->hwif->data_phase ? "MULT" : "", 474 (drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : "");
474 drive->addressing ? "_EXT" : "");
475 return startstop; 475 return startstop;
476 } 476 }
477 477
478 if (!drive->unmask) 478 if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0)
479 local_irq_disable(); 479 local_irq_disable();
480 480
481 ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL); 481 ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
@@ -591,7 +591,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
591 591
592 args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE | 592 args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE |
593 IDE_TFLAG_IN_TF; 593 IDE_TFLAG_IN_TF;
594 if (drive->addressing == 1) 594 if (drive->dev_flags & IDE_DFLAG_LBA48)
595 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); 595 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB);
596 596
597 if (req_task->out_flags.all) { 597 if (req_task->out_flags.all) {
@@ -694,7 +694,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
694 if ((args.tf_flags & IDE_TFLAG_FLAGGED_SET_IN_FLAGS) && 694 if ((args.tf_flags & IDE_TFLAG_FLAGGED_SET_IN_FLAGS) &&
695 req_task->in_flags.all == 0) { 695 req_task->in_flags.all == 0) {
696 req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; 696 req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
697 if (drive->addressing == 1) 697 if (drive->dev_flags & IDE_DFLAG_LBA48)
698 req_task->in_flags.all |= (IDE_HOB_STD_IN_FLAGS << 8); 698 req_task->in_flags.all |= (IDE_HOB_STD_IN_FLAGS << 8);
699 } 699 }
700 700