root/kernel/blk_drv/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  *      Thanks to UltraStor for providing the necessary documentation
   8  */
   9 
  10 #ifndef _ULTRASTOR_H
  11 #define _ULTRASTOR_H
  12 
  13 /* ??? These don't really belong here */
  14 #ifndef TRUE
  15 # define TRUE 1
  16 #endif
  17 #ifndef FALSE
  18 # define FALSE 0
  19 #endif
  20 
  21 int ultrastor_detect(int);
  22 const char *ultrastor_info(void);
  23 int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  24 int ultrastor_abort(Scsi_Cmnd *, int);
  25 int ultrastor_reset(void);
  26 int ultrastor_biosparam(int, int, int *);
  27 
  28 #define ULTRASTOR_14F_MAX_CMDS 1 /*???*/
  29 #define ULTRASTOR_14F_MAX_SG 16  /* Should be 32, but 32 doesn't work */
  30 #define ULTRASTOR_14F_MAX_CMDS_PER_LUN 1 /*???*/
  31 
  32 #define ULTRASTOR_14F \
  33     { "UltraStor 14F", ultrastor_detect, ultrastor_info, 0, \
  34       ultrastor_queuecommand, ultrastor_abort, ultrastor_reset, \
  35       0, ultrastor_biosparam, ULTRASTOR_14F_MAX_CMDS, 0, \
  36       ULTRASTOR_14F_MAX_SG, ULTRASTOR_14F_MAX_CMDS_PER_LUN, 0, 0 }
  37 
  38 #ifdef ULTRASTOR_PRIVATE
  39 
  40 #define UD_ABORT 0x0001
  41 #define UD_COMMAND 0x0002
  42 #define UD_DETECT 0x0004
  43 #define UD_INTERRUPT 0x0008
  44 #define UD_RESET 0x0010
  45 
  46 /* #define PORT_OVERRIDE 0x330 */
  47 
  48 /* Port addresses (relative to the base address) */
  49 #define LCL_DOORBELL_MASK(port) ((port) + 0x0)
  50 #define LCL_DOORBELL_INTR(port) ((port) + 0x1)
  51 #define SYS_DOORBELL_MASK(port) ((port) + 0x2)
  52 #define SYS_DOORBELL_INTR(port) ((port) + 0x3)
  53 #define PRODUCT_ID(port) ((port) + 0x4)
  54 #define CONFIG(port) ((port) + 0x6)
  55 #define OGM_DATA_PTR(port) ((port) + 0x8)
  56 #define ICM_DATA_PTR(port) ((port) + 0xC)
  57 
  58 /* Values for the PRODUCT_ID ports for the 14F */
  59 #define US14F_PRODUCT_ID_0 0x56
  60 #define US14F_PRODUCT_ID_1 0x40         /* NOTE: Only upper nibble is used */
  61 
  62 /* Subversion values */
  63 #define U14F 0
  64 #define U34F 1
  65 
  66 /* MSCP field values */
  67 
  68 /* Opcode */
  69 #define OP_HOST_ADAPTER 0x1
  70 #define OP_SCSI 0x2
  71 #define OP_RESET 0x4
  72 
  73 /* Date Transfer Direction */
  74 #define DTD_SCSI 0x0
  75 #define DTD_IN 0x1
  76 #define DTD_OUT 0x2
  77 #define DTD_NONE 0x3
  78 
  79 /* Host Adapter command subcodes */
  80 #define HA_CMD_INQUIRY 0x1
  81 #define HA_CMD_SELF_DIAG 0x2
  82 #define HA_CMD_READ_BUFF 0x3
  83 #define HA_CMD_WRITE_BUFF 0x4
  84 
  85 #endif
  86 
  87 #endif

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