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>
This commit is contained in:
@@ -116,7 +116,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
|
||||
WAIT_WORSTCASE, NULL);
|
||||
return ide_started;
|
||||
default:
|
||||
if (drive->using_dma == 0 || dma_ops->dma_setup(drive))
|
||||
if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
|
||||
dma_ops->dma_setup(drive))
|
||||
return ide_stopped;
|
||||
dma_ops->dma_exec_cmd(drive, tf->command);
|
||||
dma_ops->dma_start(drive);
|
||||
@@ -469,13 +470,12 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq)
|
||||
if (ide_wait_stat(&startstop, drive, ATA_DRQ,
|
||||
drive->bad_wstat, WAIT_DRQ)) {
|
||||
printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n",
|
||||
drive->name,
|
||||
drive->hwif->data_phase ? "MULT" : "",
|
||||
drive->addressing ? "_EXT" : "");
|
||||
drive->name, drive->hwif->data_phase ? "MULT" : "",
|
||||
(drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : "");
|
||||
return startstop;
|
||||
}
|
||||
|
||||
if (!drive->unmask)
|
||||
if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0)
|
||||
local_irq_disable();
|
||||
|
||||
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)
|
||||
|
||||
args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE |
|
||||
IDE_TFLAG_IN_TF;
|
||||
if (drive->addressing == 1)
|
||||
if (drive->dev_flags & IDE_DFLAG_LBA48)
|
||||
args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB);
|
||||
|
||||
if (req_task->out_flags.all) {
|
||||
@@ -694,7 +694,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
|
||||
if ((args.tf_flags & IDE_TFLAG_FLAGGED_SET_IN_FLAGS) &&
|
||||
req_task->in_flags.all == 0) {
|
||||
req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
|
||||
if (drive->addressing == 1)
|
||||
if (drive->dev_flags & IDE_DFLAG_LBA48)
|
||||
req_task->in_flags.all |= (IDE_HOB_STD_IN_FLAGS << 8);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user