1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
#ifndef _ATP870U_H
/* $Id: atp870u.h,v 1.0 1997/05/07 15:09:00 root Exp root $
*
* Header file for the ACARD 870U/W driver for Linux
*
* $Log: atp870u.h,v $
* Revision 1.0 1997/05/07 15:09:00 root
* Initial revision
*
*/
#include <linux/types.h>
#include <linux/kdev_t.h>
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
#endif
/* I/O Port */
#define MAX_CDB 12
#define MAX_SENSE 14
int atp870u_detect(Scsi_Host_Template *);
int atp870u_command(Scsi_Cmnd *);
int atp870u_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int atp870u_abort(Scsi_Cmnd *);
int atp870u_reset(Scsi_Cmnd *, unsigned int);
int atp870u_biosparam(Disk *, kdev_t, int*);
int atp870u_release(struct Scsi_Host *);
void send_s870(unsigned char);
#define qcnt 32
#define ATP870U_SCATTER 128
#define ATP870U_CMDLUN 1
#ifndef NULL
#define NULL 0
#endif
extern struct proc_dir_entry proc_scsi_atp870u;
extern const char *atp870u_info(struct Scsi_Host *);
extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,65)
#define ATP870U { \
next: NULL, \
module: NULL, \
proc_dir: &proc_scsi_atp870u,/* proc_dir_entry */ \
proc_info: atp870u_proc_info, \
name: NULL, \
detect: atp870u_detect, \
release: atp870u_release, \
info: atp870u_info, \
command: atp870u_command, \
queuecommand: atp870u_queuecommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: atp870u_abort, \
reset: atp870u_reset, \
slave_attach: NULL, \
bios_param: atp870u_biosparam, \
can_queue: qcnt, /* max simultaneous cmds */\
this_id: 7, /* scsi id of host adapter */\
sg_tablesize: ATP870U_SCATTER, /* max scatter-gather cmds */\
cmd_per_lun: ATP870U_CMDLUN, /* cmds per lun (linked cmds) */\
present: 0, /* number of 7xxx's present */\
unchecked_isa_dma: 0, /* no memory DMA restrictions */\
use_clustering: ENABLE_CLUSTERING, \
use_new_eh_code: 0 \
}
#else
#define ATP870U { NULL, NULL, \
&proc_scsi_atp870u,/* proc_dir_entry */ \
atp870u_proc_info, \
NULL, \
atp870u_detect, \
NULL, \
atp870u_info, \
atp870u_command, \
atp870u_queuecommand, \
atp870u_abort, \
atp870u_reset, \
NULL, \
atp870u_biosparam, \
qcnt, \
7, \
ATP870U_SCATTER, \
ATP870U_CMDLUN, \
0, \
0, \
ENABLE_CLUSTERING}
#endif
#endif
|