- if (drive->media != ide_disk)
- return 0;
- if (HWGROUP(drive)->handler != NULL) /* paranoia check */
- BUG();
- ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL);
- /*
- * FIX ME to use only ACB ide_task_t args Struct
- */
-#if 0
- {
- ide_task_t *args = rq->special;
- command = args->tfRegister[IDE_COMMAND_OFFSET];
- }
-#else
- command = /* (lba48) ? WIN_WRITEDMA_EXT : */ WIN_WRITEDMA;
- if (rq->flags & REQ_DRIVE_TASKFILE) {
- ide_task_t *args = rq->special;
- command = args->tfRegister[IDE_COMMAND_OFFSET];
- }
-#endif
- /* issue cmd to drive */
- hwif->OUTB(command, IDE_COMMAND_REG);
- return hwif->ide_dma_begin(drive);