⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3w-xxxx.h

📁 linux和2410结合开发 用他可以生成2410所需的zImage文件
💻 H
📖 第 1 页 / 共 2 页
字号:
	} byte3;	/* Second DWORD */	unsigned char status;	unsigned char flags;	union {		unsigned short block_count;		unsigned short parameter_count;		unsigned short message_credits;	} byte6;	union {		struct {			unsigned long lba;			TW_SG_Entry sgl[TW_MAX_SGL_LENGTH];			unsigned long padding;	/* pad to 512 bytes */		} io;		struct {			TW_SG_Entry sgl[TW_MAX_SGL_LENGTH];			unsigned long padding[2];		} param;		struct {			unsigned long response_queue_pointer;			unsigned long padding[125];		} init_connection;		struct {			char version[504];		} ioctl_miniport_version;	} byte8;} TW_Command;typedef struct TAG_TW_Ioctl {#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,15)	int buffer;#endif	unsigned char opcode;	unsigned short table_id;	unsigned char parameter_id;	unsigned char parameter_size_bytes;	unsigned char unit_index;	unsigned char data[1];} TW_Ioctl;/* GetParam descriptor */typedef struct {	unsigned short	table_id;	unsigned char	parameter_id;	unsigned char	parameter_size_bytes;	unsigned char	data[1];} TW_Param, *PTW_Param;/* Response queue */typedef union TAG_TW_Response_Queue {	struct {		u32 undefined_1: 4;		u32 response_id: 8;		u32 undefined_2: 20;	} u;	u32 value;} TW_Response_Queue;typedef struct TAG_TW_Registers {	u32 base_addr;	u32 control_reg_addr;	u32 status_reg_addr;	u32 command_que_addr;	u32 response_que_addr;} TW_Registers;typedef struct TAG_TW_Info {	char *buffer;	int length;	int offset;	int position;} TW_Info;typedef int TW_Cmd_State;#define TW_S_INITIAL   0x1  /* Initial state */#define TW_S_STARTED   0x2  /* Id in use */#define TW_S_POSTED    0x4  /* Posted to the controller */#define TW_S_PENDING   0x8  /* Waiting to be posted in isr */#define TW_S_COMPLETED 0x10 /* Completed by isr */#define TW_S_FINISHED  0x20 /* I/O completely done */#define TW_START_MASK (TW_S_STARTED | TW_S_POSTED | TW_S_PENDING | TW_S_COMPLETED)/* Command header for ATA pass-thru */typedef struct TAG_TW_Passthru{	struct {		unsigned char opcode:5;		unsigned char sgloff:3;	} byte0;	unsigned char size;	unsigned char request_id;	struct {		unsigned char aport:4;		unsigned char host_id:4;	} byte3;	unsigned char status;	unsigned char flags;	unsigned short param;	unsigned short features;	unsigned short sector_count;	unsigned short sector_num;	unsigned short cylinder_lo;	unsigned short cylinder_hi;	unsigned char drive_head;	unsigned char command;	TW_SG_Entry sg_list[TW_ATA_PASS_SGL_MAX];	unsigned char padding[12];} TW_Passthru;typedef struct TAG_TW_Device_Extension {	TW_Registers		registers;	u32			*alignment_virtual_address[TW_Q_LENGTH];	u32			alignment_physical_address[TW_Q_LENGTH];	u32			*bounce_buffer[TW_Q_LENGTH];	int			is_unit_present[TW_MAX_UNITS];	int			is_raid_five[TW_MAX_UNITS];	int			num_units;	int			num_raid_five;	u32			*command_packet_virtual_address[TW_Q_LENGTH];	u32			command_packet_physical_address[TW_Q_LENGTH];	struct pci_dev		*tw_pci_dev;	Scsi_Cmnd		*srb[TW_Q_LENGTH];	unsigned char		free_queue[TW_Q_LENGTH];	unsigned char		free_head;	unsigned char		free_tail;	unsigned char           free_wrap;	unsigned char		pending_queue[TW_Q_LENGTH];	unsigned char		pending_head;	unsigned char		pending_tail;	TW_Cmd_State		state[TW_Q_LENGTH];	u32			posted_request_count;	u32			max_posted_request_count;	u32			request_count_marked_pending;	u32			pending_request_count;	u32			max_pending_request_count;	u32			max_sgl_entries;	u32			sgl_entries;	u32			num_aborts;	u32			num_resets;	u32			sector_count;	u32			max_sector_count;	u32			aen_count;	struct Scsi_Host	*host;	spinlock_t		tw_lock;	int		        ioctl_size[TW_Q_LENGTH];	unsigned short		aen_queue[TW_Q_LENGTH];	unsigned char		aen_head;	unsigned char		aen_tail;	long			flags; /* long req'd for set_bit --RR */	char			*ioctl_data[TW_Q_LENGTH];} TW_Device_Extension;/* Function prototypes */int tw_aen_complete(TW_Device_Extension *tw_dev, int request_id);int tw_aen_drain_queue(TW_Device_Extension *tw_dev);int tw_aen_read_queue(TW_Device_Extension *tw_dev, int request_id);int tw_allocate_memory(TW_Device_Extension *tw_dev, int request_id, int size, int which);int tw_check_bits(u32 status_reg_value);int tw_check_errors(TW_Device_Extension *tw_dev);void tw_clear_attention_interrupt(TW_Device_Extension *tw_dev);void tw_clear_host_interrupt(TW_Device_Extension *tw_dev);void tw_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value);void tw_decode_error(TW_Device_Extension *tw_dev, unsigned char status, unsigned char flags, unsigned char unit);void tw_disable_interrupts(TW_Device_Extension *tw_dev);int tw_empty_response_que(TW_Device_Extension *tw_dev);void tw_enable_interrupts(TW_Device_Extension *tw_dev);void tw_enable_and_clear_interrupts(TW_Device_Extension *tw_dev);int tw_findcards(Scsi_Host_Template *tw_host);void tw_free_device_extension(TW_Device_Extension *tw_dev);int tw_initconnection(TW_Device_Extension *tw_dev, int message_credits);int tw_initialize_device_extension(TW_Device_Extension *tw_dev);int tw_initialize_units(TW_Device_Extension *tw_dev);int tw_ioctl(TW_Device_Extension *tw_dev, int request_id);int tw_ioctl_complete(TW_Device_Extension *tw_dev, int request_id);void tw_mask_command_interrupt(TW_Device_Extension *tw_dev);int tw_poll_status(TW_Device_Extension *tw_dev, u32 flag, int seconds);int tw_post_command_packet(TW_Device_Extension *tw_dev, int request_id);int tw_reset_device_extension(TW_Device_Extension *tw_dev);int tw_reset_sequence(TW_Device_Extension *tw_dev);int tw_scsi_biosparam(Disk *disk, kdev_t dev, int geom[]);int tw_scsi_detect(Scsi_Host_Template *tw_host);int tw_scsi_eh_abort(Scsi_Cmnd *SCpnt);int tw_scsi_eh_reset(Scsi_Cmnd *SCpnt);int tw_scsi_proc_info(char *buffer, char **start, off_t offset, int length, int inode, int inout);int tw_scsi_queue(Scsi_Cmnd *cmd, void (*done) (Scsi_Cmnd *));int tw_scsi_release(struct Scsi_Host *tw_host);int tw_scsiop_inquiry(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_inquiry_complete(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_read_capacity(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_read_capacity_complete(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_read_write(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_request_sense(TW_Device_Extension *tw_dev, int request_id);int tw_scsiop_test_unit_ready(TW_Device_Extension *tw_dev, int request_id);int tw_setfeature(TW_Device_Extension *tw_dev, int parm, int param_size, 		  unsigned char *val);int tw_setup_irq(TW_Device_Extension *tw_dev);int tw_shutdown_device(TW_Device_Extension *tw_dev);void tw_soft_reset(TW_Device_Extension *tw_dev);int tw_state_request_finish(TW_Device_Extension *tw_dev,int request_id);int tw_state_request_start(TW_Device_Extension *tw_dev, int *request_id);void tw_unmask_command_interrupt(TW_Device_Extension *tw_dev);/* Scsi_Host_Template Initializer */#define TWXXXX {					\	next : NULL,					\	module : NULL,					\	proc_name : "3w-xxxx",				\	proc_info : tw_scsi_proc_info,			\	name : "3ware Storage Controller",		\	detect : tw_scsi_detect,			\	release : tw_scsi_release,			\	info : NULL,					\	ioctl : NULL,                  			\	command : NULL,					\	queuecommand : tw_scsi_queue,			\	eh_strategy_handler : NULL,			\	eh_abort_handler : tw_scsi_eh_abort,		\	eh_device_reset_handler : NULL,			\	eh_bus_reset_handler : NULL,			\	eh_host_reset_handler : tw_scsi_eh_reset,	\	abort : NULL,					\	reset : NULL,					\	slave_attach : NULL,				\	bios_param : tw_scsi_biosparam,			\	can_queue : TW_Q_LENGTH,			\	this_id: -1,					\	sg_tablesize : TW_MAX_SGL_LENGTH,		\	cmd_per_lun: TW_MAX_CMDS_PER_LUN,		\	present : 0,					\	unchecked_isa_dma : 0,				\	use_clustering : ENABLE_CLUSTERING,		\ 	use_new_eh_code : 1,				\	emulated : 1					\}#endif /* _3W_XXXX_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -