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(int);
  17 const char *ultrastor_info(void);
  18 int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  19 int ultrastor_abort(Scsi_Cmnd *, int);
  20 int ultrastor_reset(Scsi_Cmnd *);
  21 int ultrastor_biosparam(int, int, int *);
  22 
  23 #define ULTRASTOR_14F_MAX_SG 16
  24 #define ULTRASTOR_MAX_CMDS_PER_LUN 5
  25 #define ULTRASTOR_MAX_CMDS 16
  26 
  27 #define ULTRASTOR_24F_PORT 0xC80
  28 
  29 
  30 #define ULTRASTOR_14F \
  31     { "UltraStor 14F/24F/34F", ultrastor_detect, ultrastor_info, 0, \
  32       ultrastor_queuecommand, ultrastor_abort, ultrastor_reset, \
  33       0, ultrastor_biosparam, ULTRASTOR_MAX_CMDS, 0, \
  34       ULTRASTOR_14F_MAX_SG, ULTRASTOR_MAX_CMDS_PER_LUN, 0, 1 }
  35 
  36 
  37 #ifdef ULTRASTOR_PRIVATE
  38 
  39 #define UD_ABORT        0x0001
  40 #define UD_COMMAND      0x0002
  41 #define UD_DETECT       0x0004
  42 #define UD_INTERRUPT    0x0008
  43 #define UD_RESET        0x0010
  44 #define UD_MULTI_CMD    0x0020
  45 #define UD_CSIR         0x0040
  46 #define UD_ERROR        0x0080
  47 
  48 /* #define PORT_OVERRIDE 0x330 */
  49 
  50 /* Values for the PRODUCT_ID ports for the 14F */
  51 #define US14F_PRODUCT_ID_0 0x56
  52 #define US14F_PRODUCT_ID_1 0x40         /* NOTE: Only upper nibble is used */
  53 
  54 #define US24F_PRODUCT_ID_0 0x56
  55 #define US24F_PRODUCT_ID_1 0x63
  56 #define US24F_PRODUCT_ID_2 0x02
  57 
  58 /* Subversion values */
  59 #define U14F 0
  60 #define U34F 1
  61 
  62 /* MSCP field values */
  63 
  64 /* Opcode */
  65 #define OP_HOST_ADAPTER 0x1
  66 #define OP_SCSI 0x2
  67 #define OP_RESET 0x4
  68 
  69 /* Date Transfer Direction */
  70 #define DTD_SCSI 0x0
  71 #define DTD_IN 0x1
  72 #define DTD_OUT 0x2
  73 #define DTD_NONE 0x3
  74 
  75 /* Host Adapter command subcodes */
  76 #define HA_CMD_INQUIRY 0x1
  77 #define HA_CMD_SELF_DIAG 0x2
  78 #define HA_CMD_READ_BUFF 0x3
  79 #define HA_CMD_WRITE_BUFF 0x4
  80 
  81 #endif
  82 
  83 #endif

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