root/drivers/scsi/ultrastor.h

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

INCLUDED FROM


   1 /*
   2  *      ultrastor.c     (C) 1991 David B. Gentzel
   3  *      Low-level scsi driver for UltraStor 14F
   4  *      by David B. Gentzel, Whitfield Software Services, Carnegie, PA
   5  *          (gentzel@nova.enet.dec.com)
   6  *  scatter/gather added by Scott Taylor (n217cg@tamuts.tamu.edu)
   7  *  24F support by John F. Carr (jfc@athena.mit.edu)
   8  *    John's work modified by Caleb Epstein (cae@jpmorgan.com) and 
   9  *    Eric Youngdale (eric@tantalus.nrl.navy.mil).
  10  *      Thanks to UltraStor for providing the necessary documentation
  11  */
  12 
  13 #ifndef _ULTRASTOR_H
  14 #define _ULTRASTOR_H
  15 
  16 int ultrastor_detect(Scsi_Host_Template *);
  17 const char *ultrastor_info(struct Scsi_Host * shpnt);
  18 int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  19 int ultrastor_abort(Scsi_Cmnd *);
  20 int ultrastor_reset(Scsi_Cmnd *);
  21 int ultrastor_biosparam(Disk *, int, int *);
  22 
  23 
  24 #define ULTRASTOR_14F_MAX_SG 16
  25 #define ULTRASTOR_24F_MAX_SG 33
  26 
  27 #define ULTRASTOR_MAX_CMDS_PER_LUN 5
  28 #define ULTRASTOR_MAX_CMDS 16
  29 
  30 #define ULTRASTOR_24F_PORT 0xC80
  31 
  32 
  33 #define ULTRASTOR_14F { NULL, NULL, /* Ptr for modules*/ \
  34                           NULL,                         \
  35                           "ultrastor",                  \
  36                           PROC_SCSI_ULTRASTOR,          \
  37                           "UltraStor 14F/24F/34F",      \
  38                           ultrastor_detect,             \
  39                           NULL, /* Release */           \
  40                           ultrastor_info,               \
  41                           0,                            \
  42                           ultrastor_queuecommand,       \
  43                           ultrastor_abort,              \
  44                           ultrastor_reset,              \
  45                           0,                            \
  46                           ultrastor_biosparam,          \
  47                           ULTRASTOR_MAX_CMDS,           \
  48                           0,                            \
  49                           ULTRASTOR_14F_MAX_SG,         \
  50                           ULTRASTOR_MAX_CMDS_PER_LUN,   \
  51                           0,                            \
  52                           1,                            \
  53                           ENABLE_CLUSTERING }
  54 
  55 
  56 #ifdef ULTRASTOR_PRIVATE
  57 
  58 #define UD_ABORT        0x0001
  59 #define UD_COMMAND      0x0002
  60 #define UD_DETECT       0x0004
  61 #define UD_INTERRUPT    0x0008
  62 #define UD_RESET        0x0010
  63 #define UD_MULTI_CMD    0x0020
  64 #define UD_CSIR         0x0040
  65 #define UD_ERROR        0x0080
  66 
  67 /* #define PORT_OVERRIDE 0x330 */
  68 
  69 /* Values for the PRODUCT_ID ports for the 14F */
  70 #define US14F_PRODUCT_ID_0 0x56
  71 #define US14F_PRODUCT_ID_1 0x40         /* NOTE: Only upper nibble is used */
  72 
  73 #define US24F_PRODUCT_ID_0 0x56
  74 #define US24F_PRODUCT_ID_1 0x63
  75 #define US24F_PRODUCT_ID_2 0x02
  76 
  77 /* Subversion values */
  78 #define U14F 0
  79 #define U34F 1
  80 
  81 /* MSCP field values */
  82 
  83 /* Opcode */
  84 #define OP_HOST_ADAPTER 0x1
  85 #define OP_SCSI 0x2
  86 #define OP_RESET 0x4
  87 
  88 /* Date Transfer Direction */
  89 #define DTD_SCSI 0x0
  90 #define DTD_IN 0x1
  91 #define DTD_OUT 0x2
  92 #define DTD_NONE 0x3
  93 
  94 /* Host Adapter command subcodes */
  95 #define HA_CMD_INQUIRY 0x1
  96 #define HA_CMD_SELF_DIAG 0x2
  97 #define HA_CMD_READ_BUFF 0x3
  98 #define HA_CMD_WRITE_BUFF 0x4
  99 
 100 #endif
 101 
 102 #endif

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