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

📄 aacraid.h

📁 linux和2410结合开发 用他可以生成2410所需的zImage文件
💻 H
📖 第 1 页 / 共 3 页
字号:
#define dprintk(x)#define AAC_NUM_FIB	128#define AAC_NUM_IO_FIB	116/*------------------------------------------------------------------------------ *              D E F I N E S *----------------------------------------------------------------------------*/struct diskparm{	int heads;	int sectors;	int cylinders;};/* *	DON'T CHANGE THE ORDER, this is set by the firmware */ #define		CT_NONE			0#define		CT_VOLUME		1#define		CT_MIRROR		2#define		CT_STRIPE		3#define		CT_RAID5		4#define		CT_SSRW			5#define		CT_SSRO			6#define		CT_MORPH		7#define		CT_PASSTHRU		8#define		CT_RAID4		9#define		CT_RAID10		10	/* stripe of mirror */#define		CT_RAID00		11	/* stripe of stripe */#define		CT_VOLUME_OF_MIRRORS	12	/* volume of mirror */#define		CT_PSEUDO_RAID		13	/* really raid4 */#define		CT_LAST_VOLUME_TYPE	14/* *	Types of objects addressable in some fashion by the client. *	This is a superset of those objects handled just by the filesystem *	and includes "raw" objects that an administrator would use to *	configure containers and filesystems. */#define		FT_REG		1	/* regular file */#define		FT_DIR		2	/* directory */#define		FT_BLK		3	/* "block" device - reserved */#define		FT_CHR		4	/* "character special" device - reserved */#define		FT_LNK		5	/* symbolic link */#define		FT_SOCK		6	/* socket */#define		FT_FIFO		7	/* fifo */#define		FT_FILESYS	8	/* ADAPTEC's "FSA"(tm) filesystem */#define		FT_DRIVE	9	/* physical disk - addressable in scsi by bus/target/lun */#define		FT_SLICE	10	/* virtual disk - raw volume - slice */#define		FT_PARTITION	11	/* FSA partition - carved out of a slice - building block for containers */#define		FT_VOLUME	12	/* Container - Volume Set */#define		FT_STRIPE	13	/* Container - Stripe Set */#define		FT_MIRROR	14	/* Container - Mirror Set */#define		FT_RAID5	15	/* Container - Raid 5 Set */#define		FT_DATABASE	16	/* Storage object with "foreign" content manager *//* *	Host side memory scatter gather list *	Used by the adapter for read, write, and readdirplus operations */struct sgentry {	u32	addr;	/* 32-bit Base address. */	u32	count;	/* Length. */};/* *	SGMAP * *	This is the SGMAP structure for all commands that use *	32-bit addressing. * *	Note that the upper 16 bits of SgCount are used as flags. *	Only the lower 16 bits of SgCount are actually used as the *	SG element count. */struct sgmap {	u32		count;	struct sgentry	sg[1];};struct creation_info{	u8 		buildnum;		/* e.g., 588 */	u8 		usec;			/* e.g., 588 */	u8	 	via;			/* e.g., 1 = FSU,						 * 	 2 = API						 */	u8	 	year;		 	/* e.g., 1997 = 97 */	u32		date;			/*						 * unsigned 	Month		:4;	// 1 - 12						 * unsigned 	Day		:6;	// 1 - 32						 * unsigned 	Hour		:6;	// 0 - 23						 * unsigned 	Minute		:6;	// 0 - 60						 * unsigned 	Second		:6;	// 0 - 60						 */	u64		serial;			/* e.g., 0x1DEADB0BFAFAF001 */};/* *	Define all the constants needed for the communication interface *//* *	Define how many queue entries each queue will have and the total *	number of entries for the entire communication interface. Also define *	how many queues we support. * *	This has to match the controller */#define NUMBER_OF_COMM_QUEUES  8   // 4 command; 4 response#define HOST_HIGH_CMD_ENTRIES  4#define HOST_NORM_CMD_ENTRIES  8#define ADAP_HIGH_CMD_ENTRIES  4#define ADAP_NORM_CMD_ENTRIES  512#define HOST_HIGH_RESP_ENTRIES 4#define HOST_NORM_RESP_ENTRIES 512#define ADAP_HIGH_RESP_ENTRIES 4#define ADAP_NORM_RESP_ENTRIES 8#define TOTAL_QUEUE_ENTRIES  \    (HOST_NORM_CMD_ENTRIES + HOST_HIGH_CMD_ENTRIES + ADAP_NORM_CMD_ENTRIES + ADAP_HIGH_CMD_ENTRIES + \	    HOST_NORM_RESP_ENTRIES + HOST_HIGH_RESP_ENTRIES + ADAP_NORM_RESP_ENTRIES + ADAP_HIGH_RESP_ENTRIES)/* *	Set the queues on a 16 byte alignment */ #define QUEUE_ALIGNMENT		16/* *	The queue headers define the Communication Region queues. These *	are physically contiguous and accessible by both the adapter and the *	host. Even though all queue headers are in the same contiguous block *	they will be represented as individual units in the data structures. */struct aac_entry {	u32 size;       /* Size in bytes of the Fib which this QE points to */	u32 addr;	/* Receiver addressable address of the FIB (low 32 address bits) */};/* *	The adapter assumes the ProducerIndex and ConsumerIndex are grouped *	adjacently and in that order. */ struct aac_qhdr {	u64 header_addr;		/* Address to hand the adapter to access to this queue head */	u32 *producer;			/* The producer index for this queue (host address) */	u32 *consumer;			/* The consumer index for this queue (host address) */};/* *	Define all the events which the adapter would like to notify *	the host of. */ #define		HostNormCmdQue		1	/* Change in host normal priority command queue */#define		HostHighCmdQue		2	/* Change in host high priority command queue */#define		HostNormRespQue		3	/* Change in host normal priority response queue */#define		HostHighRespQue		4	/* Change in host high priority response queue */#define		AdapNormRespNotFull	5#define		AdapHighRespNotFull	6#define		AdapNormCmdNotFull	7#define		AdapHighCmdNotFull	8#define		SynchCommandComplete	9#define		AdapInternalError	0xfe    /* The adapter detected an internal error shutting down *//* *	Define all the events the host wishes to notify the *	adapter of. The first four values much match the Qid the *	corresponding queue. */#define		AdapNormCmdQue		2#define		AdapHighCmdQue		3#define		AdapNormRespQue		6#define		AdapHighRespQue		7#define		HostShutdown		8#define		HostPowerFail		9#define		FatalCommError		10#define		HostNormRespNotFull	11#define		HostHighRespNotFull	12#define		HostNormCmdNotFull	13#define		HostHighCmdNotFull	14#define		FastIo			15#define		AdapPrintfDone		16/* *	Define all the queues that the adapter and host use to communicate *	Number them to match the physical queue layout. */enum aac_queue_types {        HostNormCmdQueue = 0,	/* Adapter to host normal priority command traffic */        HostHighCmdQueue,	/* Adapter to host high priority command traffic */        AdapNormCmdQueue,	/* Host to adapter normal priority command traffic */        AdapHighCmdQueue,	/* Host to adapter high priority command traffic */        HostNormRespQueue,	/* Adapter to host normal priority response traffic */        HostHighRespQueue,	/* Adapter to host high priority response traffic */        AdapNormRespQueue,	/* Host to adapter normal priority response traffic */        AdapHighRespQueue	/* Host to adapter high priority response traffic */};/* *	Assign type values to the FSA communication data structures */#define		FIB_MAGIC	0x0001/* *	Define the priority levels the FSA communication routines support. */#define		FsaNormal	1#define		FsaHigh		2//// Define the FIB. The FIB is the where all the requested data and// command information are put to the application on the FSA adapter.//struct aac_fibhdr {	u32 XferState;			// Current transfer state for this CCB	u16 Command;			// Routing information for the destination	u8 StructType;			// Type FIB	u8 Flags;			// Flags for FIB	u16 Size;			// Size of this FIB in bytes	u16 SenderSize;			// Size of the FIB in the sender (for response sizing)	u32 SenderFibAddress;		// Host defined data in the FIB	u32 ReceiverFibAddress;		// Logical address of this FIB for the adapter	u32 SenderData;			// Place holder for the sender to store data	union {		struct {		    u32 _ReceiverTimeStart; 	// Timestamp for receipt of fib		    u32 _ReceiverTimeDone;	// Timestamp for completion of fib		} _s;		struct list_head _FibLinks;	// Used to link Adapter Initiated Fibs on the host	} _u;};#define FibLinks			_u._FibLinks#define FIB_DATA_SIZE_IN_BYTES (512 - sizeof(struct aac_fibhdr))struct hw_fib {	struct aac_fibhdr header;	u8 data[FIB_DATA_SIZE_IN_BYTES];		// Command specific data};/* *	FIB commands */#define 	TestCommandResponse		1#define		TestAdapterCommand		2/* *	Lowlevel and comm commands */#define		LastTestCommand			100#define		ReinitHostNormCommandQueue	101#define		ReinitHostHighCommandQueue	102#define		ReinitHostHighRespQueue		103#define		ReinitHostNormRespQueue		104#define		ReinitAdapNormCommandQueue	105#define		ReinitAdapHighCommandQueue	107#define		ReinitAdapHighRespQueue		108#define		ReinitAdapNormRespQueue		109#define		InterfaceShutdown		110#define		DmaCommandFib			120#define		StartProfile			121#define		TermProfile			122#define		SpeedTest			123#define		TakeABreakPt			124#define		RequestPerfData			125#define		SetInterruptDefTimer		126#define		SetInterruptDefCount		127#define		GetInterruptDefStatus		128#define		LastCommCommand			129/* *	Filesystem commands */#define		NuFileSystem			300#define		UFS				301#define		HostFileSystem			302#define		LastFileSystemCommand		303/* *	Container Commands */#define		ContainerCommand		500#define		ContainerCommand64		501/* *	Cluster Commands */#define		ClusterCommand	 		550/* *	Scsi Port commands (scsi passthrough) */#define		ScsiPortCommand			600/* *	Misc house keeping and generic adapter initiated commands */#define		AifRequest			700#define		CheckRevision			701#define		FsaHostShutdown			702#define		RequestAdapterInfo		703#define		IsAdapterPaused			704#define		SendHostTime			705#define		LastMiscCommand			706//// Commands that will target the failover level on the FSA adapter//enum fib_xfer_state {	HostOwned 			= (1<<0),	AdapterOwned 			= (1<<1),	FibInitialized 			= (1<<2),	FibEmpty 			= (1<<3),	AllocatedFromPool 		= (1<<4),	SentFromHost 			= (1<<5),	SentFromAdapter 		= (1<<6),	ResponseExpected 		= (1<<7),	NoResponseExpected 		= (1<<8),	AdapterProcessed 		= (1<<9),	HostProcessed 			= (1<<10),	HighPriority 			= (1<<11),	NormalPriority 			= (1<<12),	Async				= (1<<13),	AsyncIo				= (1<<13),	// rpbfix: remove with new regime	PageFileIo			= (1<<14),	// rpbfix: remove with new regime	ShutdownRequest			= (1<<15),	LazyWrite			= (1<<16),	// rpbfix: remove with new regime	AdapterMicroFib			= (1<<17),	BIOSFibPath			= (1<<18),	FastResponseCapable		= (1<<19),	ApiFib				= (1<<20)	// Its an API Fib.};/* *	The following defines needs to be updated any time there is an *	incompatible change made to the aac_init structure. */#define ADAPTER_INIT_STRUCT_REVISION		3struct aac_init{	u32	InitStructRevision;	u32	MiniPortRevision;	u32	fsrev;	u32	CommHeaderAddress;	u32	FastIoCommAreaAddress;	u32	AdapterFibsPhysicalAddress;	u32	AdapterFibsVirtualAddress;	u32	AdapterFibsSize;	u32	AdapterFibAlign;	u32	printfbuf;	u32	printfbufsiz;	u32	HostPhysMemPages;		// number of 4k pages of host physical memory	u32	HostElapsedSeconds;		// number of seconds since 1970.};enum aac_log_level {	LOG_INIT			= 10,	LOG_INFORMATIONAL		= 20,	LOG_WARNING			= 30,	LOG_LOW_ERROR			= 40,	LOG_MEDIUM_ERROR		= 50,	LOG_HIGH_ERROR			= 60,	LOG_PANIC			= 70,	LOG_DEBUG			= 80,	LOG_WINDBG_PRINT		= 90};#define FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT	0x030b#define FSAFS_NTC_FIB_CONTEXT			0x030cstruct aac_dev;struct adapter_ops{	void (*adapter_interrupt)(struct aac_dev *dev);	void (*adapter_notify)(struct aac_dev *dev, u32 event);	void (*adapter_enable_int)(struct aac_dev *dev, u32 event);	void (*adapter_disable_int)(struct aac_dev *dev, u32 event);};/*

⌨️ 快捷键说明

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