]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 | * ([email protected]) | |
6 | * scatter/gather added by Scott Taylor ([email protected]) | |
7 | * 24F support by John F. Carr ([email protected]) | |
8 | * John's work modified by Caleb Epstein ([email protected]) and | |
9 | * Eric Youngdale ([email protected]). | |
10 | * Thanks to UltraStor for providing the necessary documentation | |
11 | */ | |
12 | ||
13 | #ifndef _ULTRASTOR_H | |
14 | #define _ULTRASTOR_H | |
15 | ||
d0be4a7d | 16 | static int ultrastor_detect(struct scsi_host_template *); |
b4620233 | 17 | static const char *ultrastor_info(struct Scsi_Host *shpnt); |
f281233d | 18 | static int ultrastor_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); |
b4620233 HK |
19 | static int ultrastor_abort(struct scsi_cmnd *); |
20 | static int ultrastor_host_reset(struct scsi_cmnd *); | |
21 | static int ultrastor_biosparam(struct scsi_device *, struct block_device *, | |
22 | sector_t, int *); | |
1da177e4 LT |
23 | |
24 | ||
25 | #define ULTRASTOR_14F_MAX_SG 16 | |
26 | #define ULTRASTOR_24F_MAX_SG 33 | |
27 | ||
28 | #define ULTRASTOR_MAX_CMDS_PER_LUN 5 | |
29 | #define ULTRASTOR_MAX_CMDS 16 | |
30 | ||
31 | #define ULTRASTOR_24F_PORT 0xC80 | |
32 | ||
33 | ||
34 | #ifdef ULTRASTOR_PRIVATE | |
35 | ||
36 | #define UD_ABORT 0x0001 | |
37 | #define UD_COMMAND 0x0002 | |
38 | #define UD_DETECT 0x0004 | |
39 | #define UD_INTERRUPT 0x0008 | |
40 | #define UD_RESET 0x0010 | |
41 | #define UD_MULTI_CMD 0x0020 | |
42 | #define UD_CSIR 0x0040 | |
43 | #define UD_ERROR 0x0080 | |
44 | ||
45 | /* #define PORT_OVERRIDE 0x330 */ | |
46 | ||
47 | /* Values for the PRODUCT_ID ports for the 14F */ | |
48 | #define US14F_PRODUCT_ID_0 0x56 | |
49 | #define US14F_PRODUCT_ID_1 0x40 /* NOTE: Only upper nibble is used */ | |
50 | ||
51 | #define US24F_PRODUCT_ID_0 0x56 | |
52 | #define US24F_PRODUCT_ID_1 0x63 | |
53 | #define US24F_PRODUCT_ID_2 0x02 | |
54 | ||
55 | /* Subversion values */ | |
56 | #define U14F 0 | |
57 | #define U34F 1 | |
58 | ||
59 | /* MSCP field values */ | |
60 | ||
61 | /* Opcode */ | |
62 | #define OP_HOST_ADAPTER 0x1 | |
63 | #define OP_SCSI 0x2 | |
64 | #define OP_RESET 0x4 | |
65 | ||
66 | /* Date Transfer Direction */ | |
67 | #define DTD_SCSI 0x0 | |
68 | #define DTD_IN 0x1 | |
69 | #define DTD_OUT 0x2 | |
70 | #define DTD_NONE 0x3 | |
71 | ||
72 | /* Host Adapter command subcodes */ | |
73 | #define HA_CMD_INQUIRY 0x1 | |
74 | #define HA_CMD_SELF_DIAG 0x2 | |
75 | #define HA_CMD_READ_BUFF 0x3 | |
76 | #define HA_CMD_WRITE_BUFF 0x4 | |
77 | ||
78 | #endif | |
79 | ||
80 | #endif |