📄 gdth.h
字号:
unchar control0; /* control0 register(unused) */ unchar control1; /* board interrupts enable */ unchar unused6[0x16];} gdt6c_plx_regs;/* DPRAM new PCI controllers */typedef struct { union { gdt_dpr_if ic; /* interface area */ unchar if_area[0x4000-sizeof(gdt_pci_sram)]; } u; gdt_pci_sram gdt6sr; /* SRAM structure */} gdt6c_dpram_str;/* i960 register structure (PCI MPR controllers) */typedef struct { unchar unused1[16]; unchar volatile sema0_reg; /* command semaphore */ unchar unused2; unchar volatile sema1_reg; /* status semaphore */ unchar unused3; ushort volatile status; /* command status */ ushort service; /* service */ ulong info[2]; /* additional info */ unchar ldoor_reg; /* PCI to local doorbell */ unchar unused4[11]; unchar volatile edoor_reg; /* local to PCI doorbell */ unchar unused5[7]; unchar edoor_en_reg; /* board interrupts enable */ unchar unused6[27]; ulong unused7[1004]; /* size: 4 KB */} gdt6m_i960_regs;/* DPRAM PCI MPR controllers */typedef struct { gdt6m_i960_regs i960r; /* 4KB i960 registers */ union { gdt_dpr_if ic; /* interface area */ unchar if_area[0x3000-sizeof(gdt_pci_sram)]; } u; gdt_pci_sram gdt6sr; /* SRAM structure */} gdt6m_dpram_str;/* PCI resources */typedef struct { ushort device_id; /* device ID (0,..,9) */ unchar bus; /* PCI bus */ unchar device_fn; /* PCI device/function no. */ ulong dpmem; /* DPRAM address */ ulong io; /* IO address */ ulong io_mm; /* IO address mem. mapped */ ulong bios; /* BIOS address */ unchar irq; /* IRQ */} gdth_pci_str;/* controller information structure */typedef struct { unchar bus_cnt; /* SCSI bus count */ unchar type; /* controller class */ ushort raw_feat; /* feat. raw service (s/g,..) */ ulong stype; /* controller subtype */ ushort cache_feat; /* feat. cache serv. (s/g,..) */ ushort bmic; /* BMIC address (EISA) */ void *brd; /* DPRAM address */ ulong brd_phys; /* slot number/BIOS address */ gdt6c_plx_regs *plx; /* PLX regs (new PCI contr.) */ gdth_cmd_str *pccb; /* address command structure */ gdth_scratch_str *pscratch; unchar irq; /* IRQ */ unchar drq; /* DRQ (ISA controllers) */ ushort status; /* command status */ ulong info; ulong info2; /* additional info */ Scsi_Cmnd *req_first; /* top of request queue */ struct { unchar type; /* device type */ unchar heads; /* mapping */ unchar secs; unchar lock; /* drive locked ? (hot plug) */ ushort hostdrive; /* host drive number */ ushort devtype; /* further information */ ulong size; /* capacity */ } id[MAXBUS][MAXID]; ushort cmd_cnt; /* command count in DPRAM */ ushort cmd_len; /* length of actual command */ ushort cmd_offs_dpmem; /* actual offset in DPRAM */ ushort ic_all_size; /* sizeof DPRAM interf. area */ unchar reserved; unchar mode; /* information from /proc */ ushort param_size; gdth_cpar_str cpar; /* controller cache par. */ char ctr_name[16]; /* controller name */} gdth_ha_str;/* structure for scsi_register(), SCSI bus != 0 */typedef struct { ushort hanum; ushort busnum;} gdth_num_str;/* structure for scsi_register() */typedef struct { gdth_num_str numext; /* must be the first element */ gdth_ha_str haext; gdth_cmd_str cmdext; gdth_scratch_str dmaext;} gdth_ext_str;/* INQUIRY data format */typedef struct { unchar type_qual; unchar modif_rmb; unchar version; unchar resp_aenc; unchar add_length; unchar reserved1; unchar reserved2; unchar misc; unchar vendor[8]; unchar product[16]; unchar revision[4];} gdth_inq_data;/* READ_CAPACITY data format */typedef struct { ulong last_block_no; ulong block_length;} gdth_rdcap_data;/* REQUEST_SENSE data format */typedef struct { unchar errorcode; unchar segno; unchar key; ulong info; unchar add_length; ulong cmd_info; unchar adsc; unchar adsq; unchar fruc; unchar key_spec[3];} gdth_sense_data;/* MODE_SENSE data format */typedef struct { struct { unchar data_length; unchar med_type; unchar dev_par; unchar bd_length; } hd; struct { unchar dens_code; unchar block_count[3]; unchar reserved; unchar block_length[3]; } bd;} gdth_modep_data;/* stack frame */typedef struct { ulong b[10]; /* 32 bit compiler ! */} gdth_stackframe;#pragma pack()/* data structure for reserve drives */typedef struct { unchar hanum; unchar bus; unchar id;} gdth_reserve_str;/* function prototyping */int gdth_detect(Scsi_Host_Template *);int gdth_release(struct Scsi_Host *);int gdth_command(Scsi_Cmnd *);int gdth_queuecommand(Scsi_Cmnd *,void (*done)(Scsi_Cmnd *));int gdth_abort(Scsi_Cmnd *);#if LINUX_VERSION_CODE >= 0x010346int gdth_reset(Scsi_Cmnd *, unsigned int reset_flags);#elseint gdth_reset(Scsi_Cmnd *);#endifconst char *gdth_info(struct Scsi_Host *);#if LINUX_VERSION_CODE >= 0x02015Fint gdth_bios_param(Disk *,kdev_t,int *);extern struct proc_dir_entry proc_scsi_gdth;int gdth_proc_info(char *,char **,off_t,int,int,int);int gdth_eh_abort(Scsi_Cmnd *scp);int gdth_eh_device_reset(Scsi_Cmnd *scp);int gdth_eh_bus_reset(Scsi_Cmnd *scp);int gdth_eh_host_reset(Scsi_Cmnd *scp);#define GDTH { proc_dir: &proc_scsi_gdth, \ proc_info: gdth_proc_info, \ name: "GDT SCSI Disk Array Controller",\ detect: gdth_detect, \ release: gdth_release, \ info: gdth_info, \ command: gdth_command, \ queuecommand: gdth_queuecommand, \ eh_abort_handler: gdth_eh_abort, \ eh_device_reset_handler: gdth_eh_device_reset, \ eh_bus_reset_handler: gdth_eh_bus_reset, \ eh_host_reset_handler: gdth_eh_host_reset, \ abort: gdth_abort, \ reset: gdth_reset, \ bios_param: gdth_bios_param, \ can_queue: GDTH_MAXCMDS, \ this_id: -1, \ sg_tablesize: GDTH_MAXSG, \ cmd_per_lun: GDTH_MAXC_P_L, \ present: 0, \ unchecked_isa_dma: 1, \ use_clustering: ENABLE_CLUSTERING, \ use_new_eh_code: 1 /* use new error code */ } #elif LINUX_VERSION_CODE >= 0x010300int gdth_bios_param(Disk *,kdev_t,int *);extern struct proc_dir_entry proc_scsi_gdth;int gdth_proc_info(char *,char **,off_t,int,int,int);#define GDTH { NULL, NULL, \ &proc_scsi_gdth, \ gdth_proc_info, \ "GDT SCSI Disk Array Controller", \ gdth_detect, \ gdth_release, \ gdth_info, \ gdth_command, \ gdth_queuecommand, \ gdth_abort, \ gdth_reset, \ NULL, \ gdth_bios_param, \ GDTH_MAXCMDS, \ -1, \ GDTH_MAXSG, \ GDTH_MAXC_P_L, \ 0, \ 1, \ ENABLE_CLUSTERING}#elseint gdth_bios_param(Disk *,int,int *);#define GDTH { NULL, NULL, \ "GDT SCSI Disk Array Controller", \ gdth_detect, \ gdth_release, \ gdth_info, \ gdth_command, \ gdth_queuecommand, \ gdth_abort, \ gdth_reset, \ NULL, \ gdth_bios_param, \ GDTH_MAXCMDS, \ -1, \ GDTH_MAXSG, \ GDTH_MAXC_P_L, \ 0, \ 1, \ ENABLE_CLUSTERING}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -