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

📄 riowinif.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Same thing again, but defined as offsets... */#define	LPB_link_number		0x00		/* 0x00 Link Number */#define	LPB_in_ch		0x02		/* 0x02 Link In Channel */#define	LPB_out_ch		0x04		/* 0x04 Link Out Channel */#define	LPB_attached_serial	0x06		/* 0x06 Attached serial number */#define	LPB_attached_host_serial 0x0A		/* 0x0A Serial number of Host who booted other end */#define	LPB_descheduled		0x0E		/* 0x0E Currently Descheduled */#define	LPB_state		0x10		/* 0x10 Current state */#define	LPB_send_poll		0x12		/* 0x12 Send a Poll Packet */#define	LPB_ltt_p		0x14		/* 0x14 Process Descriptor */#define	LPB_lrt_p		0x16		/* 0x16 Process Descriptor */#define	LPB_lrt_status		0x18		/* 0x18 Current lrt status */#define	LPB_ltt_status		0x1A		/* 0x1A Current ltt status */#define	LPB_timeout		0x1C		/* 0x1C Timeout value */#define	LPB_topology		0x1E		/* 0x1E Topology bits */#define	LPB_mon_ltt		0x20		/* 0x20 */#define	LPB_mon_lrt		0x22		/* 0x22 */#define	LPB_num_pkts		0x24		/* 0x24 */#define	LPB_add_packet_list	0x26		/* 0x26 Add packets to here */#define	LPB_remove_packet_list	0x28		/* 0x28 Send packets from here */#define	LPB_lrt_fail_chan	0x2A		/* 0x2A Lrt's failure channel */#define	LPB_ltt_fail_chan	0x2C		/* 0x2C Ltt's failure channel */#define	LPB_rup			0x2E		/* 0x2E RUP structure for HOST to driver comms */#define	LPB_link_rup		0x40		/* 0x40 RUP for the link (POLL, topology etc.) */#define	LPB_attached_link	0x52		/* 0x52 Number of attached link */#define	LPB_csum_errors		0x54		/* 0x54 csum errors */#define	LPB_num_disconnects	0x56		/* 0x56 number of disconnects */#define	LPB_num_sync_rcvd	0x58		/* 0x58 # sync's received */#define	LPB_num_sync_rqst	0x5A		/* 0x5A # sync requests */#define	LPB_num_tx		0x5C		/* 0x5C Num pkts sent */#define	LPB_num_rx		0x5E		/* 0x5E Num pkts received */#define	LPB_module_attached	0x60		/* 0x60 Module tpyes of attached */#define	LPB_led_timeout		0x62		/* 0x62 LED timeout */#define	LPB_first_port		0x64		/* 0x64 First port to service */#define	LPB_last_port		0x66		/* 0x66 Last port to service */#define	sizeof_LPB		0x68		/* structure size = 0x68 */#define	LINKS_PER_UNIT		4		/* number of links from a host *//*************************************************************************************************************               ***************************************************************   FREE_LIST   ***************************************************************               ************************************************************************************************************//* Used to overlay packet headers when allocating/freeing packets from the free list */typedef	struct	_FREE_LIST{	_u16		next;			/* 0x00 offset of next list item */	_u16		prev;			/* 0x02 offset of previous list item */} FREE_LIST;/* Same thing again, but defined as offsets... */#define	FL_next			0x00		/* 0x00 offset of next list item */#define	FL_prev			0x02		/* 0x02 offset of previous list item *//***************************************************************************************************************         *********************************************************************   PKT   *********************************************************************         ****************************************************************************************************************//* The PKT is the main unit of communication between Host Cards and RTAs across   the RIO network.  */#define PKT_MAX_DATA_LEN   72			/* Size of packet data */typedef	struct	_PKT{	_u8		dest_unit;		/* 0x00 Destination Unit Id */	_u8		dest_port;		/* 0x01 Destination Port */	_u8		src_unit;		/* 0x02 Source Unit Id */	_u8		src_port;		/* 0x03 Source Port */	_u8		len;			/* 0x04 Length (in bytes) of data field */	_u8		control;		/* 0x05 */	_u8		data[PKT_MAX_DATA_LEN];	/* 0x06 Actual data */	_u16		csum;			/* 0x4E C-SUM */} PKT;/* Same thing again, but defined as offsets... */#define	PKT_dest_unit		0x00		/* 0x00 Destination Unit Id */#define	PKT_dest_port		0x01		/* 0x01 Destination Port */#define	PKT_src_unit		0x02		/* 0x02 Source Unit Id */#define	PKT_src_port		0x03		/* 0x03 Source Port */#define	PKT_len			0x04		/* 0x04 Length (in bytes) of data field */#define	PKT_control		0x05		/* 0x05 */#define	PKT_data		0x06		/* 0x06 Actual data */#define	PKT_csum		0x4E		/* 0x4E C-SUM */#define	sizeof_PKT		0x50		/* structure size = 0x50 *//* PKT.len definitions... */#define	PKT_CMD_BIT		0x80#define	PKT_CMD_DATA		0x80#define	PKT_LEN_MASK		0x7F/* PKT.control definitions... */#define	PKT_ACK			0x40#define	PKT_TGL			0x20#define	DATA_WNDW		0x10#define	PKT_TTL_MASK		0x0F#define	MAX_TTL			0x0F/**********************************************************************************************************                     *********************************************************   Control Packets   *********************************************************                     *********************************************************************************************************//* The following definitions and structures define the control packets sent   between the driver and RIO Ports, RTAs and Host Cards. */#define	PRE_EMPTIVE		0x80			/* Pre-emptive command (sent via port's RUP) *//* "in-band" and "pre-emptive" port commands... */#define	OPEN			0x00			/* Driver->RIO Open a port */#define	CONFIG			0x01			/* Driver->RIO Configure a port */#define	MOPEN			0x02			/* Driver->RIO Modem open (wait for DCD) */#define	CLOSE			0x03			/* Driver->RIO Close a port */#define	WFLUSH			(0x04|PRE_EMPTIVE)	/* Driver->RIO Write flush */#define	RFLUSH			(0x05|PRE_EMPTIVE)	/* Driver->RIO Read flush */#define	RESUME			(0x06|PRE_EMPTIVE)	/* Driver->RIO Behave as if XON received */#define	SBREAK			0x07			/* Driver->RIO Start break */#define	EBREAK			0x08			/* Driver->RIO End break */#define	SUSPEND			(0x09|PRE_EMPTIVE)	/* Driver->RIO Behave as if XOFF received */#define	FCLOSE			(0x0A|PRE_EMPTIVE)	/* Driver->RIO Force close */#define	XPRINT			0x0B			/* Driver->RIO Xprint packet */#define	MBIS			(0x0C|PRE_EMPTIVE)	/* Driver->RIO Set modem lines */#define	MBIC			(0x0D|PRE_EMPTIVE)	/* Driver->RIO Clear modem lines */#define	MSET			(0x0E|PRE_EMPTIVE)	/* Driver->RIO Set modem lines */#define	PCLOSE			0x0F			/* Driver->RIO Pseudo close */#define	MGET			(0x10|PRE_EMPTIVE)	/* Driver->RIO Force update of modem status */#define	MEMDUMP			(0x11|PRE_EMPTIVE)	/* Driver->RIO DEBUG request for RTA memory */#define	READ_REGISTER		(0x12|PRE_EMPTIVE)	/* Driver->RIO DEBUG read CD1400 register *//* Remote Unit Port (RUP) packet definitions... (specified in PKT.dest_unit and PKT.src_unit) */#define	SYNC_RUP		0xFF			/* Download internal */#define	COMMAND_RUP		0xFE			/* Command ack/status */#define	ERROR_RUP		0xFD			/* Download internal */#define	POLL_RUP		0xFC			/* Download internal */#define	BOOT_RUP		0xFB			/* Used to boot RTAs */#define	ROUTE_RUP		0xFA			/* Used to specify routing/topology */#define	STATUS_RUP		0xF9			/* Not used */#define	POWER_RUP		0xF8			/* Download internal *//* COMMAND_RUP definitions... */#define	COMPLETE		(0x20|PRE_EMPTIVE)	/* RIO->Driver Command complete */#define	BREAK_RECEIVED		(0x21|PRE_EMPTIVE)	/* RIO->Driver Break received */#define	MODEM_STATUS		(0x22|PRE_EMPTIVE)	/* RIO->Driver Modem status change *//* BOOT_RUP definitions... */#define	BOOT_REQUEST		0x00			/* RIO->Driver Request for boot */#define	BOOT_ABORT		0x01			/* Driver->RIO Abort a boot */#define	BOOT_SEQUENCE		0x02			/* Driver->RIO Packet with firmware details */#define	BOOT_COMPLETED		0x03			/* RIO->Driver Boot completed */#define IFOAD			0x2F			/* Driver->RIO Shutdown/Reboot RTA (Fall Over And Die) */#define	IDENTIFY		0x30			/* Driver->RIO Identify RTA */#define	ZOMBIE			0x31			/* Driver->RIO Shutdown/Flash LEDs */#define	UFOAD			0x32			/* Driver->RIO Shutdown/Reboot neighbouring RTA */#define IWAIT			0x33			/* Driver->RIO Pause booting process *//* ROUTE_RUP definitions... */#define	ROUTE_REQUEST		0x00			/* RIO->Driver Request an ID */#define	ROUTE_FOAD		0x01			/* Driver->RIO Shutdown/reboot RTA */#define	ROUTE_ALREADY		0x02			/* Driver->RIO Not used */#define	ROUTE_USED		0x03			/* Driver->RIO Not used */#define	ROUTE_ALLOCATE		0x04			/* Driver->RIO Allocate RTA RUP numbers */#define	ROUTE_REQ_TOP		0x05			/* Driver->RIO Not used */#define ROUTE_TOPOLOGY		0x06			/* RIO->Driver Route/Topology status *//***************************************************************************************************************          ********************************************************************   OPEN   ********************************************************************          ***************************************************************************************************************//* (Driver->RIO,in-band)   Sent to open a port.    Structure of configuration info used with OPEN, CONFIG and MOPEN packets... */#define	PKT_Cmd			(PKT_Data+0)		/* Command code */#define	PKT_Cor1		(PKT_Data+1)		/* Channel Option Register 1 */#define	PKT_Cor2		(PKT_Data+2)		/* Channel Option Register 2 */#define	PKT_Cor4		(PKT_Data+3)		/* Channel Option Register 4 */#define	PKT_Cor5		(PKT_Data+4)		/* Channel Option Register 5 */#define	PKT_TxXon		(PKT_Data+5)		/* Transmit XON character */#define	PKT_TxXoff		(PKT_Data+6)		/* Transmit XOFF character */#define	PKT_RxXon		(PKT_Data+7)		/* Receive XON character */#define	PKT_RxXoff		(PKT_Data+8)		/* Receive XOFF character */#define	PKT_Lnext		(PKT_Data+9)		/* Lnext character */#define	PKT_TxBaud		(PKT_Data+10)		/* Transmit baud rate */#define	PKT_RxBaud		(PKT_Data+11)		/* Receive baud rate *//* COR1 definitions... */#define	COR1_PARITY		0xE0			/* Parity mask */#define	COR1_NONE		0x00			/* No parity */#define	COR1_SPACE		0x20			/* Space parity */#define	COR1_EVEN		0x40			/* Even parity */#define	COR1_MARK		0xA0			/* Mark parity */#define	COR1_ODD		0xC0			/* Odd parity */#define	COR1_STOPBITS		0x0C			/* Stop bits mask */#define	COR1_STOP1		0x00			/* 1 stop bit */#define	COR1_STOP1_5		0x04			/* 1.5 stop bits */#define	COR1_STOP2		0x08			/* 2 stop bits */#define	COR1_DATABITS		0x03			/* Data bits mask */#define	COR1_DATA5		0x00			/* 5 data bits */#define	COR1_DATA6		0x01			/* 6 data bits */#define	COR1_DATA7		0x02			/* 7 data bits */#define	COR1_DATA8		0x03			/* 8 data bits *//* COR2 definitions... */#define	COR2_XON_TXFLOW		0x40			/* XON/XOFF Transmit Flow */#define	COR2_XANY_TXFLOW	0xC0			/* XON/XANY Transmit Flow */#define	COR2_HUPCL		0x20			/* Hang Up On Close */#define	COR2_DSR_TXFLOW		0x08			/* DSR Transmit Flow Control */#define	COR2_RTS_RXFLOW		0x04			/* RTS Receive Flow Control */#define	COR2_CTS_TXFLOW		0x02			/* CTS Transmit Flow Control */#define	COR2_XON_RXFLOW		0x01			/* XON/XOFF Receive Flow *//* COR4 definition... */#define	COR4_IGNCR		0x80			/* Discard received CR */#define	COR4_ICRNL		0x40			/* Map received CR -> NL */#define	COR4_INLCR		0x20			/* Map received NL -> CR */#define	COR4_IGNBRK		0x10			/* Ignore Received Break */#define	COR4_NBRKINT		0x08			/* No interrupt on rx Break */#define	COR4_IGNPAR		0x04			/* ignore rx parity error chars */#define	COR4_PARMRK		0x02			/* Mark rx parity error chars */#define	COR4_RAISEMOD		0x01			/* Raise modem lines on !0 baud *//* COR5 definitions... */#define	COR5_ISTRIP		0x80			/* Strip input chars to 7 bits */#define	COR5_LNE		0x40			/* Enable LNEXT processing */#define	COR5_CMOE		0x20			/* Match good & error characters */#define	COR5_TAB3		0x10			/* TAB3 mode */#define	COR5_TSTATE_ON		0x08			/* Enable tbusy/tstop monitoring */#define	COR5_TSTATE_OFF		0x04			/* Disable tbusy/tstop monitoring */#define	COR5_ONLCR		0x02			/* NL -> CR NL on output */#define	COR5_OCRNL		0x01			/* CR -> NL on output *//* RxBaud and TxBaud definitions... */#define	RIO_B0			0x00			/* RTS / DTR signals dropped */#define	RIO_B50			0x01			/* 50 baud */#define	RIO_B75			0x02			/* 75 baud */#define	RIO_B110		0x03			/* 110 baud */#define	RIO_B134		0x04			/* 134.5 baud */#define	RIO_B150		0x05			/* 150 baud */#define	RIO_B200		0x06			/* 200 baud */#define	RIO_B300		0x07			/* 300 baud */#define	RIO_B600		0x08			/* 600 baud */#define	RIO_B1200		0x09			/* 1200 baud */#define	RIO_B1800		0x0A			/* 1800 baud */#define	RIO_B2400		0x0B			/* 2400 baud */#define	RIO_B4800		0x0C			/* 4800 baud */#define	RIO_B9600		0x0D			/* 9600 baud */#define	RIO_B19200		0x0E			/* 19200 baud */#define	RIO_B38400		0x0F			/* 38400 baud */#define	RIO_B56000		0x10			/* 56000 baud */#define	RIO_B57600		0x11			/* 57600 baud */#define	RIO_B64000		0x12			/* 64000 baud */#define	RIO_B115200		0x13			/* 115200 baud */#define	RIO_B2000		0x14			/* 2000 baud *//**************************************************************************************************************            ******************************************************************   CONFIG   ******************************************************************            **************************************************************************************************************//* (Driver->RIO,in-band)   CONFIG is sent from the driver to configure an already opened port.   Packet structure is same as OPEN.  *//**************************************************************************************************************           *******************************************************************   MOPEN   *******************************************************************           ***************************************************************************************************************//* (Driver->RIO,in-band)   MOPEN is sent from the driver to open a port attached to a modem. (in-band)   Packet structure is same as OPEN.  *//**************************************************************************************************************           *******************************************************************   CLOSE   *******************************************************************           ***************************************************************************************************************//* (Driver->RIO,in-band)   CLOSE is sent from the driver to close a previously opened port.   No parameters. */#if 0#define	PKT_Cmd			(PKT_Data+0)		/* Command code */#endif/**************************************************************************************************************            ******************************************************************   WFLUSH   ******************************************************************            **************************************************************************************************************//* (Driver->RIO,pre-emptive)   WFLUSH is sent pre-emptively from the driver to flush the write buffers and   packets of a port.  (pre-emptive)      WFLUSH is also sent in-band from the driver to a port as a marker to end   write flushing previously started by a pre-emptive WFLUSH packet. (in-band)   */#if 0#define	PKT_Cmd			(PKT_Data+0)		/* Command code */#endif#define	PKT_PhbNum		(PKT_Data+1)		/* Port number wrt RTA *//**************************************************************************************************************            ******************************************************************   RFLUSH   ******************************************************************            **************************************************************************************************************//* (Driver->RIO,pre-emptive)   RFLUSH is sent pre-emptively from the driver to flush the read buffers and

⌨️ 快捷键说明

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