1 /* AM53/79C974 (PCscsi) driver release 0.5 2 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 12 * 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. 16 * 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 21 */ 22 23 /* 24 * $Log: AM53C974.h,v $ 25 */ 26 27 #ifndef AM53C974_H 28 #define AM53C974_H 29 30 #include <scsi/scsicam.h> 31 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 */ 51 }; 52 53 #define AM53C974 { \ 54 proc_name: "am53c974", \ 55 name: "AM53C974", \ 56 detect: AM53C974_pci_detect, \ 57 release: AM53C974_release, \ 58 info: AM53C974_info, \ 59 command: AM53C974_command, \ 60 queuecommand: AM53C974_queue_command, \ 61 abort: AM53C974_abort, \ 62 reset: AM53C974_reset, \ 63 bios_param: scsicam_bios_param, \ 64 can_queue: 12, \ 65 this_id: -1, \ 66 sg_tablesize: SG_ALL, \ 67 cmd_per_lun: 1, \ 68 use_clustering: DISABLE_CLUSTERING \ 69 } 70 71 static int AM53C974_pci_detect(Scsi_Host_Template * tpnt); 72 static int AM53C974_release(struct Scsi_Host *shp); 73 static const char *AM53C974_info(struct Scsi_Host *); 74 static int AM53C974_command(Scsi_Cmnd * SCpnt); 75 static int AM53C974_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)); 76 static int AM53C974_abort(Scsi_Cmnd * cmd); 77 static int AM53C974_reset(Scsi_Cmnd * cmd, unsigned int); 78 79 #endif /* AM53C974_H */ 80