1
2
3
4
5
6
7
8
9
10 #ifndef _ULTRASTOR_H
11 #define _ULTRASTOR_H
12
13
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
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
47
48
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
59 #define US14F_PRODUCT_ID_0 0x56
60 #define US14F_PRODUCT_ID_1 0x40
61
62
63 #define U14F 0
64 #define U34F 1
65
66
67
68
69 #define OP_HOST_ADAPTER 0x1
70 #define OP_SCSI 0x2
71 #define OP_RESET 0x4
72
73
74 #define DTD_SCSI 0x0
75 #define DTD_IN 0x1
76 #define DTD_OUT 0x2
77 #define DTD_NONE 0x3
78
79
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