2 * seagate.h Copyright (C) 1992 Drew Eckhardt
3 * low level scsi driver header for ST01/ST02 by
15 int seagate_st0x_detect(int);
16 int seagate_st0x_command(Scsi_Cmnd
*);
17 int seagate_st0x_queue_command(Scsi_Cmnd
*, void (*done
)(Scsi_Cmnd
*));
19 int seagate_st0x_abort(Scsi_Cmnd
*, int);
20 const char *seagate_st0x_info(void);
21 int seagate_st0x_reset(Scsi_Cmnd
*);
27 #ifdef CONFIG_BLK_DEV_SD
28 int seagate_st0x_biosparam(int, int, int*);
30 #define seagate_st0x_biosparam NULL
33 #define SEAGATE_ST0X {"Seagate ST-01/ST-02", seagate_st0x_detect, \
34 seagate_st0x_info, seagate_st0x_command, \
35 seagate_st0x_queue_command, seagate_st0x_abort, \
36 seagate_st0x_reset, NULL, seagate_st0x_biosparam, \
37 1, 7, SG_ALL, 1, 0, 0}
42 defining PARITY causes parity data to be checked
49 Thanks to Brian Antoine for the example code in his Messy-Loss ST-01
50 driver, and Mitsugu Suzuki for information on the ST-01
62 #define CMD_START_ARB 0x10
63 #define CMD_EN_PARITY 0x20
65 #define CMD_DRVR_ENABLE 0x80
77 #define STAT_PARITY 0x40
78 #define STAT_ARB_CMPL 0x80
84 #define REQ_MASK (STAT_CD | STAT_IO | STAT_MSG)
86 #define REQ_DATAIN STAT_IO
87 #define REQ_CMDOUT STAT_CD
88 #define REQ_STATIN (STAT_CD | STAT_IO)
89 #define REQ_MSGOUT (STAT_MSG | STAT_CD)
90 #define REQ_MSGIN (STAT_MSG | STAT_CD | STAT_IO)
92 extern volatile int seagate_st0x_timeout
;
95 #define BASE_CMD CMD_EN_PARITY
104 #define PHASE_BUS_FREE 1
105 #define PHASE_ARBITRATION 2
106 #define PHASE_SELECTION 4
107 #define PHASE_DATAIN 8
108 #define PHASE_DATAOUT 0x10
109 #define PHASE_CMDOUT 0x20
110 #define PHASE_MSGIN 0x40
111 #define PHASE_MSGOUT 0x80
112 #define PHASE_STATUSIN 0x100
113 #define PHASE_ETC (PHASE_DATAIN | PHASE_DATA_OUT | PHASE_CMDOUT | PHASE_MSGIN | PHASE_MSGOUT | PHASE_STATUSIN)
114 #define PRINT_COMMAND 0x200
115 #define PHASE_EXIT 0x400
116 #define PHASE_RESELECT 0x800
117 #define DEBUG_FAST 0x1000
118 #define DEBUG_SG 0x2000
119 #define DEBUG_LINKED 0x4000
120 #define DEBUG_BORKEN 0x8000
123 * Control options - these are timeouts specified in .01 seconds.
127 #define ST0X_BUS_FREE_DELAY 25
128 #define ST0X_SELECTION_DELAY 25
130 #define eoi() __asm__("push %%eax\nmovb $0x20, %%al\noutb %%al, $0x20\npop %%eax"::)
132 #define SEAGATE 1 /* these determine the type of the controller */