summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:39 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:39 +0200
commitd6e2955a6b82d2312b5ff885ce13c8ab54d59d96 (patch)
treef8bc72a2f60218f2d14883b6b54b9454499ed158 /drivers/ide
parentde699ad595fb45022d1b049ed91ffd06fdd16c13 (diff)
downloadblackbird-op-linux-d6e2955a6b82d2312b5ff885ce13c8ab54d59d96.tar.gz
blackbird-op-linux-d6e2955a6b82d2312b5ff885ce13c8ab54d59d96.zip
ide: move IDE{FLOPPY,TAPE}_WAIT_CMD defines to <linux/ide.h>
While at it: * IDE{FLOPPY,TAPE}_WAIT_CMD -> WAIT_{FLOPPY,TAPE}_CMD * Use enum for WAIT_* defines. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-floppy.c13
-rw-r--r--drivers/ide/ide-tape.c13
2 files changed, 7 insertions, 19 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 4d7e9ef82425..a63aba2c8265 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -61,10 +61,6 @@
#define debug_log(fmt, args...) do {} while (0)
#endif
-
-/* Some drives require a longer irq timeout. */
-#define IDEFLOPPY_WAIT_CMD (5 * WAIT_CMD)
-
/*
* After each failed packet command we issue a request sense command and retry
* the packet command IDEFLOPPY_MAX_PC_RETRIES times.
@@ -226,7 +222,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
idefloppy_floppy_t *floppy = drive->driver_data;
return ide_pc_intr(drive, floppy->pc, idefloppy_pc_intr,
- IDEFLOPPY_WAIT_CMD, NULL, idefloppy_update_buffers,
+ WAIT_FLOPPY_CMD, NULL, idefloppy_update_buffers,
idefloppy_retry_pc, NULL, ide_io_buffers);
}
@@ -244,10 +240,9 @@ static int idefloppy_transfer_pc(ide_drive_t *drive)
drive->hwif->tp_ops->output_data(drive, NULL, floppy->pc->c, 12);
/* Timeout for the packet command */
- return IDEFLOPPY_WAIT_CMD;
+ return WAIT_FLOPPY_CMD;
}
-
/*
* Called as an interrupt (or directly). When the device says it's ready for a
* packet, we schedule the packet transfer to occur about 2-3 ticks later in
@@ -272,7 +267,7 @@ static ide_startstop_t idefloppy_start_pc_transfer(ide_drive_t *drive)
timeout = floppy->ticks;
expiry = &idefloppy_transfer_pc;
} else {
- timeout = IDEFLOPPY_WAIT_CMD;
+ timeout = WAIT_FLOPPY_CMD;
expiry = NULL;
}
@@ -322,7 +317,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
pc->retries++;
return ide_issue_pc(drive, pc, idefloppy_start_pc_transfer,
- IDEFLOPPY_WAIT_CMD, NULL);
+ WAIT_FLOPPY_CMD, NULL);
}
void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *pc)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 737dd7db6bb7..25190966ed39 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -81,13 +81,6 @@ enum {
#define IDETAPE_MAX_PC_RETRIES 3
/*
- * Some drives (for example, Seagate STT3401A Travan) require a very long
- * timeout, because they don't return an interrupt or clear their busy bit
- * until after the command completes (even retension commands).
- */
-#define IDETAPE_WAIT_CMD (900*HZ)
-
-/*
* The following parameter is used to select the point in the internal tape fifo
* in which we will start to refill the buffer. Decreasing the following
* parameter will improve the system's latency and interactive response, while
@@ -663,7 +656,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
{
idetape_tape_t *tape = drive->driver_data;
- return ide_pc_intr(drive, tape->pc, idetape_pc_intr, IDETAPE_WAIT_CMD,
+ return ide_pc_intr(drive, tape->pc, idetape_pc_intr, WAIT_TAPE_CMD,
NULL, idetape_update_buffers, idetape_retry_pc,
ide_tape_handle_dsc, ide_tape_io_buffers);
}
@@ -709,7 +702,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
idetape_tape_t *tape = drive->driver_data;
return ide_transfer_pc(drive, tape->pc, idetape_pc_intr,
- IDETAPE_WAIT_CMD, NULL);
+ WAIT_TAPE_CMD, NULL);
}
static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
@@ -758,7 +751,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
pc->retries++;
return ide_issue_pc(drive, pc, idetape_transfer_pc,
- IDETAPE_WAIT_CMD, NULL);
+ WAIT_TAPE_CMD, NULL);
}
/* A mode sense command is used to "sense" tape parameters. */
OpenPOWER on IntegriCloud