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

📄 aacraid.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
#if (!defined(dprintk))# define dprintk(x)#endif/* eg: if (nblank(dprintk(x))) */#define _nblank(x) #x#define nblank(x) _nblank(x)[0]/*------------------------------------------------------------------------------ *              D E F I N E S *----------------------------------------------------------------------------*/#define MAXIMUM_NUM_CONTAINERS	32#define AAC_NUM_MGT_FIB         8#define AAC_NUM_IO_FIB		(512 - AAC_NUM_MGT_FIB)#define AAC_NUM_FIB		(AAC_NUM_IO_FIB + AAC_NUM_MGT_FIB)#define AAC_MAX_LUN		(8)#define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)#define AAC_MAX_32BIT_SGBCOUNT	((unsigned short)256)/* * These macros convert from physical channels to virtual channels */#define CONTAINER_CHANNEL		(0)#define ID_LUN_TO_CONTAINER(id, lun)	(id)#define CONTAINER_TO_CHANNEL(cont)	(CONTAINER_CHANNEL)#define CONTAINER_TO_ID(cont)		(cont)#define CONTAINER_TO_LUN(cont)		(0)#define aac_phys_to_logical(x)  (x+1)#define aac_logical_to_phys(x)  (x?x-1:0)/* #define AAC_DETAILED_STATUS_INFO */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#define 	CT_OK        		218/* *	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/id/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 *	We have separate 32 and 64 bit version because even *	on 64 bit systems not all cards support the 64 bit version */struct sgentry {	__le32	addr;	/* 32-bit address. */	__le32	count;	/* Length. */};struct user_sgentry {	u32	addr;	/* 32-bit address. */	u32	count;	/* Length. */};struct sgentry64 {	__le32	addr[2];	/* 64-bit addr. 2 pieces for data alignment */	__le32	count;	/* Length. */};struct user_sgentry64 {	u32	addr[2];	/* 64-bit addr. 2 pieces for data alignment */	u32	count;	/* Length. */};struct sgentryraw {	__le32		next;	/* reserved for F/W use */	__le32		prev;	/* reserved for F/W use */	__le32		addr[2];	__le32		count;	__le32		flags;	/* reserved for F/W use */};struct user_sgentryraw {	u32		next;	/* reserved for F/W use */	u32		prev;	/* reserved for F/W use */	u32		addr[2];	u32		count;	u32		flags;	/* reserved for F/W use */};/* *	SGMAP * *	This is the SGMAP structure for all commands that use *	32-bit addressing. */struct sgmap {	__le32		count;	struct sgentry	sg[1]; };struct user_sgmap {	u32		count;	struct user_sgentry	sg[1]; };struct sgmap64 {	__le32		count;	struct sgentry64 sg[1];};struct user_sgmap64 {	u32		count;	struct user_sgentry64 sg[1];};struct sgmapraw {	__le32		  count;	struct sgentryraw sg[1];};struct user_sgmapraw {	u32		  count;	struct user_sgentryraw 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 */	__le32		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						 */	__le32		serial[2];			/* 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 {	__le32 size; /* Size in bytes of Fib which this QE points to */	__le32 addr; /* Receiver address of the FIB */};/* *	The adapter assumes the ProducerIndex and ConsumerIndex are grouped *	adjacently and in that order. */ struct aac_qhdr {	__le64 header_addr;/* Address to hand the adapter to access 			      to this queue head */	__le32 *producer; /* The producer index for this queue (host address) */	__le32 *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 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 {	__le32 XferState;	/* Current transfer state for this CCB */	__le16 Command;		/* Routing information for the destination */	u8 StructType;		/* Type FIB */	u8 Flags;		/* Flags for FIB */	__le16 Size;		/* Size of this FIB in bytes */	__le16 SenderSize;	/* Size of the FIB in the sender 				   (for response sizing) */	__le32 SenderFibAddress;  /* Host defined data in the FIB */	__le32 ReceiverFibAddress;/* Logical address of this FIB for 				     the adapter */	u32 SenderData;		/* Place holder for the sender to store data */	union {		struct {		    __le32 _ReceiverTimeStart; 	/* Timestamp for 						   receipt of fib */		    __le32 _ReceiverTimeDone;	/* Timestamp for 						   completion of fib */		} _s;	} _u;};struct hw_fib {	struct aac_fibhdr header;	u8 data[512-sizeof(struct aac_fibhdr)];	// 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#define		ContainerRawIo			502/* *	Cluster Commands */#define		ClusterCommand	 		550/* *	Scsi Port commands (scsi passthrough) */#define		ScsiPortCommand			600#define		ScsiPortCommand64		601/* *	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		RequestSupplementAdapterInfo	706#define		LastMiscCommand			707/* * 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		3#define ADAPTER_INIT_STRUCT_REVISION_4		4 // rocket sciencestruct aac_init{	__le32	InitStructRevision;	__le32	MiniPortRevision;	__le32	fsrev;	__le32	CommHeaderAddress;	__le32	FastIoCommAreaAddress;	__le32	AdapterFibsPhysicalAddress;	__le32	AdapterFibsVirtualAddress;	__le32	AdapterFibsSize;

⌨️ 快捷键说明

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