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

📄 aacraid.h

📁 linux和2410结合开发 用他可以生成2410所需的zImage文件
💻 H
📖 第 1 页 / 共 3 页
字号:
#define		ST_NOSPC	28#define		ST_ROFS		30#define		ST_MLINK	31#define		ST_WOULDBLOCK	35#define		ST_NAMETOOLONG	63#define		ST_NOTEMPTY	66#define		ST_DQUOT	69#define		ST_STALE	70#define		ST_REMOTE	71#define		ST_BADHANDLE	10001#define		ST_NOT_SYNC	10002#define		ST_BAD_COOKIE	10003#define		ST_NOTSUPP	10004#define		ST_TOOSMALL	10005#define		ST_SERVERFAULT	10006#define		ST_BADTYPE	10007#define		ST_JUKEBOX	10008#define		ST_NOTMOUNTED	10009#define		ST_MAINTMODE	10010#define		ST_STALEACL	10011/* *	On writes how does the client want the data written. */#define	CACHE_CSTABLE		1#define CACHE_UNSTABLE		2/* *	Lets the client know at which level the data was commited on *	a write request */#define	CMFILE_SYNCH_NVRAM	1#define	CMDATA_SYNCH_NVRAM	2#define	CMFILE_SYNCH		3#define CMDATA_SYNCH		4#define CMUNSTABLE		5struct aac_read{	u32	 	command;	u32 		cid;	u32 		block;	u32 		count;	struct sgmap	sg;	// Must be last in struct because it is variable};struct aac_read_reply{	u32	 	status;	u32 		count;};struct aac_write{	u32		command;	u32 		cid;	u32 		block;	u32 		count;	u32	 	stable;	struct sgmap	sg;	// Must be last in struct because it is variable};struct aac_write_reply{	u32		status;	u32 		count;	u32		committed;};/* * Object-Server / Volume-Manager Dispatch Classes */#define		VM_Null			0#define		VM_NameServe		1#define		VM_ContainerConfig	2#define		VM_Ioctl		3#define		VM_FilesystemIoctl	4#define		VM_CloseAll		5#define		VM_CtBlockRead		6#define		VM_CtBlockWrite		7#define		VM_SliceBlockRead	8	/* raw access to configured "storage objects" */#define		VM_SliceBlockWrite	9#define		VM_DriveBlockRead	10	/* raw access to physical devices */#define		VM_DriveBlockWrite	11#define		VM_EnclosureMgt		12	/* enclosure management */#define		VM_Unused		13	/* used to be diskset management */#define		VM_CtBlockVerify	14#define		VM_CtPerf		15	/* performance test */#define		VM_CtBlockRead64	16#define		VM_CtBlockWrite64	17#define		VM_CtBlockVerify64	18#define		MAX_VMCOMMAND_NUM	19	/* used for sizing stats array - leave last *//* *	Descriptive information (eg, vital stats) *	that a content manager might report.  The *	FileArray filesystem component is one example *	of a content manager.  Raw mode might be *	another. */struct aac_fsinfo {	u32  fsTotalSize;	/* Consumed by fs, incl. metadata */	u32  fsBlockSize;	u32  fsFragSize;	u32  fsMaxExtendSize;	u32  fsSpaceUnits;	u32  fsMaxNumFiles;	u32  fsNumFreeFiles;	u32  fsInodeDensity;};	/* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */union aac_contentinfo {	struct aac_fsinfo filesys;	/* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */};/* *	Query for "mountable" objects, ie, objects that are typically *	associated with a drive letter on the client (host) side. */struct aac_mntent {	u32    			oid;	char			name[16];	// if applicable	struct creation_info	create_info;	// if applicable	u32			capacity;	u32			vol;    	// substrate structure	u32			obj;	        // FT_FILESYS, FT_DATABASE, etc.	u32			state;		// unready for mounting, readonly, etc.	union aac_contentinfo	fileinfo;	// Info specific to content manager (eg, filesystem)	u32			altoid;		// != oid <==> snapshot or broken mirror exists};#define FSCS_READONLY	0x0002	/*	possible result of broken mirror */struct aac_query_mount {	u32		command;	u32		type;	u32		count;};struct aac_mount {	u32		status;	u32	   	type;           /* should be same as that requested */	u32		count;	struct aac_mntent mnt[1];};/* * The following command is sent to shut down each container. */struct aac_close {	u32	command;	u32	cid;};struct aac_query_disk{	s32	cnum;	s32	bus;	s32	target;	s32	lun;	u32	valid;	u32	locked;	u32	deleted;	s32	instance;	s8	name[10];	u32	unmapped;};struct aac_delete_disk {	u32	disknum;	u32	cnum;};struct fib_ioctl{	char	*fibctx;	int	wait;	char	*fib;};struct revision{	int compat;	unsigned long version;	unsigned long build;};	/* * 	Ugly - non Linux like ioctl coding for back compat. */#define CTL_CODE(function, method) (                 \    (4<< 16) | ((function) << 2) | (method) \)/* *	Define the method codes for how buffers are passed for I/O and FS  *	controls */#define METHOD_BUFFERED                 0#define METHOD_NEITHER                  3/* *	Filesystem ioctls */#define FSACTL_SENDFIB                  	CTL_CODE(2050, METHOD_BUFFERED)#define FSACTL_DELETE_DISK			0x163#define FSACTL_QUERY_DISK			0x173#define FSACTL_OPEN_GET_ADAPTER_FIB		CTL_CODE(2100, METHOD_BUFFERED)#define FSACTL_GET_NEXT_ADAPTER_FIB		CTL_CODE(2101, METHOD_BUFFERED)#define FSACTL_CLOSE_GET_ADAPTER_FIB		CTL_CODE(2102, METHOD_BUFFERED)#define FSACTL_MINIPORT_REV_CHECK               CTL_CODE(2107, METHOD_BUFFERED)#define FSACTL_FORCE_DELETE_DISK		CTL_CODE(2120, METHOD_NEITHER)struct aac_common{	/*	 *	If this value is set to 1 then interrupt moderation will occur 	 *	in the base commuication support.	 */	unsigned long irq_mod;	int peak_fibs;	int zero_fibs;	unsigned long fib_timeouts;	/*	 *	Statistical counters in debug mode	 */#ifdef DBG	unsigned long FibsSent;	unsigned long FibRecved;	unsigned long NoResponseSent;	unsigned long NoResponseRecved;	unsigned long AsyncSent;	unsigned long AsyncRecved;	unsigned long NormalSent;	unsigned long NormalRecved;#endif};extern struct aac_common aac_config;/* *	The following macro is used when sending and receiving FIBs. It is *	only used for debugging. */ #if DBG#define	FIB_COUNTER_INCREMENT(counter)		(counter)++#else#define	FIB_COUNTER_INCREMENT(counter)		#endif/* *	Adapter direct commands */#define	BREAKPOINT_REQUEST		0x00000004#define	INIT_STRUCT_BASE_ADDRESS	0x00000005#define	SEND_SYNCHRONOUS_FIB		0x0000000c/* *	Adapter Status Register * *  Phase Staus mailbox is 32bits: *	<31:16> = Phase Status *	<15:0>  = Phase * *	The adapter reports is present state through the phase.  Only *	a single phase should be ever be set.  Each phase can have multiple *	phase status bits to provide more detailed information about the  *	state of the board.  Care should be taken to ensure that any phase  *	status bits that are set when changing the phase are also valid *	for the new phase or be cleared out.  Adapter software (monitor, *	iflash, kernel) is responsible for properly maintining the phase  *	status mailbox when it is running. *											 *	MONKER_API Phases							 * *	Phases are bit oriented.  It is NOT valid  to have multiple bits set						 */					#define	SELF_TEST_FAILED		cpu_to_le32(0x00000004)#define	KERNEL_UP_AND_RUNNING		cpu_to_le32(0x00000080)#define	KERNEL_PANIC			cpu_to_le32(0x00000100)/* *	Doorbell bit defines */#define DoorBellPrintfDone		cpu_to_le32(1<<5)	// Host -> Adapter#define DoorBellAdapterNormCmdReady	cpu_to_le32(1<<1)	// Adapter -> Host#define DoorBellAdapterNormRespReady	cpu_to_le32(1<<2)	// Adapter -> Host#define DoorBellAdapterNormCmdNotFull	cpu_to_le32(1<<3)	// Adapter -> Host#define DoorBellAdapterNormRespNotFull	cpu_to_le32(1<<4)	// Adapter -> Host#define DoorBellPrintfReady		cpu_to_le32(1<<5)	// Adapter -> Host/* *	For FIB communication, we need all of the following things *	to send back to the user. */ #define 	AifCmdEventNotify	1	/* Notify of event */#define		AifCmdJobProgress	2	/* Progress report */#define		AifCmdAPIReport		3	/* Report from other user of API */#define		AifCmdDriverNotify	4	/* Notify host driver of event */#define		AifReqJobList		100	/* Gets back complete job list */#define		AifReqJobsForCtr	101	/* Gets back jobs for specific container */#define		AifReqJobsForScsi	102	/* Gets back jobs for specific SCSI device */ #define		AifReqJobReport		103	/* Gets back a specific job report or list of them */ #define		AifReqTerminateJob	104	/* Terminates job */#define		AifReqSuspendJob	105	/* Suspends a job */#define		AifReqResumeJob		106	/* Resumes a job */ #define		AifReqSendAPIReport	107	/* API generic report requests */#define		AifReqAPIJobStart	108	/* Start a job from the API */#define		AifReqAPIJobUpdate	109	/* Update a job report from the API */#define		AifReqAPIJobFinish	110	/* Finish a job from the API *//* *	Adapter Initiated FIB command structures. Start with the adapter *	initiated FIBs that really come from the adapter, and get responded *	to by the host. */struct aac_aifcmd {	u32 command;		/* Tell host what type of notify this is */	u32 seqnum;		/* To allow ordering of reports (if necessary) */	u8 data[1];		/* Undefined length (from kernel viewpoint) */};/* *	Adapter Information Block * *	This is returned by the RequestAdapterInfo block */ struct aac_adapter_info{	u32	platform;	u32	cpu;	u32	subcpu;	u32	clock;	u32	execmem;	u32	buffermem;	u32	totalmem;	u32	kernelrev;	u32	kernelbuild;	u32	monitorrev;	u32	monitorbuild;	u32	hwrev;	u32	hwbuild;	u32	biosrev;	u32	biosbuild;	u32	clustering;	u32	clustermask;	u64	serial;	u32	battery;	u32	options;	u32	OEM;};	const char *aac_driverinfo(struct Scsi_Host *);struct fib *fib_alloc(struct aac_dev *dev);int fib_setup(struct aac_dev *dev);void fib_map_free(struct aac_dev *dev);void fib_free(struct fib * context);void fib_init(struct fib * context);void fib_dealloc(struct fib * context);void aac_printf(struct aac_dev *dev, u32 val);int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt);int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q);void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum);int fib_complete(struct fib * context);#define fib_data(fibctx) ((void *)(fibctx)->fib->data)int aac_detach(struct aac_dev *dev);struct aac_dev *aac_init_adapter(struct aac_dev *dev);int aac_get_containers(struct aac_dev *dev);int aac_scsi_cmd(Scsi_Cmnd *scsi_cmnd_ptr);int aac_dev_ioctl(struct aac_dev *dev, int cmd, void *arg);int aac_do_ioctl(struct aac_dev * dev, int cmd, void *arg);int aac_rx_init(struct aac_dev *dev, unsigned long devNumber);int aac_sa_init(struct aac_dev *dev, unsigned long devNumber);unsigned int aac_response_normal(struct aac_queue * q);unsigned int aac_command_normal(struct aac_queue * q);int aac_command_thread(struct aac_dev * dev);int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);int fib_adapter_complete(struct fib * fibptr, unsigned short size);

⌨️ 快捷键说明

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