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
9 * (Unix and Linux consulting and custom programming)
13 * The AM53C974_nobios_detect code was originally developed by
14 * Robin Cutshaw (robin@xfree86.org) and is used here in a
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 $
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 static int AM53C974_pci_detect(Scsi_Host_Template
* tpnt
);
54 static int AM53C974_release(struct Scsi_Host
*shp
);
55 static const char *AM53C974_info(struct Scsi_Host
*);
56 static int AM53C974_command(Scsi_Cmnd
* SCpnt
);
57 static int AM53C974_queue_command(Scsi_Cmnd
* cmd
, void (*done
) (Scsi_Cmnd
*));
58 static int AM53C974_abort(Scsi_Cmnd
* cmd
);
59 static int AM53C974_reset(Scsi_Cmnd
* cmd
, unsigned int);
61 #endif /* AM53C974_H */