Import 2.3.18pre1
[davej-history.git] / drivers / scsi / AM53C974.h
blob41aa5e7a17b0659a2e1ed4ca9647cb8e36d903ad
1 /* AM53/79C974 (PCscsi) driver release 0.5
3 * The architecture and much of the code of this device
4 * driver was originally developed by Drew Eckhardt for
5 * the NCR5380. The following copyrights apply:
6 * For the architecture and all parts similar to the NCR5380:
7 * Copyright 1993, Drew Eckhardt
8 * Visionary Computing
9 * (Unix and Linux consulting and custom programming)
10 * drew@colorado.edu
11 * +1 (303) 666-5836
13 * The AM53C974_nobios_detect code was originally developed by
14 * Robin Cutshaw (robin@xfree86.org) and is used here in a
15 * modified form.
17 * For the other parts:
18 * Copyright 1994, D. Frieauff
19 * EMail: fri@rsx42sun0.dofn.de
20 * Phone: x49-7545-8-2256 , x49-7541-42305
24 * $Log: AM53C974.h,v $
27 #ifndef AM53C974_H
28 #define AM53C974_H
30 #include <scsi/scsicam.h>
32 struct AM53C974_hostdata {
33 volatile unsigned in_reset:1; /* flag, says bus reset pending */
34 volatile unsigned aborted:1; /* flag, says aborted */
35 volatile unsigned selecting:1; /* selection started, but not yet finished */
36 volatile unsigned disconnecting: 1; /* disconnection started, but not yet finished */
37 volatile unsigned dma_busy:1; /* dma busy when service request for info transfer received */
38 volatile unsigned char msgout[10]; /* message to output in MSGOUT_PHASE */
39 volatile unsigned char last_message[10]; /* last message OUT */
40 volatile Scsi_Cmnd *issue_queue; /* waiting to be issued */
41 volatile Scsi_Cmnd *disconnected_queue; /* waiting for reconnect */
42 volatile Scsi_Cmnd *sel_cmd; /* command for selection */
43 volatile Scsi_Cmnd *connected; /* currently connected command */
44 volatile unsigned char busy[8]; /* index = target, bit = lun */
45 unsigned char sync_per[8]; /* synchronous transfer period (in effect) */
46 unsigned char sync_off[8]; /* synchronous offset (in effect) */
47 unsigned char sync_neg[8]; /* sync. negotiation performed (in effect) */
48 unsigned char sync_en[8]; /* sync. negotiation performed (in effect) */
49 unsigned char max_rate[8]; /* max. transfer rate (setup) */
50 unsigned char max_offset[8]; /* max. sync. offset (setup), only valid if corresponding sync_en is nonzero */
53 extern struct proc_dir_entry proc_scsi_am53c974;
55 #define AM53C974 { \
56 proc_dir: &proc_scsi_am53c974, \
57 name: "AM53C974", \
58 detect: AM53C974_detect, \
59 release: AM53C974_release, \
60 info: AM53C974_info, \
61 command: AM53C974_command, \
62 queuecommand: AM53C974_queue_command, \
63 abort: AM53C974_abort, \
64 reset: AM53C974_reset, \
65 bios_param: scsicam_bios_param, \
66 can_queue: 12, \
67 this_id: -1, \
68 sg_tablesize: SG_ALL, \
69 cmd_per_lun: 1, \
70 use_clustering: DISABLE_CLUSTERING \
73 void AM53C974_setup(char *str, int *ints);
74 int AM53C974_detect(Scsi_Host_Template * tpnt);
75 int AM53C974_release(struct Scsi_Host *shp);
76 int AM53C974_biosparm(Disk * disk, int dev, int *info_array);
77 const char *AM53C974_info(struct Scsi_Host *);
78 int AM53C974_command(Scsi_Cmnd * SCpnt);
79 int AM53C974_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
80 int AM53C974_abort(Scsi_Cmnd * cmd);
81 int AM53C974_reset(Scsi_Cmnd * cmd, unsigned int);
83 #endif /* AM53C974_H */