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

📄 tms380tr.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 3 页
字号:
					 * C: unchanged.					 */#define RX_RECEIVE_FS		0xFC00  /* R: reserved; must be reset to zero.					 * C: on lists with START_FRAME, field					 * contains frame status field from					 * received frame; otherwise cleared.					 */#define RX_ADDR_MATCH		0x0300  /* R: reserved; must be reset to zero.					 * C: address match code mask.					 */ #define RX_STATUS_MASK		0x00FF  /* Mask for receive status bits. */#define RX_INTERN_ADDR_MATCH    0x0100  /* C: internally address match. */#define RX_EXTERN_ADDR_MATCH    0x0200  /* C: externally matched via					 * XMATCH/XFAIL interface.					 */#define RX_INTEXT_ADDR_MATCH    0x0300  /* C: internally and externally					 * matched.					 */#define RX_READY (RX_VALID | RX_FRAME_IRQ) /* Ready for receive. *//* Constants for Command Status Interrupt. * COMMAND_REJECT status field bit functions (SSB.Parm[0]) */#define ILLEGAL_COMMAND		0x0080	/* Set if an unknown command					 * is issued to the adapter					 */#define ADDRESS_ERROR		0x0040  /* Set if any address field in					 * the SCB is odd. (not word aligned)					 */#define ADAPTER_OPEN		0x0020  /* Command issued illegal with					 * open adapter.					 */#define ADAPTER_CLOSE		0x0010  /* Command issued illegal with					 * closed adapter.					 */#define SAME_COMMAND		0x0008  /* Command issued with same command					 * already executing.					 *//* OPEN_COMPLETION values (SSB.Parm[0], MSB) */#define NODE_ADDR_ERROR		0x0040  /* Wrong address or BIA read					 * zero address.					 */#define LIST_SIZE_ERROR		0x0020  /* If List_Size value not in 0,					 * 14, 20, 26.					 */#define BUF_SIZE_ERROR		0x0010  /* Not enough available memory for					 * two buffers.					 */#define TX_BUF_COUNT_ERROR	0x0004  /* Remaining receive buffers less than					 * two.					 */#define OPEN_ERROR		0x0002	/* Error during ring insertion; more					 * information in bits 8-15.					 *//* Standard return codes */#define GOOD_COMPLETION		0x0080  /* =OPEN_SUCCESSFULL */#define INVALID_OPEN_OPTION	0x0001  /* OPEN options are not supported by					 * the adapter.					 *//* OPEN phases; details of OPEN_ERROR (SSB.Parm[0], LSB)            */#define OPEN_PHASES_MASK            0xF000  /* Check only the bits 8-11. */#define LOBE_MEDIA_TEST             0x1000#define PHYSICAL_INSERTION          0x2000#define ADDRESS_VERIFICATION        0x3000#define PARTICIPATION_IN_RING_POLL  0x4000#define REQUEST_INITIALISATION      0x5000#define FULLDUPLEX_CHECK            0x6000/* OPEN error codes; details of OPEN_ERROR (SSB.Parm[0], LSB) */#define OPEN_ERROR_CODES_MASK	0x0F00  /* Check only the bits 12-15. */#define OPEN_FUNCTION_FAILURE   0x0100  /* Unable to transmit to itself or					 * frames received before insertion.					 */#define OPEN_SIGNAL_LOSS	0x0200	/* Signal loss condition detected at					 * receiver.					 */#define OPEN_TIMEOUT		0x0500	/* Insertion timer expired before					 * logical insertion.					 */#define OPEN_RING_FAILURE	0x0600	/* Unable to receive own ring purge					 * MAC frames.					 */#define OPEN_RING_BEACONING	0x0700	/* Beacon MAC frame received after					 * ring insertion.					 */#define OPEN_DUPLICATE_NODEADDR	0x0800  /* Other station in ring found					 * with the same address.					 */#define OPEN_REQUEST_INIT	0x0900	/* RPS present but does not respond. */#define OPEN_REMOVE_RECEIVED    0x0A00  /* Adapter received a remove adapter					 * MAC frame.					 */#define OPEN_FULLDUPLEX_SET	0x0D00	/* Got this with full duplex on when					 * trying to connect to a normal ring.					 *//* SET_BRIDGE_PARMS return codes: */#define BRIDGE_INVALID_MAX_LEN  0x4000  /* MAX_ROUTING_FIELD_LENGTH odd,					 * less than 6 or > 30.					 */#define BRIDGE_INVALID_SRC_RING 0x2000  /* SOURCE_RING number zero, too large					 * or = TARGET_RING.					 */#define BRIDGE_INVALID_TRG_RING 0x1000  /* TARGET_RING number zero, too large					 * or = SOURCE_RING.					 */#define BRIDGE_INVALID_BRDGE_NO 0x0800  /* BRIDGE_NUMBER too large. */#define BRIDGE_INVALID_OPTIONS  0x0400  /* Invalid bridge options. */#define BRIDGE_DIAGS_FAILED     0x0200  /* Diagnostics of TMS380SRA failed. */#define BRIDGE_NO_SRA           0x0100  /* The TMS380SRA does not exist in HW					 * configuration.					 *//* * Bring Up Diagnostics error codes. */#define BUD_INITIAL_ERROR       0x0#define BUD_CHECKSUM_ERROR      0x1#define BUD_ADAPTER_RAM_ERROR   0x2#define BUD_INSTRUCTION_ERROR   0x3#define BUD_CONTEXT_ERROR       0x4#define BUD_PROTOCOL_ERROR      0x5#define BUD_INTERFACE_ERROR	0x6/* BUD constants */#define BUD_MAX_RETRIES         3#define BUD_MAX_LOOPCNT         6#define BUD_TIMEOUT             3000/* Initialization constants */#define INIT_MAX_RETRIES        3	/* Maximum three retries. */#define INIT_MAX_LOOPCNT        22      /* Maximum loop counts. *//* RING STATUS field values (high/low) */#define SIGNAL_LOSS             0x0080  /* Loss of signal on the ring					 * detected.					 */#define HARD_ERROR              0x0040  /* Transmitting or receiving beacon					 * frames.					 */#define SOFT_ERROR              0x0020  /* Report error MAC frame					 * transmitted.					 */#define TRANSMIT_BEACON         0x0010  /* Transmitting beacon frames on the					 * ring.					 */#define LOBE_WIRE_FAULT         0x0008  /* Open or short circuit in the					 * cable to concentrator; adapter					 * closed.					 */#define AUTO_REMOVAL_ERROR      0x0004  /* Lobe wrap test failed, deinserted;					 * adapter closed.					 */#define REMOVE_RECEIVED         0x0001  /* Received a remove ring station MAC					 * MAC frame request; adapter closed.					 */#define COUNTER_OVERFLOW        0x8000  /* Overflow of one of the adapters					 * error counters; READ.ERROR.LOG.					 */#define SINGLE_STATION          0x4000  /* Adapter is the only station on the					 * ring.					 */#define RING_RECOVERY           0x2000  /* Claim token MAC frames on the ring;					 * reset after ring purge frame.					 */#define ADAPTER_CLOSED (LOBE_WIRE_FAULT | AUTO_REMOVAL_ERROR |\                        REMOVE_RECEIVED)/* Adapter_check_block.Status field bit assignments: */#define DIO_PARITY              0x8000  /* Adapter detects bad parity					 * through direct I/O access.					 */#define DMA_READ_ABORT          0x4000  /* Aborting DMA read operation					 * from system Parm[0]: 0=timeout,					 * 1=parity error, 2=bus error;					 * Parm[1]: 32 bit pointer to host					 * system address at failure.					 */#define DMA_WRITE_ABORT         0x2000  /* Aborting DMA write operation					 * to system. (parameters analogous to					 * DMA_READ_ABORT)					 */#define ILLEGAL_OP_CODE         0x1000  /* Illegal operation code in the					 * the adapters firmware Parm[0]-2:					 * communications processor registers					 * R13-R15.					 */#define PARITY_ERRORS           0x0800  /* Adapter detects internal bus					 * parity error.					 */#define RAM_DATA_ERROR          0x0080  /* Valid only during RAM testing;					 * RAM data error Parm[0-1]: 32 bit					 * pointer to RAM location.					 */#define RAM_PARITY_ERROR        0x0040  /* Valid only during RAM testing;					 * RAM parity error Parm[0-1]: 32 bit					 * pointer to RAM location.					 */#define RING_UNDERRUN           0x0020  /* Internal DMA underrun when					 * transmitting onto ring.					 */#define INVALID_IRQ             0x0008  /* Unrecognized interrupt generated					 * internal to adapter Parm[0-2]:					 * adapter register R13-R15.					 */#define INVALID_ERROR_IRQ       0x0004  /* Unrecognized error interrupt					 * generated Parm[0-2]: adapter register					 * R13-R15.					 */#define INVALID_XOP             0x0002  /* Unrecognized XOP request in					 * communication processor Parm[0-2]:					 * adapter register R13-R15.					 */#define CHECKADDR               0x05E0  /* Adapter check status information					 * address offset.					 */#define ROM_PAGE_0              0x0000  /* Adapter ROM page 0. *//* * RECEIVE.STATUS interrupt result SSB values: (high-low) * (RECEIVE_COMPLETE field bit definitions in SSB.Parm[0]) */#define RX_COMPLETE             0x0080  /* SSB.Parm[0]; SSB.Parm[1]: 32					 * bit pointer to last RPL.					 */#define RX_SUSPENDED            0x0040  /* SSB.Parm[0]; SSB.Parm[1]: 32					 * bit pointer to RPL with odd					 * forward pointer.					 *//* Valid receive CSTAT: */#define RX_FRAME_CONTROL_BITS (RX_VALID | RX_START_FRAME | RX_END_FRAME | \			       RX_FRAME_COMPLETE)#define VALID_SINGLE_BUFFER_FRAME (RX_START_FRAME | RX_END_FRAME | \				   RX_FRAME_COMPLETE)typedef enum SKB_STAT SKB_STAT;enum SKB_STAT {	SKB_UNAVAILABLE,	SKB_DMA_DIRECT,	SKB_DATA_COPY};/* Receive Parameter List (RPL) The length of the RPLs has to be initialized  * in the OPL. (OPEN parameter list) */#define RPL_NUM		3#define RX_FRAG_NUM     1	/* Maximal number of used fragments in one RPL.				 * (up to firmware v2.24: 3, now: up to 9)				 */#pragma pack(1)typedef struct s_RPL RPL;struct s_RPL {	/* Receive Parameter List */	u_int32_t NextRPLAddr;		/* Pointer to next RPL in chain					 * (normalized = physical 32 bit					 * address) if pointer is odd: this					 * is last RPL. Pointing to itself can					 * cause problems!					 */	volatile u_int16_t Status;	/* Set by creation of Receive Parameter					 * List RECEIVE_CSTAT_COMPLETE set by					 * adapter in lists that start or end					 * a frame.					 */	volatile u_int16_t FrameSize;	 /* Number of bytes received as a					 * frame including AC/FC, Destination,					 * Source, Routing field not including 					 * CRC, FS (Frame Status), End Delimiter					 * (valid only if START_FRAME bit in 					 * CSTAT nonzero) must not be zero in					 * any list; maximum value: (BUFFER_SIZE					 * - 8) * TX_BUF_MAX sum of DataCount					 * values in FragmentList must equal					 * Frame_Size value in START_FRAME TPL!					 * frame data fragment list					 */	/* TPL/RPL size in OPEN parameter list depending on maximal numbers	 * of fragments used in one parameter list.	 */	Fragment FragList[RX_FRAG_NUM];	/* Maximum: nine frame fragments in					 * one TPL. Actual version of firmware:					 * 9 fragments possible.					 */#pragma pack()	/* Special proprietary data and precalculations. */	RPL *NextRPLPtr;	/* Logical pointer to next RPL in chain. */	unsigned char *MData;	struct sk_buff *Skb;	SKB_STAT SkbStat;	int RPLIndex;	dma_addr_t DMABuff;		/* DMA IO bus address from dma_map */};/* Information that need to be kept for each board. */typedef struct net_local {#pragma pack(1)	IPB ipb;	/* Initialization Parameter Block. */	SCB scb;	/* System Command Block: system to adapter 			 * communication.			 */	SSB ssb;	/* System Status Block: adapter to system 			 * communication.			 */	OPB ocpl;	/* Open Options Parameter Block. */	ERRORTAB errorlogtable;	/* Adapter statistic error counters.				 * (read from adapter memory)				 */	unsigned char ProductID[PROD_ID_SIZE + 1]; /* Product ID */#pragma pack()	TPL Tpl[TPL_NUM];	TPL *TplFree;	TPL *TplBusy;	unsigned char LocalTxBuffers[TPL_NUM][DEFAULT_PACKET_SIZE];	RPL Rpl[RPL_NUM];	RPL *RplHead;	RPL *RplTail;	unsigned char LocalRxBuffers[RPL_NUM][DEFAULT_PACKET_SIZE];	struct device *pdev;	int DataRate;	unsigned char ScbInUse;	unsigned short CMDqueue;	unsigned long AdapterOpenFlag:1;	unsigned long AdapterVirtOpenFlag:1;	unsigned long OpenCommandIssued:1;	unsigned long TransmitCommandActive:1;	unsigned long TransmitHaltScheduled:1;	unsigned long HaltInProgress:1;	unsigned long LobeWireFaultLogged:1;	unsigned long ReOpenInProgress:1;	unsigned long Sleeping:1;	unsigned long LastOpenStatus;	unsigned short CurrentRingStatus;	unsigned long MaxPacketSize;		unsigned long StartTime;	unsigned long LastSendTime;	struct tr_statistics MacStat;	/* MAC statistics structure */	unsigned long dmalimit; /* the max DMA address (ie, ISA) */	dma_addr_t    dmabuffer; /* the DMA bus address corresponding to				    priv. Might be different from virt_to_bus()				    for architectures with IO MMU (Alpha) */	struct timer_list timer;	wait_queue_head_t  wait_for_tok_int;	INTPTRS intptrs;	/* Internal adapter pointer. Must be read				 * before OPEN command.				 */	unsigned short (*setnselout)(struct net_device *);	unsigned short (*sifreadb)(struct net_device *, unsigned short);	void (*sifwriteb)(struct net_device *, unsigned short, unsigned short);	unsigned short (*sifreadw)(struct net_device *, unsigned short);	void (*sifwritew)(struct net_device *, unsigned short, unsigned short);	spinlock_t lock;                /* SMP protection */	void *tmspriv;} NET_LOCAL;#endif	/* __KERNEL__ */#endif	/* __LINUX_TMS380TR_H */

⌨️ 快捷键说明

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