aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 8c39146b6088..b34d1bb94e55 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -225,6 +225,43 @@ typedef struct idetape_packet_command_s {
225/* Data direction */ 225/* Data direction */
226#define PC_WRITING 5 226#define PC_WRITING 5
227 227
228/* Tape door status */
229#define DOOR_UNLOCKED 0
230#define DOOR_LOCKED 1
231#define DOOR_EXPLICITLY_LOCKED 2
232
233/* Some defines for the SPACE command */
234#define IDETAPE_SPACE_OVER_FILEMARK 1
235#define IDETAPE_SPACE_TO_EOD 3
236
237/* Some defines for the LOAD UNLOAD command */
238#define IDETAPE_LU_LOAD_MASK 1
239#define IDETAPE_LU_RETENSION_MASK 2
240#define IDETAPE_LU_EOT_MASK 4
241
242/*
243 * Special requests for our block device strategy routine.
244 *
245 * In order to service a character device command, we add special requests to
246 * the tail of our block device request queue and wait for their completion.
247 */
248
249enum {
250 REQ_IDETAPE_PC1 = (1 << 0), /* packet command (first stage) */
251 REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */
252 REQ_IDETAPE_READ = (1 << 2),
253 REQ_IDETAPE_WRITE = (1 << 3),
254};
255
256/* Error codes returned in rq->errors to the higher part of the driver. */
257#define IDETAPE_ERROR_GENERAL 101
258#define IDETAPE_ERROR_FILEMARK 102
259#define IDETAPE_ERROR_EOD 103
260
261/* Structures related to the SELECT SENSE / MODE SENSE packet commands. */
262#define IDETAPE_BLOCK_DESCRIPTOR 0
263#define IDETAPE_CAPABILITIES_PAGE 0x2a
264
228/* A pipeline stage. */ 265/* A pipeline stage. */
229typedef struct idetape_stage_s { 266typedef struct idetape_stage_s {
230 struct request rq; /* The corresponding request */ 267 struct request rq; /* The corresponding request */
@@ -446,11 +483,6 @@ static void ide_tape_put(struct ide_tape_obj *tape)
446 mutex_unlock(&idetape_ref_mutex); 483 mutex_unlock(&idetape_ref_mutex);
447} 484}
448 485
449/* Tape door status */
450#define DOOR_UNLOCKED 0
451#define DOOR_LOCKED 1
452#define DOOR_EXPLICITLY_LOCKED 2
453
454/* 486/*
455 * Tape flag bits values. 487 * Tape flag bits values.
456 */ 488 */
@@ -466,38 +498,6 @@ static void ide_tape_put(struct ide_tape_obj *tape)
466/* 0 = no tape is loaded, so we don't rewind after ejecting */ 498/* 0 = no tape is loaded, so we don't rewind after ejecting */
467#define IDETAPE_MEDIUM_PRESENT 9 499#define IDETAPE_MEDIUM_PRESENT 9
468 500
469/* Some defines for the SPACE command */
470#define IDETAPE_SPACE_OVER_FILEMARK 1
471#define IDETAPE_SPACE_TO_EOD 3
472
473/* Some defines for the LOAD UNLOAD command */
474#define IDETAPE_LU_LOAD_MASK 1
475#define IDETAPE_LU_RETENSION_MASK 2
476#define IDETAPE_LU_EOT_MASK 4
477
478/*
479 * Special requests for our block device strategy routine.
480 *
481 * In order to service a character device command, we add special requests to
482 * the tail of our block device request queue and wait for their completion.
483 */
484
485enum {
486 REQ_IDETAPE_PC1 = (1 << 0), /* packet command (first stage) */
487 REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */
488 REQ_IDETAPE_READ = (1 << 2),
489 REQ_IDETAPE_WRITE = (1 << 3),
490};
491
492/* Error codes returned in rq->errors to the higher part of the driver. */
493#define IDETAPE_ERROR_GENERAL 101
494#define IDETAPE_ERROR_FILEMARK 102
495#define IDETAPE_ERROR_EOD 103
496
497/* Structures related to the SELECT SENSE / MODE SENSE packet commands. */
498#define IDETAPE_BLOCK_DESCRIPTOR 0
499#define IDETAPE_CAPABILITIES_PAGE 0x2a
500
501/* 501/*
502 * The variables below are used for the character device interface. Additional 502 * The variables below are used for the character device interface. Additional
503 * state variables are defined in our ide_drive_t structure. 503 * state variables are defined in our ide_drive_t structure.