/* KLEENIX_ID: @(#)amigo.h 26.1 */ enum amigo_dev_type { HP7906, HP7905_L, HP7905_U, HP9895_SS, HP9895_DS, HP9895_IBM, HP8290X, HP913X_A, HP913X_B, HP913X_C, HP7920, HP7925, HP9121 }; enum command_type { seek_cmd, /* seek */ buf_read, /* buffered read */ buf_write, /* buffered write */ unbuf_read, /* unbuffered read */ unbuf_write, /* unbuffered write */ req_status, /* request status */ req_log_addr, /* request logical address */ recalibrate_cmd, /* recalibrate */ req_syndrome, /* request syndrome */ }; struct ftcb_type { char opcode; char unit; }; struct tva_type { short cyl; char head; char sect; }; struct status_type { unsigned int s:1; unsigned int p:1; unsigned int d:1; unsigned int s1:5; /* compiler bug: should be eunm s1_type */ unsigned int unit:8; unsigned int star:1; unsigned int xx:2; unsigned int tttt:4; unsigned int r:1; unsigned int a:1; unsigned int w:1; unsigned int fmt:1; unsigned int e:1; unsigned int f:1; unsigned int c:1; unsigned int ss:2; }; struct syndrome_type { int sb_pad1:3; int sb_s1:5; int sb_pad2:8; struct tva_type sb_tva; short sb_offset; char sb_correction_bytes[6]; }; struct map_type { /* media addressing parameters */ short cyl_per_med; short trk_per_cyl; short sec_per_trk; short ident; short model; /* if NO_MODEL, value is not to be checked */ short flag; }; #define MAXTRIES 10 /* must be at least 2 */ #define NO_MODEL 255 #define R_BIT_1 254 #define R_BIT_0 253 #define SYNC_UNBUF 0x01 /* unbuffered transfers must be synchronous */ #define SURFACE_MODE 0x02 /* as opposed to cylinder mode */ #define MUST_BUFFER 0x04 /* supports buffered transfer protocol only */ #define LONG_LATENCY 0x08 /* essentially floppies vs: hard discs */ #define NOWAIT_STATUS 0x10 /* status does not need a ppol wait */ #define NEEDS_SFM 0x20 /* needs set_file_mask (MAC/IDC) */ #define RECALIBRATES 0x40 /* necessary after certain errors (MAC/IDC) */ #define SEC_xDAT SCG_BASE+0 #define SEC_DSJ SCG_BASE+16 #define SEC_RSTA SCG_BASE+8 #define SEC_OP1 SCG_BASE+8 #define SEC_OP2 SCG_BASE+9 #define SEC_OP3 SCG_BASE+10 #define SEC_OP4 SCG_BASE+12 #define UNBUF_READ_OC 5 /* unbuffered read op code */ #define UNBUF_WRITE_OC 8 /* unbuffered write op code */ /* defines for the upper half of b_flags */ #define B_BUFFERED_TRANS 0x10000 #define B_SYNC_UNBUF 0x20000 enum s1_type { NORMAL_COMPLETION, ILLEGAL_OPCODE, UNIT_AVAILABLE, ILLEGAL_DRIVE_TYPE, S1_4, S1_5, S1_6, CYLINDER_COMPARE_ERROR, UNCORRECTABLE_DATA_ERROR, HEAD_SECTOR_COMPARE_ERROR, IO_PROGRAM_ERROR, S1_11, END_OF_CYLINDER, SYNC_BIT_NOT_RECEIVED_IN_TIME, BUS_OVERRUN, POSSIBLY_CORRECTABLE_DATA_ERROR, ILLEGAL_ACCESS_TO_SPARE, DEFECTIVE_TRACK, ACCESS_NOT_READY_DURING_DATA_OP, STATUS_2_ERROR, S1_20, S1_21, ATTEMPT_TO_WRITE_ON_PROTECTED_TRK, UNIT_UNAVAILABLE, S1_24, S1_25, S1_26, S1_27, S1_28, S1_29, S1_30, DRIVE_ATTENTION };