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

📄 aacraid.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
 */#define AAC_BAT_REQ_PRESENT	(1)#define AAC_BAT_REQ_NOTPRESENT	(2)#define AAC_BAT_OPT_PRESENT	(3)#define AAC_BAT_OPT_NOTPRESENT	(4)#define AAC_BAT_NOT_SUPPORTED	(5)/* * cpu types */#define AAC_CPU_SIMULATOR	(1)#define AAC_CPU_I960		(2)#define AAC_CPU_STRONGARM	(3)/* * Supported Options */#define AAC_OPT_SNAPSHOT		cpu_to_le32(1)#define AAC_OPT_CLUSTERS		cpu_to_le32(1<<1)#define AAC_OPT_WRITE_CACHE		cpu_to_le32(1<<2)#define AAC_OPT_64BIT_DATA		cpu_to_le32(1<<3)#define AAC_OPT_HOST_TIME_FIB		cpu_to_le32(1<<4)#define AAC_OPT_RAID50			cpu_to_le32(1<<5)#define AAC_OPT_4GB_WINDOW		cpu_to_le32(1<<6)#define AAC_OPT_SCSI_UPGRADEABLE 	cpu_to_le32(1<<7)#define AAC_OPT_SOFT_ERR_REPORT		cpu_to_le32(1<<8)#define AAC_OPT_SUPPORTED_RECONDITION 	cpu_to_le32(1<<9)#define AAC_OPT_SGMAP_HOST64		cpu_to_le32(1<<10)#define AAC_OPT_ALARM			cpu_to_le32(1<<11)#define AAC_OPT_NONDASD			cpu_to_le32(1<<12)#define AAC_OPT_SCSI_MANAGED    	cpu_to_le32(1<<13)#define AAC_OPT_RAID_SCSI_MODE		cpu_to_le32(1<<14)#define AAC_OPT_SUPPLEMENT_ADAPTER_INFO	cpu_to_le32(1<<16)#define AAC_OPT_NEW_COMM		cpu_to_le32(1<<17)#define AAC_OPT_NEW_COMM_64		cpu_to_le32(1<<18)struct aac_dev{	struct list_head	entry;	const char		*name;	int			id;	/*	 *	negotiated FIB settings	 */	unsigned		max_fib_size;	unsigned		sg_tablesize;	/*	 *	Map for 128 fib objects (64k)	 */		dma_addr_t		hw_fib_pa;	struct hw_fib		*hw_fib_va;	struct hw_fib		*aif_base_va;	/*	 *	Fib Headers	 */	struct fib              *fibs;	struct fib		*free_fib;	struct fib		*timeout_fib;	spinlock_t		fib_lock;		struct aac_queue_block *queues;	/*	 *	The user API will use an IOCTL to register itself to receive	 *	FIBs from the adapter.  The following list is used to keep	 *	track of all the threads that have requested these FIBs.  The	 *	mutex is used to synchronize access to all data associated 	 *	with the adapter fibs.	 */	struct list_head	fib_list;	struct adapter_ops	a_ops;	unsigned long		fsrev;		/* Main driver's revision number */		unsigned		base_size;	/* Size of mapped in region */	struct aac_init		*init;		/* Holds initialization info to communicate with adapter */	dma_addr_t		init_pa; 	/* Holds physical address of the init struct */		struct pci_dev		*pdev;		/* Our PCI interface */	void *			printfbuf;	/* pointer to buffer used for printf's from the adapter */	void *			comm_addr;	/* Base address of Comm area */	dma_addr_t		comm_phys;	/* Physical Address of Comm area */	size_t			comm_size;	struct Scsi_Host	*scsi_host_ptr;	int			maximum_num_containers;	int			maximum_num_physicals;	int			maximum_num_channels;	struct fsa_dev_info	*fsa_dev;	pid_t			thread_pid;	int			cardtype;		/*	 *	The following is the device specific extension.	 */#if (!defined(AAC_MIN_FOOTPRINT_SIZE))#	define AAC_MIN_FOOTPRINT_SIZE 8192#endif	union	{		struct sa_registers __iomem *sa;		struct rx_registers __iomem *rx;		struct rkt_registers __iomem *rkt;	} regs;	u32			OIMR; /* Mask Register Cache */	/*	 *	AIF thread states	 */	u32			aif_thread;	struct completion	aif_completion;	struct aac_adapter_info adapter_info;	struct aac_supplement_adapter_info supplement_adapter_info;	/* These are in adapter info but they are in the io flow so	 * lets break them out so we don't have to do an AND to check them	 */	u8			nondasd_support; 	u8			dac_support;	u8			raid_scsi_mode;	u8			new_comm_interface;	/* macro side-effects BEWARE */#	define			raw_io_interface \	  init->InitStructRevision==cpu_to_le32(ADAPTER_INIT_STRUCT_REVISION_4)	u8			raw_io_64;	u8			printf_enabled;};#define aac_adapter_interrupt(dev) \	(dev)->a_ops.adapter_interrupt(dev)#define aac_adapter_notify(dev, event) \	(dev)->a_ops.adapter_notify(dev, event)#define aac_adapter_disable_int(dev) \	(dev)->a_ops.adapter_disable_int(dev)#define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \	(dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)#define aac_adapter_check_health(dev) \	(dev)->a_ops.adapter_check_health(dev)#define aac_adapter_send(fib) \	((fib)->dev)->a_ops.adapter_send(fib)#define FIB_CONTEXT_FLAG_TIMED_OUT		(0x00000001)/* *	Define the command values */ #define		Null			0#define 	GetAttributes		1#define 	SetAttributes		2#define 	Lookup			3#define 	ReadLink		4#define 	Read			5#define 	Write			6#define		Create			7#define		MakeDirectory		8#define		SymbolicLink		9#define		MakeNode		10#define		Removex			11#define		RemoveDirectoryx	12#define		Rename			13#define		Link			14#define		ReadDirectory		15#define		ReadDirectoryPlus	16#define		FileSystemStatus	17#define		FileSystemInfo		18#define		PathConfigure		19#define		Commit			20#define		Mount			21#define		UnMount			22#define		Newfs			23#define		FsCheck			24#define		FsSync			25#define		SimReadWrite		26#define		SetFileSystemStatus	27#define		BlockRead		28#define		BlockWrite		29#define		NvramIoctl		30#define		FsSyncWait		31#define		ClearArchiveBit		32#define		SetAcl			33#define		GetAcl			34#define		AssignAcl		35#define		FaultInsertion		36	/* Fault Insertion Command */#define		CrazyCache		37	/* Crazycache */#define		MAX_FSACOMMAND_NUM	38/* *	Define the status returns. These are very unixlike although *	most are not in fact used */#define		ST_OK		0#define		ST_PERM		1#define		ST_NOENT	2#define		ST_IO		5#define		ST_NXIO		6#define		ST_E2BIG	7#define		ST_ACCES	13#define		ST_EXIST	17#define		ST_XDEV		18#define		ST_NODEV	19#define		ST_NOTDIR	20#define		ST_ISDIR	21#define		ST_INVAL	22#define		ST_FBIG		27#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{	__le32	 	command;	__le32 		cid;	__le32 		block;	__le32 		count;	struct sgmap	sg;	// Must be last in struct because it is variable};struct aac_read64{	__le32	 	command;	__le16 		cid;	__le16 		sector_count;	__le32 		block;	__le16		pad;	__le16		flags;	struct sgmap64	sg;	// Must be last in struct because it is variable};struct aac_read_reply{	__le32	 	status;	__le32 		count;};struct aac_write{	__le32		command;	__le32 		cid;	__le32 		block;	__le32 		count;	__le32	 	stable;	// Not used	struct sgmap	sg;	// Must be last in struct because it is variable};struct aac_write64{	__le32	 	command;	__le16 		cid;	__le16 		sector_count;	__le32 		block;	__le16		pad;	__le16		flags;	struct sgmap64	sg;	// Must be last in struct because it is variable};struct aac_write_reply{	__le32		status;	__le32 		count;	__le32		committed;};struct aac_raw_io{	__le32		block[2];	__le32		count;	__le16		cid;	__le16		flags;		/* 00 W, 01 R */	__le16		bpTotal;	/* reserved for F/W use */	__le16		bpComplete;	/* reserved for F/W use */	struct sgmapraw	sg;};#define CT_FLUSH_CACHE 129struct aac_synchronize {	__le32		command;	/* VM_ContainerConfig */	__le32		type;		/* CT_FLUSH_CACHE */	__le32		cid;	__le32		parm1;	__le32		parm2;	__le32		parm3;	__le32		parm4;	__le32		count;	/* sizeof(((struct aac_synchronize_reply *)NULL)->data) */};struct aac_synchronize_reply {	__le32		dummy0;	__le32		dummy1;	__le32		status;	/* CT_OK */	__le32		parm1;	__le32		parm2;	__le32		parm3;	__le32		parm4;	__le32		parm5;	u8		data[16];};struct aac_srb{	__le32		function;	__le32		channel;	__le32		id;	__le32		lun;	__le32		timeout;	__le32		flags;	__le32		count;		// Data xfer size	__le32		retry_limit;	__le32		cdb_size;	u8		cdb[16];	struct	sgmap	sg;};/* * This and associated data structs are used by the * ioctl caller and are in cpu order. */struct user_aac_srb{	u32		function;	u32		channel;	u32		id;	u32		lun;	u32		timeout;	u32		flags;	u32		count;		// Data xfer size	u32		retry_limit;	u32		cdb_size;	u8		cdb[16];	struct	user_sgmap	sg;};#define		AAC_SENSE_BUFFERSIZE	 30struct aac_srb_reply{	__le32		status;	__le32		srb_status;	__le32		scsi_status;	__le32		data_xfer_length;	__le32		sense_data_size;	u8		sense_data[AAC_SENSE_BUFFERSIZE]; // Can this be SCSI_SENSE_BUFFERSIZE};/* * SRB Flags */#define		SRB_NoDataXfer		 0x0000#define		SRB_DisableDisconnect	 0x0004#define		SRB_DisableSynchTransfer 0x0008#define 	SRB_BypassFrozenQueue	 0x0010#define		SRB_DisableAutosense	 0x0020#define		SRB_DataIn		 0x0040#define 	SRB_DataOut		 0x0080/* * SRB Functions - set in aac_srb->function */#define	SRBF_ExecuteScsi	0x0000#define	SRBF_ClaimDevice	0x0001#define	SRBF_IO_Control		0x0002#define	SRBF_ReceiveEvent	0x0003#define	SRBF_ReleaseQueue	0x0004#define	SRBF_AttachDevice	0x0005#define	SRBF_ReleaseDevice	0x0006#define	SRBF_Shutdown		0x0007#define	SRBF_Flush		0x0008#define	SRBF_AbortCommand	0x0010#define	SRBF_ReleaseRecovery	0x0011#define	SRBF_ResetBus		0x0012#define	SRBF_ResetDevice	0x0013#define	SRBF_TerminateIO	0x0014#define	SRBF_FlushQueue		0x0015#define	SRBF_RemoveDevice	0x0016#define	SRBF_DomainValidation	0x0017/*  * SRB SCSI Status - set in aac_srb->scsi_status */#define SRB_STATUS_PENDING                  0x00#define SRB_STATUS_SUCCESS                  0x01#define SRB_STATUS_ABORTED                  0x02#define SRB_STATUS_ABORT_FAILED             0x03#define SRB_STATUS_ERROR                    0x04#define SRB_STATUS_BUSY                     0x05#define SRB_STATUS_INVALID_REQUEST          0x06#define SRB_STATUS_INVALID_PATH_ID          0x07#define SRB_STATUS_NO_DEVICE                0x08#define SRB_STATUS_TIMEOUT                  0x09#define SRB_STATUS_SELECTION_TIMEOUT        0x0A#define SRB_STATUS_COMMAND_TIMEOUT          0x0B#define SRB_STATUS_MESSAGE_REJECTED         0x0D#define SRB_STATUS_BUS_RESET                0x0E#define SRB_STATUS_PARITY_ERROR             0x0F#define SRB_STATUS_REQUEST_SENSE_FAILED     0x10#define SRB_STATUS_NO_HBA                   0x11#define SRB_STATUS_DATA_OVERRUN             0x12#define SRB_STATUS_UNEXPECTED_BUS_FREE      0x13#define SRB_STATUS_PHASE_SEQUENCE_FAILURE   0x14#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH     0x15#define SRB_STATUS_REQUEST_FLUSHED          0x16#define SRB_STATUS_DELAYED_RETRY	    0x17#define SRB_STATUS_INVALID_LUN              0x20#define SRB_STATUS_INVALID_TARGET_ID        0x21#define SRB_STATUS_BAD_FUNCTION             0x22#define SRB_STATUS_ERROR_RECOVERY           0x23#define SRB_STATUS_NOT_STARTED		    0x24#define SRB_STATUS_NOT_IN_USE		    0x30#define SRB_STATUS_FORCE_ABORT		    0x31#define SRB_STATUS_DOMAIN_VALIDATION_FAIL   0x32

⌨️ 快捷键说明

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