root/drivers/scsi/seagate.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  *      seagate.h Copyright (C) 1992 Drew Eckhardt 
   3  *      low level scsi driver header for ST01/ST02 by
   4  *              Drew Eckhardt 
   5  *
   6  *      <drew@colorado.edu>
   7  */
   8 
   9 #ifndef _SEAGATE_H
  10         #define SEAGATE_H
  11 /*
  12         $Header
  13 */
  14 #ifndef ASM
  15 int seagate_st0x_detect(Scsi_Host_Template *);
  16 int seagate_st0x_command(Scsi_Cmnd *);
  17 int seagate_st0x_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  18 
  19 int seagate_st0x_abort(Scsi_Cmnd *);
  20 const char *seagate_st0x_info(struct Scsi_Host *);
  21 int seagate_st0x_reset(Scsi_Cmnd *); 
  22 
  23 #ifndef NULL
  24         #define NULL 0
  25 #endif
  26 
  27 #include <linux/kdev_t.h>
  28 int seagate_st0x_biosparam(Disk *, kdev_t, int*);
  29 
  30 #define SEAGATE_ST0X  {  NULL, NULL, NULL, NULL, \
  31                          NULL, seagate_st0x_detect,     \
  32                          NULL,                                          \
  33                          seagate_st0x_info, seagate_st0x_command,       \
  34                          seagate_st0x_queue_command, seagate_st0x_abort, \
  35                          seagate_st0x_reset, NULL, seagate_st0x_biosparam, \
  36                          1, 7, SG_ALL, 1, 0, 0, DISABLE_CLUSTERING}
  37 #endif
  38 
  39 
  40 /*
  41         defining PARITY causes parity data to be checked
  42 */
  43 
  44 #define PARITY
  45 
  46 
  47 /*
  48         Thanks to Brian Antoine for the example code in his Messy-Loss ST-01
  49                 driver, and Mitsugu Suzuki for information on the ST-01
  50                 SCSI host.
  51 */
  52 
  53 /*
  54         CONTROL defines
  55 */
  56 
  57 #define CMD_RST                 0x01
  58 #define CMD_SEL                 0x02
  59 #define CMD_BSY                 0x04
  60 #define CMD_ATTN                0x08
  61 #define CMD_START_ARB           0x10
  62 #define CMD_EN_PARITY           0x20
  63 #define CMD_INTR                0x40
  64 #define CMD_DRVR_ENABLE         0x80
  65 
  66 /*
  67         STATUS
  68 */
  69 
  70 #define STAT_BSY                0x01
  71 #define STAT_MSG                0x02
  72 #define STAT_IO                 0x04
  73 #define STAT_CD                 0x08
  74 #define STAT_REQ                0x10
  75 #define STAT_SEL                0x20
  76 #define STAT_PARITY             0x40
  77 #define STAT_ARB_CMPL           0x80
  78 
  79 /* 
  80         REQUESTS
  81 */
  82 
  83 #define REQ_MASK (STAT_CD |  STAT_IO | STAT_MSG)
  84 #define REQ_DATAOUT 0
  85 #define REQ_DATAIN STAT_IO
  86 #define REQ_CMDOUT STAT_CD
  87 #define REQ_STATIN (STAT_CD | STAT_IO)
  88 #define REQ_MSGOUT (STAT_MSG | STAT_CD)
  89 #define REQ_MSGIN (STAT_MSG | STAT_CD | STAT_IO)
  90 
  91 extern volatile int seagate_st0x_timeout;
  92 
  93 #ifdef PARITY
  94         #define BASE_CMD CMD_EN_PARITY
  95 #else
  96         #define BASE_CMD  0
  97 #endif
  98 
  99 /*
 100         Debugging code
 101 */
 102 
 103 #define PHASE_BUS_FREE 1
 104 #define PHASE_ARBITRATION 2
 105 #define PHASE_SELECTION 4
 106 #define PHASE_DATAIN 8 
 107 #define PHASE_DATAOUT 0x10
 108 #define PHASE_CMDOUT 0x20
 109 #define PHASE_MSGIN 0x40
 110 #define PHASE_MSGOUT 0x80
 111 #define PHASE_STATUSIN 0x100
 112 #define PHASE_ETC (PHASE_DATAIN | PHASE_DATA_OUT | PHASE_CMDOUT | PHASE_MSGIN | PHASE_MSGOUT | PHASE_STATUSIN)
 113 #define PRINT_COMMAND 0x200
 114 #define PHASE_EXIT 0x400
 115 #define PHASE_RESELECT 0x800
 116 #define DEBUG_FAST 0x1000
 117 #define DEBUG_SG   0x2000
 118 #define DEBUG_LINKED    0x4000
 119 #define DEBUG_BORKEN    0x8000
 120 
 121 /* 
 122  *      Control options - these are timeouts specified in .01 seconds.
 123  */
 124 
 125 /* 30, 20 work */
 126 #define ST0X_BUS_FREE_DELAY 25
 127 #define ST0X_SELECTION_DELAY 25
 128 
 129 #define eoi() __asm__("push %%eax\nmovb $0x20, %%al\noutb %%al, $0x20\npop %%eax"::)
 130         
 131 #define SEAGATE 1       /* these determine the type of the controller */
 132 #define FD      2
 133 
 134 #define ST0X_ID_STR     "Seagate ST-01/ST-02"
 135 #define FD_ID_STR       "TMC-8XX/TMC-950"
 136 
 137 #endif
 138 

/* [previous][next][first][last][top][bottom][index][help] */