- struct request *rq = HWGROUP(drive)->rq;
- task_ioreg_t cmd;
-
- if (icside_dma_common(drive, rq, DMA_MODE_READ))
- return 1;
-
- if (drive->media != ide_disk)
- return 0;
-
- BUG_ON(HWGROUP(drive)->handler != NULL);
-
- /*
- * FIX ME to use only ACB ide_task_t args Struct
- */
-#if 0
- {
- ide_task_t *args = rq->special;
- cmd = args->tfRegister[IDE_COMMAND_OFFSET];
- }
-#else
- if (rq->flags & REQ_DRIVE_TASKFILE) {
- ide_task_t *args = rq->special;
- cmd = args->tfRegister[IDE_COMMAND_OFFSET];
- } else if (drive->addressing == 1) {
- cmd = WIN_READDMA_EXT;
- } else {
- cmd = WIN_READDMA;
- }
-#endif
- /* issue cmd to drive */
- ide_execute_command(drive, cmd, icside_dmaintr, 2*WAIT_CMD, NULL);
-
- return icside_dma_begin(drive);
-}
-
-static int icside_dma_write(ide_drive_t *drive)
-{
- struct request *rq = HWGROUP(drive)->rq;
- task_ioreg_t cmd;
-
- if (icside_dma_common(drive, rq, DMA_MODE_WRITE))
- return 1;
-
- if (drive->media != ide_disk)
- return 0;
-
- BUG_ON(HWGROUP(drive)->handler != NULL);
-
- /*
- * FIX ME to use only ACB ide_task_t args Struct
- */
-#if 0
- {
- ide_task_t *args = rq->special;
- cmd = args->tfRegister[IDE_COMMAND_OFFSET];
- }
-#else
- if (rq->flags & REQ_DRIVE_TASKFILE) {
- ide_task_t *args = rq->special;
- cmd = args->tfRegister[IDE_COMMAND_OFFSET];
- } else if (drive->addressing == 1) {
- cmd = WIN_WRITEDMA_EXT;
- } else {
- cmd = WIN_WRITEDMA;
- }
-#endif
-