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
15 #include <linux/kdev_t.h>
17 int ultrastor_detect(Scsi_Host_Template
*);
18 const char *ultrastor_info(struct Scsi_Host
* shpnt
);
19 int ultrastor_queuecommand(Scsi_Cmnd
*, void (*done
)(Scsi_Cmnd
*));
20 int ultrastor_abort(Scsi_Cmnd
*);
21 int ultrastor_reset(Scsi_Cmnd
*, unsigned int);
22 int ultrastor_biosparam(Disk
*, kdev_t
, int *);
25 #define ULTRASTOR_14F_MAX_SG 16
26 #define ULTRASTOR_24F_MAX_SG 33
28 #define ULTRASTOR_MAX_CMDS_PER_LUN 5
29 #define ULTRASTOR_MAX_CMDS 16
31 #define ULTRASTOR_24F_PORT 0xC80
34 #define ULTRASTOR_14F { name: "UltraStor 14F/24F/34F", \
35 detect: ultrastor_detect, \
36 info: ultrastor_info, \
37 queuecommand: ultrastor_queuecommand, \
38 abort: ultrastor_abort, \
39 reset: ultrastor_reset, \
40 bios_param: ultrastor_biosparam, \
41 can_queue: ULTRASTOR_MAX_CMDS, \
43 sg_tablesize: ULTRASTOR_14F_MAX_SG, \
44 cmd_per_lun: ULTRASTOR_MAX_CMDS_PER_LUN,\
45 unchecked_isa_dma: 1, \
46 use_clustering: ENABLE_CLUSTERING }
49 #ifdef ULTRASTOR_PRIVATE
51 #define UD_ABORT 0x0001
52 #define UD_COMMAND 0x0002
53 #define UD_DETECT 0x0004
54 #define UD_INTERRUPT 0x0008
55 #define UD_RESET 0x0010
56 #define UD_MULTI_CMD 0x0020
57 #define UD_CSIR 0x0040
58 #define UD_ERROR 0x0080
60 /* #define PORT_OVERRIDE 0x330 */
62 /* Values for the PRODUCT_ID ports for the 14F */
63 #define US14F_PRODUCT_ID_0 0x56
64 #define US14F_PRODUCT_ID_1 0x40 /* NOTE: Only upper nibble is used */
66 #define US24F_PRODUCT_ID_0 0x56
67 #define US24F_PRODUCT_ID_1 0x63
68 #define US24F_PRODUCT_ID_2 0x02
70 /* Subversion values */
74 /* MSCP field values */
77 #define OP_HOST_ADAPTER 0x1
81 /* Date Transfer Direction */
87 /* Host Adapter command subcodes */
88 #define HA_CMD_INQUIRY 0x1
89 #define HA_CMD_SELF_DIAG 0x2
90 #define HA_CMD_READ_BUFF 0x3
91 #define HA_CMD_WRITE_BUFF 0x4