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

📄 aacraid.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
	__le32	AdapterFibAlign;	__le32	printfbuf;	__le32	printfbufsiz;	__le32	HostPhysMemPages;   /* number of 4k pages of host 				       physical memory */	__le32	HostElapsedSeconds; /* number of seconds since 1970. */	/*	 * ADAPTER_INIT_STRUCT_REVISION_4 begins here	 */	__le32	InitFlags;	/* flags for supported features */#define INITFLAGS_NEW_COMM_SUPPORTED	0x00000001	__le32	MaxIoCommands;	/* max outstanding commands */	__le32	MaxIoSize;	/* largest I/O command */	__le32	MaxFibSize;	/* largest FIB to adapter */};enum aac_log_level {	LOG_AAC_INIT			= 10,	LOG_AAC_INFORMATIONAL		= 20,	LOG_AAC_WARNING			= 30,	LOG_AAC_LOW_ERROR		= 40,	LOG_AAC_MEDIUM_ERROR		= 50,	LOG_AAC_HIGH_ERROR		= 60,	LOG_AAC_PANIC			= 70,	LOG_AAC_DEBUG			= 80,	LOG_AAC_WINDBG_PRINT		= 90};#define FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT	0x030b#define FSAFS_NTC_FIB_CONTEXT			0x030cstruct aac_dev;struct fib;struct adapter_ops{	void (*adapter_interrupt)(struct aac_dev *dev);	void (*adapter_notify)(struct aac_dev *dev, u32 event);	void (*adapter_disable_int)(struct aac_dev *dev);	int  (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4);	int  (*adapter_check_health)(struct aac_dev *dev);	int  (*adapter_send)(struct fib * fib);};/* *	Define which interrupt handler needs to be installed */struct aac_driver_ident{	int 	(*init)(struct aac_dev *dev);	char *	name;	char *	vname;	char *	model;	u16	channels;	int	quirks;};/* * Some adapter firmware needs communication memory  * below 2gig. This tells the init function to set the * dma mask such that fib memory will be allocated where the * adapter firmware can get to it. */#define AAC_QUIRK_31BIT	0x0001/* * Some adapter firmware, when the raid card's cache is turned off, can not * split up scatter gathers in order to deal with the limits of the * underlying CHIM. This limit is 34 scatter gather elements. */#define AAC_QUIRK_34SG	0x0002/* * This adapter is a slave (no Firmware) */#define AAC_QUIRK_SLAVE 0x0004/* * This adapter is a master. */#define AAC_QUIRK_MASTER 0x0008/* *	The adapter interface specs all queues to be located in the same *	physically contigous block. The host structure that defines the *	commuication queues will assume they are each a separate physically *	contigous memory region that will support them all being one big *	contigous block.  *	There is a command and response queue for each level and direction of *	commuication. These regions are accessed by both the host and adapter. */ struct aac_queue {	u64		 	logical;	/*address we give the adapter */	struct aac_entry	*base;		/*system virtual address */	struct aac_qhdr 	headers;       	/*producer,consumer q headers*/	u32	 		entries;	/*Number of queue entries */	wait_queue_head_t	qfull;		/*Event to wait on if q full */	wait_queue_head_t	cmdready;	/*Cmd ready from the adapter */                  /* This is only valid for adapter to host command queues. */ 	spinlock_t	 	*lock;		/* Spinlock for this queue must take this lock before accessing the lock */	spinlock_t		lockdata;	/* Actual lock (used only on one side of the lock) */	struct list_head 	cmdq;	   	/* A queue of FIBs which need to be prcessed by the FS thread. This is */                                		/* only valid for command queues which receive entries from the adapter. */	struct list_head	pendingq;	/* A queue of outstanding fib's to the adapter. */	u32			numpending;	/* Number of entries on outstanding queue. */	struct aac_dev *	dev;		/* Back pointer to adapter structure */};/* *	Message queues. The order here is important, see also the  *	queue type ordering */struct aac_queue_block{	struct aac_queue queue[8];};/* *	SaP1 Message Unit Registers */ struct sa_drawbridge_CSR {				/*	Offset 	|  Name */	__le32	reserved[10];	/*	00h-27h |  Reserved */	u8	LUT_Offset;	/*	28h	|  Lookup Table Offset */	u8	reserved1[3];	/* 	29h-2bh	|  Reserved */	__le32	LUT_Data;	/*	2ch	|  Looup Table Data */	__le32	reserved2[26];	/*	30h-97h	|  Reserved */	__le16	PRICLEARIRQ;	/*	98h	|  Primary Clear Irq */	__le16	SECCLEARIRQ;	/*	9ah	|  Secondary Clear Irq */	__le16	PRISETIRQ;	/*	9ch	|  Primary Set Irq */	__le16	SECSETIRQ;	/*	9eh	|  Secondary Set Irq */	__le16	PRICLEARIRQMASK;/*	a0h	|  Primary Clear Irq Mask */	__le16	SECCLEARIRQMASK;/*	a2h	|  Secondary Clear Irq Mask */	__le16	PRISETIRQMASK;	/*	a4h	|  Primary Set Irq Mask */	__le16	SECSETIRQMASK;	/*	a6h	|  Secondary Set Irq Mask */	__le32	MAILBOX0;	/*	a8h	|  Scratchpad 0 */	__le32	MAILBOX1;	/*	ach	|  Scratchpad 1 */	__le32	MAILBOX2;	/*	b0h	|  Scratchpad 2 */	__le32	MAILBOX3;	/*	b4h	|  Scratchpad 3 */	__le32	MAILBOX4;	/*	b8h	|  Scratchpad 4 */	__le32	MAILBOX5;	/*	bch	|  Scratchpad 5 */	__le32	MAILBOX6;	/*	c0h	|  Scratchpad 6 */	__le32	MAILBOX7;	/*	c4h	|  Scratchpad 7 */	__le32	ROM_Setup_Data;	/*	c8h 	|  Rom Setup and Data */	__le32	ROM_Control_Addr;/*	cch 	|  Rom Control and Address */	__le32	reserved3[12];	/*	d0h-ffh	|  reserved */	__le32	LUT[64];	/*    100h-1ffh	|  Lookup Table Entries */};#define Mailbox0	SaDbCSR.MAILBOX0#define Mailbox1	SaDbCSR.MAILBOX1#define Mailbox2	SaDbCSR.MAILBOX2#define Mailbox3	SaDbCSR.MAILBOX3#define Mailbox4	SaDbCSR.MAILBOX4#define Mailbox5	SaDbCSR.MAILBOX5#define Mailbox6	SaDbCSR.MAILBOX6#define Mailbox7	SaDbCSR.MAILBOX7	#define DoorbellReg_p SaDbCSR.PRISETIRQ#define DoorbellReg_s SaDbCSR.SECSETIRQ#define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ#define	DOORBELL_0	0x0001#define DOORBELL_1	0x0002#define DOORBELL_2	0x0004#define DOORBELL_3	0x0008#define DOORBELL_4	0x0010#define DOORBELL_5	0x0020#define DOORBELL_6	0x0040	#define PrintfReady	DOORBELL_5#define PrintfDone	DOORBELL_5	struct sa_registers {	struct sa_drawbridge_CSR	SaDbCSR;			/* 98h - c4h */};	#define Sa_MINIPORT_REVISION			1#define sa_readw(AEP, CSR)		readl(&((AEP)->regs.sa->CSR))#define sa_readl(AEP,  CSR)		readl(&((AEP)->regs.sa->CSR))#define sa_writew(AEP, CSR, value)	writew(value, &((AEP)->regs.sa->CSR))#define sa_writel(AEP, CSR, value)	writel(value, &((AEP)->regs.sa->CSR))/* *	Rx Message Unit Registers */struct rx_mu_registers {			    /*	Local  | PCI*| Name */	__le32	ARSR;	    /*	1300h  | 00h | APIC Register Select Register */	__le32	reserved0;  /*	1304h  | 04h | Reserved */	__le32	AWR;	    /*	1308h  | 08h | APIC Window Register */	__le32	reserved1;  /*	130Ch  | 0Ch | Reserved */	__le32	IMRx[2];    /*	1310h  | 10h | Inbound Message Registers */	__le32	OMRx[2];    /*	1318h  | 18h | Outbound Message Registers */	__le32	IDR;	    /*	1320h  | 20h | Inbound Doorbell Register */	__le32	IISR;	    /*	1324h  | 24h | Inbound Interrupt 						Status Register */	__le32	IIMR;	    /*	1328h  | 28h | Inbound Interrupt 					 	Mask Register */	__le32	ODR;	    /*	132Ch  | 2Ch | Outbound Doorbell Register */	__le32	OISR;	    /*	1330h  | 30h | Outbound Interrupt 						Status Register */	__le32	OIMR;	    /*	1334h  | 34h | Outbound Interrupt 						Mask Register */	__le32	reserved2;  /*	1338h  | 38h | Reserved */	__le32	reserved3;  /*	133Ch  | 3Ch | Reserved */	__le32	InboundQueue;/*	1340h  | 40h | Inbound Queue Port relative to firmware */	__le32	OutboundQueue;/*1344h  | 44h | Outbound Queue Port relative to firmware */			    /* * Must access through ATU Inbound 			     	 Translation Window */};struct rx_inbound {	__le32	Mailbox[8];};#define	InboundMailbox0		IndexRegs.Mailbox[0]#define	InboundMailbox1		IndexRegs.Mailbox[1]#define	InboundMailbox2		IndexRegs.Mailbox[2]#define	InboundMailbox3		IndexRegs.Mailbox[3]#define	InboundMailbox4		IndexRegs.Mailbox[4]#define	InboundMailbox5		IndexRegs.Mailbox[5]#define	InboundMailbox6		IndexRegs.Mailbox[6]#define	INBOUNDDOORBELL_0	0x00000001#define INBOUNDDOORBELL_1	0x00000002#define INBOUNDDOORBELL_2	0x00000004#define INBOUNDDOORBELL_3	0x00000008#define INBOUNDDOORBELL_4	0x00000010#define INBOUNDDOORBELL_5	0x00000020#define INBOUNDDOORBELL_6	0x00000040#define	OUTBOUNDDOORBELL_0	0x00000001#define OUTBOUNDDOORBELL_1	0x00000002#define OUTBOUNDDOORBELL_2	0x00000004#define OUTBOUNDDOORBELL_3	0x00000008#define OUTBOUNDDOORBELL_4	0x00000010#define InboundDoorbellReg	MUnit.IDR#define OutboundDoorbellReg	MUnit.ODRstruct rx_registers {	struct rx_mu_registers		MUnit;		/* 1300h - 1344h */	__le32				reserved1[2];	/* 1348h - 134ch */	struct rx_inbound		IndexRegs;};#define rx_readb(AEP, CSR)		readb(&((AEP)->regs.rx->CSR))#define rx_readl(AEP, CSR)		readl(&((AEP)->regs.rx->CSR))#define rx_writeb(AEP, CSR, value)	writeb(value, &((AEP)->regs.rx->CSR))#define rx_writel(AEP, CSR, value)	writel(value, &((AEP)->regs.rx->CSR))/* *	Rkt Message Unit Registers (same as Rx, except a larger reserve region) */#define rkt_mu_registers rx_mu_registers#define rkt_inbound rx_inboundstruct rkt_registers {	struct rkt_mu_registers		MUnit;		 /* 1300h - 1344h */	__le32				reserved1[1006]; /* 1348h - 22fch */	struct rkt_inbound		IndexRegs;	 /* 2300h - */};#define rkt_readb(AEP, CSR)		readb(&((AEP)->regs.rkt->CSR))#define rkt_readl(AEP, CSR)		readl(&((AEP)->regs.rkt->CSR))#define rkt_writeb(AEP, CSR, value)	writeb(value, &((AEP)->regs.rkt->CSR))#define rkt_writel(AEP, CSR, value)	writel(value, &((AEP)->regs.rkt->CSR))typedef void (*fib_callback)(void *ctxt, struct fib *fibctx);struct aac_fib_context {	s16	 		type;		// used for verification of structure		s16	 		size;	u32			unique;		// unique value representing this context	ulong			jiffies;	// used for cleanup - dmb changed to ulong	struct list_head	next;		// used to link context's into a linked list	struct semaphore 	wait_sem;	// this is used to wait for the next fib to arrive.	int			wait;		// Set to true when thread is in WaitForSingleObject	unsigned long		count;		// total number of FIBs on FibList	struct list_head	fib_list;	// this holds fibs and their attachd hw_fibs};struct sense_data {	u8 error_code;		/* 70h (current errors), 71h(deferred errors) */	u8 valid:1;		/* A valid bit of one indicates that the information  */				/* field contains valid information as defined in the				 * SCSI-2 Standard.				 */	u8 segment_number;	/* Only used for COPY, COMPARE, or COPY AND VERIFY Commands */	u8 sense_key:4;		/* Sense Key */	u8 reserved:1;	u8 ILI:1;		/* Incorrect Length Indicator */	u8 EOM:1;		/* End Of Medium - reserved for random access devices */	u8 filemark:1;		/* Filemark - reserved for random access devices */	u8 information[4];	/* for direct-access devices, contains the unsigned 				 * logical block address or residue associated with 				 * the sense key 				 */	u8 add_sense_len;	/* number of additional sense bytes to follow this field */	u8 cmnd_info[4];	/* not used */	u8 ASC;			/* Additional Sense Code */	u8 ASCQ;		/* Additional Sense Code Qualifier */	u8 FRUC;		/* Field Replaceable Unit Code - not used */	u8 bit_ptr:3;		/* indicates which byte of the CDB or parameter data				 * was in error				 */	u8 BPV:1;		/* bit pointer valid (BPV): 1- indicates that 				 * the bit_ptr field has valid value				 */	u8 reserved2:2;	u8 CD:1;		/* command data bit: 1- illegal parameter in CDB.				 * 0- illegal parameter in data.				 */	u8 SKSV:1;	u8 field_ptr[2];	/* byte of the CDB or parameter data in error */};struct fsa_dev_info {	u64		last;	u64		size;	u32		type;	u32		config_waiting_on;	u16		queue_depth;	u8		config_needed;	u8		valid;	u8		ro;	u8		locked;	u8		deleted;	char		devname[8];	struct sense_data sense_data;};struct fib {	void			*next;	/* this is used by the allocator */	s16			type;	s16			size;	/*	 *	The Adapter that this I/O is destined for.	 */	struct aac_dev 		*dev;	/*	 *	This is the event the sendfib routine will wait on if the	 *	caller did not pass one and this is synch io.	 */	struct semaphore 	event_wait;	spinlock_t		event_lock;	u32			done;	/* gets set to 1 when fib is complete */	fib_callback 		callback;	void 			*callback_data;	u32			flags; // u32 dmb was ulong	/*	 *	The following is used to put this fib context onto the 	 *	Outstanding I/O queue.	 */	struct list_head	queue;	/*	 *	And for the internal issue/reply queues (we may be able	 *	to merge these two)	 */	struct list_head	fiblink;	void 			*data;	struct hw_fib		*hw_fib;		/* Actual shared object */	dma_addr_t		hw_fib_pa;		/* physical address of hw_fib*/};/* *	Adapter Information Block * *	This is returned by the RequestAdapterInfo block */ struct aac_adapter_info{	__le32	platform;	__le32	cpu;	__le32	subcpu;	__le32	clock;	__le32	execmem;	__le32	buffermem;	__le32	totalmem;	__le32	kernelrev;	__le32	kernelbuild;	__le32	monitorrev;	__le32	monitorbuild;	__le32	hwrev;	__le32	hwbuild;	__le32	biosrev;	__le32	biosbuild;	__le32	cluster;	__le32	clusterchannelmask; 	__le32	serial[2];	__le32	battery;	__le32	options;	__le32	OEM;};struct aac_supplement_adapter_info{	u8	AdapterTypeText[17+1];	u8	Pad[2];	__le32	FlashMemoryByteSize;	__le32	FlashImageId;	__le32	MaxNumberPorts;	__le32	Version;	__le32	FeatureBits;	u8	SlotNumber;	u8	ReservedPad0[0];	u8	BuildDate[12];	__le32	CurrentNumberPorts;	__le32	ReservedGrowth[24];};#define AAC_FEATURE_FALCON	0x00000010#define AAC_SIS_VERSION_V3	3#define AAC_SIS_SLOT_UNKNOWN	0xFF#define GetBusInfo 0x00000009struct aac_bus_info {	__le32	Command;	/* VM_Ioctl */	__le32	ObjType;	/* FT_DRIVE */	__le32	MethodId;	/* 1 = SCSI Layer */	__le32	ObjectId;	/* Handle */	__le32	CtlCmd;		/* GetBusInfo */};struct aac_bus_info_response {	__le32	Status;		/* ST_OK */	__le32	ObjType;	__le32	MethodId;	/* unused */	__le32	ObjectId;	/* unused */	__le32	CtlCmd;		/* unused */	__le32	ProbeComplete;	__le32	BusCount;	__le32	TargetsPerBus;	u8	InitiatorBusId[10];	u8	BusValid[10];};/* * Battery platforms

⌨️ 快捷键说明

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