|
|
1.1 ! root 1: /* ! 2: * seagate.h Copyright (C) 1992 Drew Eckhardt ! 3: * low level scsi driver header for ST01/ST02 by ! 4: * Drew Eckhardt ! 5: * ! 6: * <[email protected]> ! 7: */ ! 8: ! 9: #ifndef _SEAGATE_H ! 10: #define SEAGATE_H ! 11: /* ! 12: $Header ! 13: */ ! 14: #ifndef ASM ! 15: int seagate_st0x_detect(int); ! 16: int seagate_st0x_command(unsigned char target, const void *cmnd, void *buff, int bufflen); ! 17: int seagate_st0x_abort(int); ! 18: char *seagate_st0x_info(void); ! 19: int seagate_st0x_reset(void); ! 20: ! 21: #ifndef NULL ! 22: #define NULL 0 ! 23: #endif ! 24: ! 25: #define SEAGATE_ST0X {"Seagate ST-01/ST-02", seagate_st0x_detect, \ ! 26: seagate_st0x_info, seagate_st0x_command, \ ! 27: NULL, seagate_st0x_abort, seagate_st0x_reset, \ ! 28: 0, 7, 0} ! 29: #endif ! 30: ! 31: ! 32: /* ! 33: defining PARITY causes parity data to be checked ! 34: */ ! 35: ! 36: #define PARITY ! 37: ! 38: /* ! 39: defining ARBITRATE causes the arbitration sequence to be used. And speed to drop by a ! 40: factor of ten. ! 41: */ ! 42: ! 43: #undef ARBITRATE ! 44: ! 45: ! 46: /* ! 47: Thanks to Brian Antoine for the example code in his Messy-Loss ST-01 ! 48: driver, and Mitsugu Suzuki for information on the ST-01 ! 49: SCSI host. ! 50: */ ! 51: ! 52: /* ! 53: CONTROL defines ! 54: */ ! 55: ! 56: #define CMD_RST 0x01 ! 57: #define CMD_SEL 0x02 ! 58: #define CMD_BSY 0x04 ! 59: #define CMD_ATTN 0x08 ! 60: #define CMD_START_ARB 0x10 ! 61: #define CMD_EN_PARITY 0x20 ! 62: #define CMD_INTR 0x40 ! 63: #define CMD_DRVR_ENABLE 0x80 ! 64: ! 65: /* ! 66: STATUS ! 67: */ ! 68: ! 69: #define STAT_BSY 0x01 ! 70: #define STAT_MSG 0x02 ! 71: #define STAT_IO 0x04 ! 72: #define STAT_CD 0x08 ! 73: #define STAT_REQ 0x10 ! 74: #define STAT_SEL 0x20 ! 75: #define STAT_PARITY 0x40 ! 76: #define STAT_ARB_CMPL 0x80 ! 77: ! 78: /* ! 79: REQUESTS ! 80: */ ! 81: ! 82: #define REQ_MASK (STAT_CD | STAT_IO | STAT_MSG) ! 83: #define REQ_DATAOUT 0 ! 84: #define REQ_DATAIN STAT_IO ! 85: #define REQ_CMDOUT STAT_CD ! 86: #define REQ_STATIN (STAT_CD | STAT_IO) ! 87: #define REQ_MSGOUT (STAT_MSG | STAT_CD) ! 88: #define REQ_MSGIN (STAT_MSG | STAT_CD | STAT_IO) ! 89: ! 90: extern volatile int seagate_st0x_timeout; ! 91: ! 92: #ifdef PARITY ! 93: #define BASE_CMD CMD_EN_PARITY ! 94: #else ! 95: #define BASE_CMD 0 ! 96: #endif ! 97: ! 98: /* ! 99: Debugging code ! 100: */ ! 101: ! 102: #define PHASE_BUS_FREE 1 ! 103: #define PHASE_ARBITRATION 2 ! 104: #define PHASE_SELECTION 4 ! 105: #define PHASE_DATAIN 8 ! 106: #define PHASE_DATAOUT 0x10 ! 107: #define PHASE_CMDOUT 0x20 ! 108: #define PHASE_MSGIN 0x40 ! 109: #define PHASE_MSGOUT 0x80 ! 110: #define PHASE_STATUSIN 0x100 ! 111: #define PHASE_ETC (PHASE_DATAIN | PHASE_DATA_OUT | PHASE_CMDOUT | PHASE_MSGIN | PHASE_MSGOUT | PHASE_STATUSIN) ! 112: #define PRINT_COMMAND 0x200 ! 113: #define PHASE_EXIT 0x400 ! 114: ! 115: /* ! 116: Control options - these are timeouts specified in .01 seconds. ! 117: */ ! 118: ! 119: #define ST0X_BUS_FREE_DELAY 25 ! 120: #define ST0X_SELECTION_DELAY 25 ! 121: ! 122: #endif ! 123:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.