diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-floppy.c | 13 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 13 |
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 @@ | |||
61 | #define debug_log(fmt, args...) do {} while (0) | 61 | #define debug_log(fmt, args...) do {} while (0) |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | |||
65 | /* Some drives require a longer irq timeout. */ | ||
66 | #define IDEFLOPPY_WAIT_CMD (5 * WAIT_CMD) | ||
67 | |||
68 | /* | 64 | /* |
69 | * After each failed packet command we issue a request sense command and retry | 65 | * After each failed packet command we issue a request sense command and retry |
70 | * the packet command IDEFLOPPY_MAX_PC_RETRIES times. | 66 | * the packet command IDEFLOPPY_MAX_PC_RETRIES times. |
@@ -226,7 +222,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) | |||
226 | idefloppy_floppy_t *floppy = drive->driver_data; | 222 | idefloppy_floppy_t *floppy = drive->driver_data; |
227 | 223 | ||
228 | return ide_pc_intr(drive, floppy->pc, idefloppy_pc_intr, | 224 | return ide_pc_intr(drive, floppy->pc, idefloppy_pc_intr, |
229 | IDEFLOPPY_WAIT_CMD, NULL, idefloppy_update_buffers, | 225 | WAIT_FLOPPY_CMD, NULL, idefloppy_update_buffers, |
230 | idefloppy_retry_pc, NULL, ide_io_buffers); | 226 | idefloppy_retry_pc, NULL, ide_io_buffers); |
231 | } | 227 | } |
232 | 228 | ||
@@ -244,10 +240,9 @@ static int idefloppy_transfer_pc(ide_drive_t *drive) | |||
244 | drive->hwif->tp_ops->output_data(drive, NULL, floppy->pc->c, 12); | 240 | drive->hwif->tp_ops->output_data(drive, NULL, floppy->pc->c, 12); |
245 | 241 | ||
246 | /* Timeout for the packet command */ | 242 | /* Timeout for the packet command */ |
247 | return IDEFLOPPY_WAIT_CMD; | 243 | return WAIT_FLOPPY_CMD; |
248 | } | 244 | } |
249 | 245 | ||
250 | |||
251 | /* | 246 | /* |
252 | * Called as an interrupt (or directly). When the device says it's ready for a | 247 | * Called as an interrupt (or directly). When the device says it's ready for a |
253 | * packet, we schedule the packet transfer to occur about 2-3 ticks later in | 248 | * 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) | |||
272 | timeout = floppy->ticks; | 267 | timeout = floppy->ticks; |
273 | expiry = &idefloppy_transfer_pc; | 268 | expiry = &idefloppy_transfer_pc; |
274 | } else { | 269 | } else { |
275 | timeout = IDEFLOPPY_WAIT_CMD; | 270 | timeout = WAIT_FLOPPY_CMD; |
276 | expiry = NULL; | 271 | expiry = NULL; |
277 | } | 272 | } |
278 | 273 | ||
@@ -322,7 +317,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
322 | pc->retries++; | 317 | pc->retries++; |
323 | 318 | ||
324 | return ide_issue_pc(drive, pc, idefloppy_start_pc_transfer, | 319 | return ide_issue_pc(drive, pc, idefloppy_start_pc_transfer, |
325 | IDEFLOPPY_WAIT_CMD, NULL); | 320 | WAIT_FLOPPY_CMD, NULL); |
326 | } | 321 | } |
327 | 322 | ||
328 | void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *pc) | 323 | 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 { | |||
81 | #define IDETAPE_MAX_PC_RETRIES 3 | 81 | #define IDETAPE_MAX_PC_RETRIES 3 |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Some drives (for example, Seagate STT3401A Travan) require a very long | ||
85 | * timeout, because they don't return an interrupt or clear their busy bit | ||
86 | * until after the command completes (even retension commands). | ||
87 | */ | ||
88 | #define IDETAPE_WAIT_CMD (900*HZ) | ||
89 | |||
90 | /* | ||
91 | * The following parameter is used to select the point in the internal tape fifo | 84 | * The following parameter is used to select the point in the internal tape fifo |
92 | * in which we will start to refill the buffer. Decreasing the following | 85 | * in which we will start to refill the buffer. Decreasing the following |
93 | * parameter will improve the system's latency and interactive response, while | 86 | * 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) | |||
663 | { | 656 | { |
664 | idetape_tape_t *tape = drive->driver_data; | 657 | idetape_tape_t *tape = drive->driver_data; |
665 | 658 | ||
666 | return ide_pc_intr(drive, tape->pc, idetape_pc_intr, IDETAPE_WAIT_CMD, | 659 | return ide_pc_intr(drive, tape->pc, idetape_pc_intr, WAIT_TAPE_CMD, |
667 | NULL, idetape_update_buffers, idetape_retry_pc, | 660 | NULL, idetape_update_buffers, idetape_retry_pc, |
668 | ide_tape_handle_dsc, ide_tape_io_buffers); | 661 | ide_tape_handle_dsc, ide_tape_io_buffers); |
669 | } | 662 | } |
@@ -709,7 +702,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) | |||
709 | idetape_tape_t *tape = drive->driver_data; | 702 | idetape_tape_t *tape = drive->driver_data; |
710 | 703 | ||
711 | return ide_transfer_pc(drive, tape->pc, idetape_pc_intr, | 704 | return ide_transfer_pc(drive, tape->pc, idetape_pc_intr, |
712 | IDETAPE_WAIT_CMD, NULL); | 705 | WAIT_TAPE_CMD, NULL); |
713 | } | 706 | } |
714 | 707 | ||
715 | static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | 708 | 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, | |||
758 | pc->retries++; | 751 | pc->retries++; |
759 | 752 | ||
760 | return ide_issue_pc(drive, pc, idetape_transfer_pc, | 753 | return ide_issue_pc(drive, pc, idetape_transfer_pc, |
761 | IDETAPE_WAIT_CMD, NULL); | 754 | WAIT_TAPE_CMD, NULL); |
762 | } | 755 | } |
763 | 756 | ||
764 | /* A mode sense command is used to "sense" tape parameters. */ | 757 | /* A mode sense command is used to "sense" tape parameters. */ |