1/*********************************************************************** 2 * FILE NAME : DC390.H * 3 * BY : C.L. Huang * 4 * Description: Device Driver for Tekram DC-390(T) PCI SCSI * 5 * Bus Master Host Adapter * 6 ***********************************************************************/ 7/* $Id: dc390.h,v 1.1.1.1 2008/10/15 03:26:51 james26_jang Exp $ */ 8 9/* 10 * DC390/AMD 53C974 driver, header file 11 */ 12 13#ifndef DC390_H 14#define DC390_H 15 16#include <linux/version.h> 17#ifndef KERNEL_VERSION 18# define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) 19#endif 20 21#define DC390_BANNER "Tekram DC390/AM53C974" 22#define DC390_VERSION "2.0f 2000-12-20" 23 24/* We don't have eh_abort_handler, eh_device_reset_handler, 25 * eh_bus_reset_handler, eh_host_reset_handler yet! 26 * So long: Use old exception handling :-( */ 27#define OLD_EH 28 29#if LINUX_VERSION_CODE < KERNEL_VERSION (2,1,70) || defined(OLD_EH) 30# define NEW_EH 31#else 32# define NEW_EH use_new_eh_code: 1, 33# define USE_NEW_EH 34#endif 35 36#if defined(HOSTS_C) || defined(MODULE) || LINUX_VERSION_CODE > KERNEL_VERSION(2,3,99) 37 38extern int DC390_detect(Scsi_Host_Template *psht); 39extern int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)); 40extern int DC390_abort(Scsi_Cmnd *cmd); 41extern int DC390_reset(Scsi_Cmnd *cmd, unsigned int resetFlags); 42extern int DC390_bios_param(Disk *disk, kdev_t devno, int geom[]); 43 44#ifdef MODULE 45static int DC390_release(struct Scsi_Host *); 46#else 47# define DC390_release NULL 48#endif 49 50extern int DC390_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout); 51 52#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30) 53#define DC390_T { \ 54 proc_name: "tmscsim", \ 55 proc_info: DC390_proc_info, \ 56 name: DC390_BANNER " V" DC390_VERSION, \ 57 detect: DC390_detect, \ 58 release: DC390_release, \ 59 queuecommand: DC390_queue_command, \ 60 abort: DC390_abort, \ 61 reset: DC390_reset, \ 62 bios_param: DC390_bios_param, \ 63 can_queue: 42, \ 64 this_id: 7, \ 65 sg_tablesize: SG_ALL, \ 66 cmd_per_lun: 16, \ 67 NEW_EH \ 68 unchecked_isa_dma: 0, \ 69 use_clustering: DISABLE_CLUSTERING \ 70 } 71#else 72extern struct proc_dir_entry DC390_proc_scsi_tmscsim; 73#define DC390_T { \ 74 proc_dir: &DC390_proc_scsi_tmscsim, \ 75 proc_info: DC390_proc_info, \ 76 name: DC390_BANNER " V" DC390_VERSION, \ 77 detect: DC390_detect, \ 78 release: DC390_release, \ 79 queuecommand: DC390_queue_command, \ 80 abort: DC390_abort, \ 81 reset: DC390_reset, \ 82 bios_param: DC390_bios_param, \ 83 can_queue: 42, \ 84 this_id: 7, \ 85 sg_tablesize: SG_ALL, \ 86 cmd_per_lun: 16, \ 87 NEW_EH \ 88 unchecked_isa_dma: 0, \ 89 use_clustering: DISABLE_CLUSTERING \ 90 } 91#endif 92#endif /* defined(HOSTS_C) || defined(MODULE) */ 93 94#endif /* DC390_H */ 95