···11-/************************************************************************/22-/* */33-/* Title : RIO Shared Memory Window Inteface */44-/* */55-/* Author : N.P.Vassallo */66-/* */77-/* Creation : 7th June 1999 */88-/* */99-/* Version : 1.0.0 */1010-/* */1111-/* Copyright : (c) Specialix International Ltd. 1999 *1212- * This program is free software; you can redistribute it and/or modify1313- * it under the terms of the GNU General Public License as published by1414- * the Free Software Foundation; either version 2 of the License, or1515- * (at your option) any later version.1616- *1717- * This program is distributed in the hope that it will be useful,1818- * but WITHOUT ANY WARRANTY; without even the implied warranty of1919- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the2020- * GNU General Public License for more details.2121- *2222- * You should have received a copy of the GNU General Public License2323- * along with this program; if not, write to the Free Software2424- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.2525- * */2626-/* Description : Prototypes, structures and definitions */2727-/* describing RIO host card shared memory */2828-/* window interface structures: */2929-/* PARMMAP */3030-/* RUP */3131-/* PHB */3232-/* LPB */3333-/* PKT */3434-/* */3535-/************************************************************************/3636-3737-/* History...3838-3939-1.0.0 07/06/99 NPV Creation. (based on PARMMAP.H)4040-4141-*/4242-4343-#ifndef _riowinif_h /* If RIOWINDIF.H not already defined */4444-#define _riowinif_h 14545-4646-/*****************************************************************************4747-******************************** *********************************4848-******************************** General *********************************4949-******************************** *********************************5050-*****************************************************************************/5151-5252-#define TPNULL ((_u16)(0x8000))5353-5454-/*****************************************************************************5555-******************************** ********************************5656-******************************** PARM_MAP ********************************5757-******************************** ********************************5858-*****************************************************************************/5959-6060-/* The PARM_MAP structure defines global values relating to the Host Card / RTA6161- and is the main structure from which all other structures are referenced. */6262-6363-typedef struct _PARM_MAP {6464- _u16 phb_ptr; /* 0x00 Pointer to the PHB array */6565- _u16 phb_num_ptr; /* 0x02 Ptr to Number of PHB's */6666- _u16 free_list; /* 0x04 Free List pointer */6767- _u16 free_list_end; /* 0x06 Free List End pointer */6868- _u16 q_free_list_ptr; /* 0x08 Ptr to Q_BUF variable */6969- _u16 unit_id_ptr; /* 0x0A Unit Id */7070- _u16 link_str_ptr; /* 0x0C Link Structure Array */7171- _u16 bootloader_1; /* 0x0E 1st Stage Boot Loader */7272- _u16 bootloader_2; /* 0x10 2nd Stage Boot Loader */7373- _u16 port_route_map_ptr; /* 0x12 Port Route Map */7474- _u16 route_ptr; /* 0x14 Route Map */7575- _u16 map_present; /* 0x16 Route Map present */7676- _u16 pkt_num; /* 0x18 Total number of packets */7777- _u16 q_num; /* 0x1A Total number of Q packets */7878- _u16 buffers_per_port; /* 0x1C Number of buffers per port */7979- _u16 heap_size; /* 0x1E Initial size of heap */8080- _u16 heap_left; /* 0x20 Current Heap left */8181- _u16 error; /* 0x22 Error code */8282- _u16 tx_max; /* 0x24 Max number of tx pkts per phb */8383- _u16 rx_max; /* 0x26 Max number of rx pkts per phb */8484- _u16 rx_limit; /* 0x28 For high / low watermarks */8585- _u16 links; /* 0x2A Links to use */8686- _u16 timer; /* 0x2C Interrupts per second */8787- _u16 rups; /* 0x2E Pointer to the RUPs */8888- _u16 max_phb; /* 0x30 Mostly for debugging */8989- _u16 living; /* 0x32 Just increments!! */9090- _u16 init_done; /* 0x34 Initialisation over */9191- _u16 booting_link; /* 0x36 */9292- _u16 idle_count; /* 0x38 Idle time counter */9393- _u16 busy_count; /* 0x3A Busy counter */9494- _u16 idle_control; /* 0x3C Control Idle Process */9595- _u16 tx_intr; /* 0x3E TX interrupt pending */9696- _u16 rx_intr; /* 0x40 RX interrupt pending */9797- _u16 rup_intr; /* 0x42 RUP interrupt pending */9898-9999-} PARM_MAP;100100-101101-/* Same thing again, but defined as offsets... */102102-103103-#define PM_phb_ptr 0x00 /* 0x00 Pointer to the PHB array */104104-#define PM_phb_num_ptr 0x02 /* 0x02 Ptr to Number of PHB's */105105-#define PM_free_list 0x04 /* 0x04 Free List pointer */106106-#define PM_free_list_end 0x06 /* 0x06 Free List End pointer */107107-#define PM_q_free_list_ptr 0x08 /* 0x08 Ptr to Q_BUF variable */108108-#define PM_unit_id_ptr 0x0A /* 0x0A Unit Id */109109-#define PM_link_str_ptr 0x0C /* 0x0C Link Structure Array */110110-#define PM_bootloader_1 0x0E /* 0x0E 1st Stage Boot Loader */111111-#define PM_bootloader_2 0x10 /* 0x10 2nd Stage Boot Loader */112112-#define PM_port_route_map_ptr 0x12 /* 0x12 Port Route Map */113113-#define PM_route_ptr 0x14 /* 0x14 Route Map */114114-#define PM_map_present 0x16 /* 0x16 Route Map present */115115-#define PM_pkt_num 0x18 /* 0x18 Total number of packets */116116-#define PM_q_num 0x1A /* 0x1A Total number of Q packets */117117-#define PM_buffers_per_port 0x1C /* 0x1C Number of buffers per port */118118-#define PM_heap_size 0x1E /* 0x1E Initial size of heap */119119-#define PM_heap_left 0x20 /* 0x20 Current Heap left */120120-#define PM_error 0x22 /* 0x22 Error code */121121-#define PM_tx_max 0x24 /* 0x24 Max number of tx pkts per phb */122122-#define PM_rx_max 0x26 /* 0x26 Max number of rx pkts per phb */123123-#define PM_rx_limit 0x28 /* 0x28 For high / low watermarks */124124-#define PM_links 0x2A /* 0x2A Links to use */125125-#define PM_timer 0x2C /* 0x2C Interrupts per second */126126-#define PM_rups 0x2E /* 0x2E Pointer to the RUPs */127127-#define PM_max_phb 0x30 /* 0x30 Mostly for debugging */128128-#define PM_living 0x32 /* 0x32 Just increments!! */129129-#define PM_init_done 0x34 /* 0x34 Initialisation over */130130-#define PM_booting_link 0x36 /* 0x36 */131131-#define PM_idle_count 0x38 /* 0x38 Idle time counter */132132-#define PM_busy_count 0x3A /* 0x3A Busy counter */133133-#define PM_idle_control 0x3C /* 0x3C Control Idle Process */134134-#define PM_tx_intr 0x3E /* 0x4E TX interrupt pending */135135-#define PM_rx_intr 0x40 /* 0x40 RX interrupt pending */136136-#define PM_rup_intr 0x42 /* 0x42 RUP interrupt pending */137137-#define sizeof_PARM_MAP 0x44 /* structure size = 0x44 */138138-139139-/* PARM_MAP.error definitions... */140140-#define E_NO_ERROR 0x00141141-#define E_PROCESS_NOT_INIT 0x01142142-#define E_LINK_TIMEOUT 0x02143143-#define E_NO_ROUTE 0x03144144-#define E_CONFUSED 0x04145145-#define E_HOME 0x05146146-#define E_CSUM_FAIL 0x06147147-#define E_DISCONNECTED 0x07148148-#define E_BAD_RUP 0x08149149-#define E_NO_VIRGIN 0x09150150-#define E_BOOT_RUP_BUSY 0x10151151-#define E_CHANALLOC 0x80152152-#define E_POLL_ALLOC 0x81153153-#define E_LTTWAKE 0x82154154-#define E_LTT_ALLOC 0x83155155-#define E_LRT_ALLOC 0x84156156-#define E_CIRRUS 0x85157157-#define E_MONITOR 0x86158158-#define E_PHB_ALLOC 0x87159159-#define E_ARRAY_ALLOC 0x88160160-#define E_QBUF_ALLOC 0x89161161-#define E_PKT_ALLOC 0x8a162162-#define E_GET_TX_Q_BUF 0x8b163163-#define E_GET_RX_Q_BUF 0x8c164164-#define E_MEM_OUT 0x8d165165-#define E_MMU_INIT 0x8e166166-#define E_LTT_INIT 0x8f167167-#define E_LRT_INIT 0x90168168-#define E_LINK_RUN 0x91169169-#define E_MONITOR_ALLOC 0x92170170-#define E_MONITOR_INIT 0x93171171-#define E_POLL_INIT 0x94172172-173173-/* PARM_MAP.links definitions... */174174-#define RIO_LINK_ENABLE 0x80FF175175-176176-/*****************************************************************************177177-********************************** ***********************************178178-********************************** RUP ***********************************179179-********************************** ***********************************180180-*****************************************************************************/181181-182182-/* The RUP (Remote Unit Port) structure relates to the Remote Terminal Adapters183183- attached to the system and there is normally an array of MAX_RUPS (=16) structures184184- in a host card, defined by PARM_MAP->rup. */185185-186186-typedef struct _RUP {187187- _u16 txpkt; /* 0x00 Outgoing packet */188188- _u16 rxpkt; /* 0x02 ncoming packet */189189- _u16 link; /* 0x04 Which link to send packet down ? */190190- _u8 rup_dest_unit[2]; /* 0x06 Destination Unit */191191- _u16 handshake; /* 0x08 Handshaking */192192- _u16 timeout; /* 0x0A Timeout */193193- _u16 status; /* 0x0C Status */194194- _u16 txcontrol; /* 0x0E Transmit control */195195- _u16 rxcontrol; /* 0x10 Receive control */196196-197197-} RUP;198198-199199-/* Same thing again, but defined as offsets... */200200-201201-#define RUP_txpkt 0x00 /* 0x00 Outgoing packet */202202-#define RUP_rxpkt 0x02 /* 0x02 Incoming packet */203203-#define RUP_link 0x04 /* 0x04 Which link to send packet down ? */204204-#define RUP_rup_dest_unit 0x06 /* 0x06 Destination Unit */205205-#define RUP_handshake 0x08 /* 0x08 Handshaking */206206-#define RUP_timeout 0x0A /* 0x0A Timeout */207207-#define RUP_status 0x0C /* 0x0C Status */208208-#define RUP_txcontrol 0x0E /* 0x0E Transmit control */209209-#define RUP_rxcontrol 0x10 /* 0x10 Receive control */210210-#define sizeof_RUP 0x12 /* structure size = 0x12 */211211-212212-#define MAX_RUP 16213213-214214-/* RUP.txcontrol definitions... */215215-#define TX_RUP_INACTIVE 0 /* Nothing to transmit */216216-#define TX_PACKET_READY 1 /* Transmit packet ready */217217-#define TX_LOCK_RUP 2 /* Transmit side locked */218218-219219-/* RUP.txcontrol definitions... */220220-#define RX_RUP_INACTIVE 0 /* Nothing received */221221-#define RX_PACKET_READY 1 /* Packet received */222222-223223-#define RUP_NO_OWNER 0xFF /* RUP not owned by any process */224224-225225-/*****************************************************************************226226-********************************** ***********************************227227-********************************** PHB ***********************************228228-********************************** ***********************************229229-*****************************************************************************/230230-231231-/* The PHB (Port Header Block) structure relates to the serial ports attached232232- to the system and there is normally an array of MAX_PHBS (=128) structures233233- in a host card, defined by PARM_MAP->phb_ptr and PARM_MAP->phb_num_ptr. */234234-235235-typedef struct _PHB {236236- _u16 source; /* 0x00 Location of the PHB in the host card */237237- _u16 handshake; /* 0x02 Used to manage receive packet flow control */238238- _u16 status; /* 0x04 Internal port transmit/receive status */239239- _u16 timeout; /* 0x06 Time period to wait for an ACK */240240- _u16 link; /* 0x08 The host link associated with the PHB */241241- _u16 destination; /* 0x0A Location of the remote port on the network */242242-243243- _u16 tx_start; /* 0x0C first entry in the packet array for transmit packets */244244- _u16 tx_end; /* 0x0E last entry in the packet array for transmit packets */245245- _u16 tx_add; /* 0x10 position in the packet array for new transmit packets */246246- _u16 tx_remove; /* 0x12 current position in the packet pointer array */247247-248248- _u16 rx_start; /* 0x14 first entry in the packet array for receive packets */249249- _u16 rx_end; /* 0x16 last entry in the packet array for receive packets */250250- _u16 rx_add; /* 0x18 position in the packet array for new receive packets */251251- _u16 rx_remove; /* 0x1A current position in the packet pointer array */252252-253253-} PHB;254254-255255-/* Same thing again, but defined as offsets... */256256-257257-#define PHB_source 0x00 /* 0x00 Location of the PHB in the host card */258258-#define PHB_handshake 0x02 /* 0x02 Used to manage receive packet flow control */259259-#define PHB_status 0x04 /* 0x04 Internal port transmit/receive status */260260-#define PHB_timeout 0x06 /* 0x06 Time period to wait for an ACK */261261-#define PHB_link 0x08 /* 0x08 The host link associated with the PHB */262262-#define PHB_destination 0x0A /* 0x0A Location of the remote port on the network */263263-#define PHB_tx_start 0x0C /* 0x0C first entry in the packet array for transmit packets */264264-#define PHB_tx_end 0x0E /* 0x0E last entry in the packet array for transmit packets */265265-#define PHB_tx_add 0x10 /* 0x10 position in the packet array for new transmit packets */266266-#define PHB_tx_remove 0x12 /* 0x12 current position in the packet pointer array */267267-#define PHB_rx_start 0x14 /* 0x14 first entry in the packet array for receive packets */268268-#define PHB_rx_end 0x16 /* 0x16 last entry in the packet array for receive packets */269269-#define PHB_rx_add 0x18 /* 0x18 position in the packet array for new receive packets */270270-#define PHB_rx_remove 0x1A /* 0x1A current position in the packet pointer array */271271-#define sizeof_PHB 0x1C /* structure size = 0x1C */272272-273273-/* PHB.handshake definitions... */274274-#define PHB_HANDSHAKE_SET 0x0001 /* Set by LRT */275275-#define PHB_HANDSHAKE_RESET 0x0002 /* Set by ISR / driver */276276-#define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET|PHB_HANDSHAKE_SET)277277- /* Reset by ltt */278278-279279-#define MAX_PHB 128 /* range 0-127 */280280-281281-/*****************************************************************************282282-********************************** ***********************************283283-********************************** LPB ***********************************284284-********************************** ***********************************285285-*****************************************************************************/286286-287287-/* The LPB (Link Parameter Block) structure relates to a RIO Network Link288288- and there is normally an array of MAX_LINKS (=4) structures in a host card,289289- defined by PARM_MAP->link_str_ptr. */290290-291291-typedef struct _LPB {292292- _u16 link_number; /* 0x00 Link Number */293293- _u16 in_ch; /* 0x02 Link In Channel */294294- _u16 out_ch; /* 0x04 Link Out Channel */295295- _u8 attached_serial[4]; /* 0x06 Attached serial number */296296- _u8 attached_host_serial[4]; /* 0x0A Serial number of Host who booted other end */297297- _u16 descheduled; /* 0x0E Currently Descheduled */298298- _u16 state; /* 0x10 Current state */299299- _u16 send_poll; /* 0x12 Send a Poll Packet */300300- _u16 ltt_p; /* 0x14 Process Descriptor */301301- _u16 lrt_p; /* 0x16 Process Descriptor */302302- _u16 lrt_status; /* 0x18 Current lrt status */303303- _u16 ltt_status; /* 0x1A Current ltt status */304304- _u16 timeout; /* 0x1C Timeout value */305305- _u16 topology; /* 0x1E Topology bits */306306- _u16 mon_ltt; /* 0x20 */307307- _u16 mon_lrt; /* 0x22 */308308- _u16 num_pkts; /* 0x24 */309309- _u16 add_packet_list; /* 0x26 Add packets to here */310310- _u16 remove_packet_list; /* 0x28 Send packets from here */311311-312312- _u16 lrt_fail_chan; /* 0x2A Lrt's failure channel */313313- _u16 ltt_fail_chan; /* 0x2C Ltt's failure channel */314314-315315- RUP rup; /* 0x2E RUP structure for HOST to driver comms */316316- RUP link_rup; /* 0x40 RUP for the link (POLL, topology etc.) */317317- _u16 attached_link; /* 0x52 Number of attached link */318318- _u16 csum_errors; /* 0x54 csum errors */319319- _u16 num_disconnects; /* 0x56 number of disconnects */320320- _u16 num_sync_rcvd; /* 0x58 # sync's received */321321- _u16 num_sync_rqst; /* 0x5A # sync requests */322322- _u16 num_tx; /* 0x5C Num pkts sent */323323- _u16 num_rx; /* 0x5E Num pkts received */324324- _u16 module_attached; /* 0x60 Module tpyes of attached */325325- _u16 led_timeout; /* 0x62 LED timeout */326326- _u16 first_port; /* 0x64 First port to service */327327- _u16 last_port; /* 0x66 Last port to service */328328-329329-} LPB;330330-331331-/* Same thing again, but defined as offsets... */332332-333333-#define LPB_link_number 0x00 /* 0x00 Link Number */334334-#define LPB_in_ch 0x02 /* 0x02 Link In Channel */335335-#define LPB_out_ch 0x04 /* 0x04 Link Out Channel */336336-#define LPB_attached_serial 0x06 /* 0x06 Attached serial number */337337-#define LPB_attached_host_serial 0x0A /* 0x0A Serial number of Host who booted other end */338338-#define LPB_descheduled 0x0E /* 0x0E Currently Descheduled */339339-#define LPB_state 0x10 /* 0x10 Current state */340340-#define LPB_send_poll 0x12 /* 0x12 Send a Poll Packet */341341-#define LPB_ltt_p 0x14 /* 0x14 Process Descriptor */342342-#define LPB_lrt_p 0x16 /* 0x16 Process Descriptor */343343-#define LPB_lrt_status 0x18 /* 0x18 Current lrt status */344344-#define LPB_ltt_status 0x1A /* 0x1A Current ltt status */345345-#define LPB_timeout 0x1C /* 0x1C Timeout value */346346-#define LPB_topology 0x1E /* 0x1E Topology bits */347347-#define LPB_mon_ltt 0x20 /* 0x20 */348348-#define LPB_mon_lrt 0x22 /* 0x22 */349349-#define LPB_num_pkts 0x24 /* 0x24 */350350-#define LPB_add_packet_list 0x26 /* 0x26 Add packets to here */351351-#define LPB_remove_packet_list 0x28 /* 0x28 Send packets from here */352352-#define LPB_lrt_fail_chan 0x2A /* 0x2A Lrt's failure channel */353353-#define LPB_ltt_fail_chan 0x2C /* 0x2C Ltt's failure channel */354354-#define LPB_rup 0x2E /* 0x2E RUP structure for HOST to driver comms */355355-#define LPB_link_rup 0x40 /* 0x40 RUP for the link (POLL, topology etc.) */356356-#define LPB_attached_link 0x52 /* 0x52 Number of attached link */357357-#define LPB_csum_errors 0x54 /* 0x54 csum errors */358358-#define LPB_num_disconnects 0x56 /* 0x56 number of disconnects */359359-#define LPB_num_sync_rcvd 0x58 /* 0x58 # sync's received */360360-#define LPB_num_sync_rqst 0x5A /* 0x5A # sync requests */361361-#define LPB_num_tx 0x5C /* 0x5C Num pkts sent */362362-#define LPB_num_rx 0x5E /* 0x5E Num pkts received */363363-#define LPB_module_attached 0x60 /* 0x60 Module tpyes of attached */364364-#define LPB_led_timeout 0x62 /* 0x62 LED timeout */365365-#define LPB_first_port 0x64 /* 0x64 First port to service */366366-#define LPB_last_port 0x66 /* 0x66 Last port to service */367367-#define sizeof_LPB 0x68 /* structure size = 0x68 */368368-369369-#define LINKS_PER_UNIT 4 /* number of links from a host */370370-371371-/*****************************************************************************372372-******************************** *******************************373373-******************************** FREE_LIST *******************************374374-******************************** *******************************375375-*****************************************************************************/376376-377377-/* Used to overlay packet headers when allocating/freeing packets from the free list */378378-379379-typedef struct _FREE_LIST {380380- _u16 next; /* 0x00 offset of next list item */381381- _u16 prev; /* 0x02 offset of previous list item */382382-383383-} FREE_LIST;384384-385385-/* Same thing again, but defined as offsets... */386386-387387-#define FL_next 0x00 /* 0x00 offset of next list item */388388-#define FL_prev 0x02 /* 0x02 offset of previous list item */389389-390390-/*****************************************************************************391391-********************************** ***********************************392392-********************************** PKT ***********************************393393-********************************** ***********************************394394-*****************************************************************************/395395-396396-/* The PKT is the main unit of communication between Host Cards and RTAs across397397- the RIO network. */398398-399399-#define PKT_MAX_DATA_LEN 72 /* Size of packet data */400400-401401-typedef struct _PKT {402402- _u8 dest_unit; /* 0x00 Destination Unit Id */403403- _u8 dest_port; /* 0x01 Destination Port */404404- _u8 src_unit; /* 0x02 Source Unit Id */405405- _u8 src_port; /* 0x03 Source Port */406406- _u8 len; /* 0x04 Length (in bytes) of data field */407407- _u8 control; /* 0x05 */408408- _u8 data[PKT_MAX_DATA_LEN]; /* 0x06 Actual data */409409- _u16 csum; /* 0x4E C-SUM */410410-411411-} PKT;412412-413413-/* Same thing again, but defined as offsets... */414414-415415-#define PKT_dest_unit 0x00 /* 0x00 Destination Unit Id */416416-#define PKT_dest_port 0x01 /* 0x01 Destination Port */417417-#define PKT_src_unit 0x02 /* 0x02 Source Unit Id */418418-#define PKT_src_port 0x03 /* 0x03 Source Port */419419-#define PKT_len 0x04 /* 0x04 Length (in bytes) of data field */420420-#define PKT_control 0x05 /* 0x05 */421421-#define PKT_data 0x06 /* 0x06 Actual data */422422-#define PKT_csum 0x4E /* 0x4E C-SUM */423423-#define sizeof_PKT 0x50 /* structure size = 0x50 */424424-425425-/* PKT.len definitions... */426426-#define PKT_CMD_BIT 0x80427427-#define PKT_CMD_DATA 0x80428428-#define PKT_LEN_MASK 0x7F429429-430430-/* PKT.control definitions... */431431-#define PKT_ACK 0x40432432-#define PKT_TGL 0x20433433-#define DATA_WNDW 0x10434434-#define PKT_TTL_MASK 0x0F435435-#define MAX_TTL 0x0F436436-437437-/*****************************************************************************438438-***************************** ****************************439439-***************************** Control Packets ****************************440440-***************************** ****************************441441-*****************************************************************************/442442-443443-/* The following definitions and structures define the control packets sent444444- between the driver and RIO Ports, RTAs and Host Cards. */445445-446446-#define PRE_EMPTIVE 0x80 /* Pre-emptive command (sent via port's RUP) */447447-448448-/* "in-band" and "pre-emptive" port commands... */449449-#define OPEN 0x00 /* Driver->RIO Open a port */450450-#define CONFIG 0x01 /* Driver->RIO Configure a port */451451-#define MOPEN 0x02 /* Driver->RIO Modem open (wait for DCD) */452452-#define CLOSE 0x03 /* Driver->RIO Close a port */453453-#define WFLUSH (0x04|PRE_EMPTIVE) /* Driver->RIO Write flush */454454-#define RFLUSH (0x05|PRE_EMPTIVE) /* Driver->RIO Read flush */455455-#define RESUME (0x06|PRE_EMPTIVE) /* Driver->RIO Behave as if XON received */456456-#define SBREAK 0x07 /* Driver->RIO Start break */457457-#define EBREAK 0x08 /* Driver->RIO End break */458458-#define SUSPEND (0x09|PRE_EMPTIVE) /* Driver->RIO Behave as if XOFF received */459459-#define FCLOSE (0x0A|PRE_EMPTIVE) /* Driver->RIO Force close */460460-#define XPRINT 0x0B /* Driver->RIO Xprint packet */461461-#define MBIS (0x0C|PRE_EMPTIVE) /* Driver->RIO Set modem lines */462462-#define MBIC (0x0D|PRE_EMPTIVE) /* Driver->RIO Clear modem lines */463463-#define MSET (0x0E|PRE_EMPTIVE) /* Driver->RIO Set modem lines */464464-#define PCLOSE 0x0F /* Driver->RIO Pseudo close */465465-#define MGET (0x10|PRE_EMPTIVE) /* Driver->RIO Force update of modem status */466466-#define MEMDUMP (0x11|PRE_EMPTIVE) /* Driver->RIO DEBUG request for RTA memory */467467-#define READ_REGISTER (0x12|PRE_EMPTIVE) /* Driver->RIO DEBUG read CD1400 register */468468-469469-/* Remote Unit Port (RUP) packet definitions... (specified in PKT.dest_unit and PKT.src_unit) */470470-#define SYNC_RUP 0xFF /* Download internal */471471-#define COMMAND_RUP 0xFE /* Command ack/status */472472-#define ERROR_RUP 0xFD /* Download internal */473473-#define POLL_RUP 0xFC /* Download internal */474474-#define BOOT_RUP 0xFB /* Used to boot RTAs */475475-#define ROUTE_RUP 0xFA /* Used to specify routing/topology */476476-#define STATUS_RUP 0xF9 /* Not used */477477-#define POWER_RUP 0xF8 /* Download internal */478478-479479-/* COMMAND_RUP definitions... */480480-#define COMPLETE (0x20|PRE_EMPTIVE) /* RIO->Driver Command complete */481481-#define BREAK_RECEIVED (0x21|PRE_EMPTIVE) /* RIO->Driver Break received */482482-#define MODEM_STATUS (0x22|PRE_EMPTIVE) /* RIO->Driver Modem status change */483483-484484-/* BOOT_RUP definitions... */485485-#define BOOT_REQUEST 0x00 /* RIO->Driver Request for boot */486486-#define BOOT_ABORT 0x01 /* Driver->RIO Abort a boot */487487-#define BOOT_SEQUENCE 0x02 /* Driver->RIO Packet with firmware details */488488-#define BOOT_COMPLETED 0x03 /* RIO->Driver Boot completed */489489-#define IFOAD 0x2F /* Driver->RIO Shutdown/Reboot RTA (Fall Over And Die) */490490-#define IDENTIFY 0x30 /* Driver->RIO Identify RTA */491491-#define ZOMBIE 0x31 /* Driver->RIO Shutdown/Flash LEDs */492492-#define UFOAD 0x32 /* Driver->RIO Shutdown/Reboot neighbouring RTA */493493-#define IWAIT 0x33 /* Driver->RIO Pause booting process */494494-495495-/* ROUTE_RUP definitions... */496496-#define ROUTE_REQUEST 0x00 /* RIO->Driver Request an ID */497497-#define ROUTE_FOAD 0x01 /* Driver->RIO Shutdown/reboot RTA */498498-#define ROUTE_ALREADY 0x02 /* Driver->RIO Not used */499499-#define ROUTE_USED 0x03 /* Driver->RIO Not used */500500-#define ROUTE_ALLOCATE 0x04 /* Driver->RIO Allocate RTA RUP numbers */501501-#define ROUTE_REQ_TOP 0x05 /* Driver->RIO Not used */502502-#define ROUTE_TOPOLOGY 0x06 /* RIO->Driver Route/Topology status */503503-504504-/*****************************************************************************505505-********************************** **********************************506506-********************************** OPEN **********************************507507-********************************** **********************************508508-*****************************************************************************/509509-510510-/* (Driver->RIO,in-band)511511-512512- Sent to open a port. 513513- Structure of configuration info used with OPEN, CONFIG and MOPEN packets... */514514-515515-#define PKT_Cmd (PKT_Data+0) /* Command code */516516-#define PKT_Cor1 (PKT_Data+1) /* Channel Option Register 1 */517517-#define PKT_Cor2 (PKT_Data+2) /* Channel Option Register 2 */518518-#define PKT_Cor4 (PKT_Data+3) /* Channel Option Register 4 */519519-#define PKT_Cor5 (PKT_Data+4) /* Channel Option Register 5 */520520-#define PKT_TxXon (PKT_Data+5) /* Transmit XON character */521521-#define PKT_TxXoff (PKT_Data+6) /* Transmit XOFF character */522522-#define PKT_RxXon (PKT_Data+7) /* Receive XON character */523523-#define PKT_RxXoff (PKT_Data+8) /* Receive XOFF character */524524-#define PKT_Lnext (PKT_Data+9) /* Lnext character */525525-#define PKT_TxBaud (PKT_Data+10) /* Transmit baud rate */526526-#define PKT_RxBaud (PKT_Data+11) /* Receive baud rate */527527-528528-/* COR1 definitions... */529529-#define COR1_PARITY 0xE0 /* Parity mask */530530-#define COR1_NONE 0x00 /* No parity */531531-#define COR1_SPACE 0x20 /* Space parity */532532-#define COR1_EVEN 0x40 /* Even parity */533533-#define COR1_MARK 0xA0 /* Mark parity */534534-#define COR1_ODD 0xC0 /* Odd parity */535535-536536-#define COR1_STOPBITS 0x0C /* Stop bits mask */537537-#define COR1_STOP1 0x00 /* 1 stop bit */538538-#define COR1_STOP1_5 0x04 /* 1.5 stop bits */539539-#define COR1_STOP2 0x08 /* 2 stop bits */540540-541541-#define COR1_DATABITS 0x03 /* Data bits mask */542542-#define COR1_DATA5 0x00 /* 5 data bits */543543-#define COR1_DATA6 0x01 /* 6 data bits */544544-#define COR1_DATA7 0x02 /* 7 data bits */545545-#define COR1_DATA8 0x03 /* 8 data bits */546546-547547-/* COR2 definitions... */548548-#define COR2_XON_TXFLOW 0x40 /* XON/XOFF Transmit Flow */549549-#define COR2_XANY_TXFLOW 0xC0 /* XON/XANY Transmit Flow */550550-#define COR2_HUPCL 0x20 /* Hang Up On Close */551551-#define COR2_DSR_TXFLOW 0x08 /* DSR Transmit Flow Control */552552-#define COR2_RTS_RXFLOW 0x04 /* RTS Receive Flow Control */553553-#define COR2_CTS_TXFLOW 0x02 /* CTS Transmit Flow Control */554554-#define COR2_XON_RXFLOW 0x01 /* XON/XOFF Receive Flow */555555-556556-/* COR4 definition... */557557-#define COR4_IGNCR 0x80 /* Discard received CR */558558-#define COR4_ICRNL 0x40 /* Map received CR -> NL */559559-#define COR4_INLCR 0x20 /* Map received NL -> CR */560560-#define COR4_IGNBRK 0x10 /* Ignore Received Break */561561-#define COR4_NBRKINT 0x08 /* No interrupt on rx Break */562562-#define COR4_IGNPAR 0x04 /* ignore rx parity error chars */563563-#define COR4_PARMRK 0x02 /* Mark rx parity error chars */564564-#define COR4_RAISEMOD 0x01 /* Raise modem lines on !0 baud */565565-566566-/* COR5 definitions... */567567-#define COR5_ISTRIP 0x80 /* Strip input chars to 7 bits */568568-#define COR5_LNE 0x40 /* Enable LNEXT processing */569569-#define COR5_CMOE 0x20 /* Match good & error characters */570570-#define COR5_TAB3 0x10 /* TAB3 mode */571571-#define COR5_TSTATE_ON 0x08 /* Enable tbusy/tstop monitoring */572572-#define COR5_TSTATE_OFF 0x04 /* Disable tbusy/tstop monitoring */573573-#define COR5_ONLCR 0x02 /* NL -> CR NL on output */574574-#define COR5_OCRNL 0x01 /* CR -> NL on output */575575-576576-/* RxBaud and TxBaud definitions... */577577-#define RIO_B0 0x00 /* RTS / DTR signals dropped */578578-#define RIO_B50 0x01 /* 50 baud */579579-#define RIO_B75 0x02 /* 75 baud */580580-#define RIO_B110 0x03 /* 110 baud */581581-#define RIO_B134 0x04 /* 134.5 baud */582582-#define RIO_B150 0x05 /* 150 baud */583583-#define RIO_B200 0x06 /* 200 baud */584584-#define RIO_B300 0x07 /* 300 baud */585585-#define RIO_B600 0x08 /* 600 baud */586586-#define RIO_B1200 0x09 /* 1200 baud */587587-#define RIO_B1800 0x0A /* 1800 baud */588588-#define RIO_B2400 0x0B /* 2400 baud */589589-#define RIO_B4800 0x0C /* 4800 baud */590590-#define RIO_B9600 0x0D /* 9600 baud */591591-#define RIO_B19200 0x0E /* 19200 baud */592592-#define RIO_B38400 0x0F /* 38400 baud */593593-#define RIO_B56000 0x10 /* 56000 baud */594594-#define RIO_B57600 0x11 /* 57600 baud */595595-#define RIO_B64000 0x12 /* 64000 baud */596596-#define RIO_B115200 0x13 /* 115200 baud */597597-#define RIO_B2000 0x14 /* 2000 baud */598598-599599-/*****************************************************************************600600-********************************* *********************************601601-********************************* CONFIG *********************************602602-********************************* *********************************603603-*****************************************************************************/604604-605605-/* (Driver->RIO,in-band)606606-607607- CONFIG is sent from the driver to configure an already opened port.608608- Packet structure is same as OPEN. */609609-610610-/*****************************************************************************611611-********************************* **********************************612612-********************************* MOPEN **********************************613613-********************************* **********************************614614-*****************************************************************************/615615-616616-/* (Driver->RIO,in-band)617617-618618- MOPEN is sent from the driver to open a port attached to a modem. (in-band)619619- Packet structure is same as OPEN. */620620-621621-/*****************************************************************************622622-********************************* **********************************623623-********************************* CLOSE **********************************624624-********************************* **********************************625625-*****************************************************************************/626626-627627-/* (Driver->RIO,in-band)628628-629629- CLOSE is sent from the driver to close a previously opened port.630630- No parameters.631631- */632632-#if 0633633-#define PKT_Cmd (PKT_Data+0) /* Command code */634634-#endif635635-/*****************************************************************************636636-********************************* *********************************637637-********************************* WFLUSH *********************************638638-********************************* *********************************639639-*****************************************************************************/640640-641641-/* (Driver->RIO,pre-emptive)642642-643643- WFLUSH is sent pre-emptively from the driver to flush the write buffers and644644- packets of a port. (pre-emptive)645645-646646- WFLUSH is also sent in-band from the driver to a port as a marker to end647647- write flushing previously started by a pre-emptive WFLUSH packet. (in-band)648648- */649649-#if 0650650-#define PKT_Cmd (PKT_Data+0) /* Command code */651651-#endif652652-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */653653-654654-/*****************************************************************************655655-********************************* *********************************656656-********************************* RFLUSH *********************************657657-********************************* *********************************658658-*****************************************************************************/659659-660660-/* (Driver->RIO,pre-emptive)661661-662662- RFLUSH is sent pre-emptively from the driver to flush the read buffers and663663- packets of a port.664664- */665665-#if 0666666-#define PKT_Cmd (PKT_Data+0) /* Command code */667667-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */668668-#endif669669-670670-/*****************************************************************************671671-********************************* *********************************672672-********************************* RESUME *********************************673673-********************************* *********************************674674-*****************************************************************************/675675-676676-/* (Driver->RIO,pre-emptive)677677-678678- RESUME is sent pre-emptively from the driver to cause a port to resume 679679- transmission of data if blocked by XOFF. (as if XON had been received)680680- */681681-#if 0682682-#define PKT_Cmd (PKT_Data+0) /* Command code */683683-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */684684-#endif685685-686686-/*****************************************************************************687687-********************************* *********************************688688-********************************* SBREAK *********************************689689-********************************* *********************************690690-*****************************************************************************/691691-692692-/* (Driver->RIO,in-band)693693-694694- SBREAK is sent in-band from the driver to a port to suspend data and start695695- break signal transmission.696696-697697- If the break delay is 0, the break signal will be acknowledged with a698698- RUP_COMMAND, COMPLETE packet and continue until an EBREAK packet is received.699699-700700- Otherwise, there is no acknowledgement and the break signal will last for the701701- specified number of mS.702702- */703703-#if 0704704-#define PKT_Cmd (PKT_Data+0) /* Command code */705705-#endif706706-#define PKT_BreakDelay (PKT_Data+1) /* Break delay in mS */707707-708708-/*****************************************************************************709709-********************************* *********************************710710-********************************* EBREAK *********************************711711-********************************* *********************************712712-*****************************************************************************/713713-714714-/* (Driver->RIO,in-band)715715-716716- EBREAK is sent in-band from the driver to a port to stop transmission of a717717- break signal.718718-719719- No parameters. */720720-721721-/*****************************************************************************722722-********************************* ********************************723723-********************************* SUSPEND ********************************724724-********************************* ********************************725725-*****************************************************************************/726726-727727-/* (Driver->RIO,pre-emptive)728728-729729- SUSPEND is sent pre-emptively from the driver to cause a port to suspend730730- transmission of data. (as if XOFF had been received)731731- */732732-#if 0733733-#define PKT_Cmd (PKT_Data+0) /* Command code */734734-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */735735-#endif736736-737737-/*****************************************************************************738738-********************************* *********************************739739-********************************* FCLOSE *********************************740740-********************************* *********************************741741-*****************************************************************************/742742-743743-/* (Driver->RIO,pre-emptive)744744-745745- FCLOSE is sent pre-emptively from the driver to force close a port.746746- A force close flushes receive and transmit queues, and also lowers all output747747- modem signals if the COR5_HUPCL (Hang Up On Close) flag is set.748748- */749749-#if 0750750-#define PKT_Cmd (PKT_Data+0) /* Command code */751751-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */752752-#endif753753-754754-/*****************************************************************************755755-********************************* *********************************756756-********************************* XPRINT *********************************757757-********************************* *********************************758758-*****************************************************************************/759759-760760-/* (Driver->RIO,in-band)761761-762762- XPRINT is sent as a normal I/O data packet except that the PKT_CMD_BIT of763763- the "len" field is set, and the first "data" byte is XPRINT.764764-765765- The I/O data in the XPRINT packet will contain the following:766766- - Transparent Print Start Sequence767767- - Transparent Print Data768768- - Transparent Print Stop Sequence.769769- */770770-#if 0771771-#define PKT_Cmd (PKT_Data+0) /* Command code */772772-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */773773-#endif774774-775775-/*****************************************************************************776776-********************************** **********************************777777-********************************** MBIS **********************************778778-********************************** **********************************779779-*****************************************************************************/780780-781781-/* (Driver->RIO,pre-emptive)782782-783783- MBIS is sent pre-emptively from the driver to set a port's modem signals.784784- */785785-#if 0786786-#define PKT_Cmd (PKT_Data+0) /* Command code */787787-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */788788-#endif789789-#define PKT_ModemSet (PKT_Data+4) /* Modem set signals mask */790790-791791-/* ModemSet definitions... */792792-#define MBIS_RTS 0x01 /* RTS modem signal */793793-#define MBIS_DTR 0x02 /* DTR modem signal */794794-795795-/*****************************************************************************796796-********************************** **********************************797797-********************************** MBIC **********************************798798-********************************** **********************************799799-*****************************************************************************/800800-801801-/* (Driver->RIO,pre-emptive)802802-803803- MBIC is sent pre-emptively from the driver to clear a port's modem signals.804804- */805805-#if 0806806-#define PKT_Cmd (PKT_Data+0) /* Command code */807807-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */808808-#endif809809-810810-#define PKT_ModemClear (PKT_Data+4) /* Modem clear signals mask */811811-812812-/* ModemClear definitions... */813813-#define MBIC_RTS 0x01 /* RTS modem signal */814814-#define MBIC_DTR 0x02 /* DTR modem signal */815815-816816-/*****************************************************************************817817-********************************** **********************************818818-********************************** MSET **********************************819819-********************************** **********************************820820-*****************************************************************************/821821-822822-/* (Driver->RIO,pre-emptive)823823-824824- MSET is sent pre-emptively from the driver to set/clear a port's modem signals. */825825-#if 0826826-#define PKT_Cmd (PKT_Data+0) /* Command code */827827-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */828828-#endif829829-830830-#define PKT_ModemSet (PKT_Data+4) /* Modem set signals mask */831831-832832-/* ModemSet definitions... */833833-#define MSET_RTS 0x01 /* RTS modem signal */834834-#define MSET_DTR 0x02 /* DTR modem signal */835835-836836-/*****************************************************************************837837-********************************* *********************************838838-********************************* PCLOSE *********************************839839-********************************* *********************************840840-*****************************************************************************/841841-842842-/* (Driver->RIO,in-band)843843-844844- PCLOSE is sent from the driver to pseudo close a previously opened port.845845-846846- The port will close when all data has been sent/received, however, the847847- port's transmit / receive and modem signals will be left enabled and the848848- port marked internally as Pseudo Closed. */849849-850850-#define PKT_Cmd (PKT_Data+0) /* Command code */851851-852852-/*****************************************************************************853853-********************************** **********************************854854-********************************** MGET **********************************855855-********************************** **********************************856856-*****************************************************************************/857857-858858-/* (Driver->RIO,pre-emptive)859859-860860- MGET is sent pre-emptively from the driver to request the port's current modem signals. */861861-862862-#define PKT_Cmd (PKT_Data+0) /* Command code */863863-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */864864-865865-/*****************************************************************************866866-********************************* ********************************867867-********************************* MEMDUMP ********************************868868-********************************* ********************************869869-*****************************************************************************/870870-871871-/* (Driver->RIO,pre-emptive)872872-873873- MEMDUMP is sent pre-emptively from the driver to request a dump of 32 bytes874874- of the specified port's RTA address space.875875- */876876-#if 0877877-#define PKT_Cmd (PKT_Data+0) /* Command code */878878-#endif879879-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */880880-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */881881-#define PKT_Address (PKT_Data+6) /* Requested address */882882-883883-/*****************************************************************************884884-****************************** *****************************885885-****************************** READ_REGISTER *****************************886886-****************************** *****************************887887-*****************************************************************************/888888-889889-/* (Driver->RIO,pre-emptive)890890-891891- READ_REGISTER is sent pre-emptively from the driver to request the contents892892- of the CD1400 register specified in address.893893- */894894-#if 0895895-#define PKT_Cmd (PKT_Data+0) /* Command code */896896-#endif897897-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */898898-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */899899-#define PKT_Address (PKT_Data+6) /* Requested address */900900-901901-/*****************************************************************************902902-************************ **************************903903-************************ COMMAND_RUP - COMPLETE **************************904904-************************ **************************905905-*****************************************************************************/906906-907907-/* (RIO->Driver,pre-emptive)908908-909909- COMMAND_RUP - COMPLETE is sent in response to all port I/O control command910910- packets, except MEMDUMP and READ_REGISTER.911911- */912912-#if 0913913-#define PKT_Cmd (PKT_Data+0) /* Command code */914914-#endif915915-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */916916-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */917917-#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */918918-#define PKT_PortStatus (PKT_Data+4) /* Port signal status */919919-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */920920-921921-/* ModemStatus definitions... */922922-#define MODEM_DSR 0x80 /* Data Set Ready modem state */923923-#define MODEM_CTS 0x40 /* Clear To Send modem state */924924-#define MODEM_RI 0x20 /* Ring Indicate modem state */925925-#define MODEM_CD 0x10 /* Carrier Detect modem state */926926-#define MODEM_TSTOP 0x08 /* Transmit Stopped state */927927-#define MODEM_TEMPTY 0x04 /* Transmit Empty state */928928-#define MODEM_DTR 0x02 /* DTR modem output state */929929-#define MODEM_RTS 0x01 /* RTS modem output state */930930-931931-/* PortStatus definitions... */932932-#define PORT_ISOPEN 0x01 /* Port open ? */933933-#define PORT_HUPCL 0x02 /* Hangup on close? */934934-#define PORT_MOPENPEND 0x04 /* Modem open pending */935935-#define PORT_ISPARALLEL 0x08 /* Parallel port */936936-#define PORT_BREAK 0x10 /* Port on break */937937-#define PORT_STATUSPEND 0020 /* Status packet pending */938938-#define PORT_BREAKPEND 0x40 /* Break packet pending */939939-#define PORT_MODEMPEND 0x80 /* Modem status packet pending */940940-941941-/*****************************************************************************942942-************************ **************************943943-************************ COMMAND_RUP - COMPLETE **************************944944-************************ **************************945945-*****************************************************************************/946946-947947-/* (RIO->Driver,pre-emptive)948948-949949- COMMAND_RUP - COMPLETE is sent in response to all port I/O control command950950- packets, except MEMDUMP and READ_REGISTER.951951- */952952-#if 0953953-#define PKT_Cmd (PKT_Data+0) /* Command code */954954-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */955955-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */956956-#endif957957-#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */958958-#define PKT_PortStatus (PKT_Data+4) /* Port signal status */959959-#if 0960960-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */961961-#endif962962-963963-/* ModemStatus definitions... */964964-#define MODEM_DSR 0x80 /* Data Set Ready modem state */965965-#define MODEM_CTS 0x40 /* Clear To Send modem state */966966-#define MODEM_RI 0x20 /* Ring Indicate modem state */967967-#define MODEM_CD 0x10 /* Carrier Detect modem state */968968-#define MODEM_TSTOP 0x08 /* Transmit Stopped state */969969-#define MODEM_TEMPTY 0x04 /* Transmit Empty state */970970-#define MODEM_DTR 0x02 /* DTR modem output state */971971-#define MODEM_RTS 0x01 /* RTS modem output state */972972-973973-/* PortStatus definitions... */974974-#define PORT_ISOPEN 0x01 /* Port open ? */975975-#define PORT_HUPCL 0x02 /* Hangup on close? */976976-#define PORT_MOPENPEND 0x04 /* Modem open pending */977977-#define PORT_ISPARALLEL 0x08 /* Parallel port */978978-#define PORT_BREAK 0x10 /* Port on break */979979-#define PORT_STATUSPEND 0020 /* Status packet pending */980980-#define PORT_BREAKPEND 0x40 /* Break packet pending */981981-#define PORT_MODEMPEND 0x80 /* Modem status packet pending */982982-983983-/*****************************************************************************984984-******************** ********************985985-******************** COMMAND_RUP - COMPLETE - MEMDUMP ********************986986-******************** ********************987987-*****************************************************************************/988988-989989-/* (RIO->Driver,pre-emptive)990990-991991- COMMAND_RUP - COMPLETE - MEMDUMP is sent as an acknowledgement for a MEMDUMP992992- port I/O control command packet.993993- */994994-#if 0995995-#define PKT_Cmd (PKT_Data+0) /* Command code */996996-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */997997-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */998998-#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */999999-#define PKT_PortStatus (PKT_Data+4) /* Port signal status */10001000-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */10011001-#define PKT_Address (PKT_Data+6) /* Requested address */10021002-#endif10031003-#define PKT_Dump (PKT_Data+8) /* 32bytes of requested dump data */10041004-10051005-/*****************************************************************************10061006-***************** *****************10071007-***************** COMMAND_RUP - COMPLETE - READ_REGISTER *****************10081008-***************** *****************10091009-*****************************************************************************/10101010-10111011-/* (RIO->Driver,pre-emptive)10121012-10131013- COMMAND_RUP - COMPLETE - READ_REGISTER is sent as an acknowledgement for a10141014- READ_REGISTER port I/O control command packet.10151015- */10161016-#if 010171017-#define PKT_Cmd (PKT_Data+0) /*Command code */10181018-#define PKT_PhbNum (PKT_Data+1) /*Port number wrt RTA */10191019-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */10201020-#endif10211021-#define PKT_RegisterValue (PKT_Data+3) /* Modem signal status */10221022-#if 010231023-#define PKT_PortStatus (PKT_Data+4) /* Port signal status */10241024-#define PKT_SubCmd (PKT_Data+5) /* Sub Command */10251025-#endif10261026-10271027-/*****************************************************************************10281028-********************* ***********************10291029-********************* COMMAND_RUP - BREAK_RECEIVED ***********************10301030-********************* ***********************10311031-*****************************************************************************/10321032-10331033-/* (RIO->Driver,pre-emptive)10341034-10351035- COMMAND_RUP - BREAK_RECEIVED packets are sent when the port detects a receive BREAK signal.10361036- */10371037-#if 010381038-#define PKT_Cmd (PKT_Data+0) /* Command code */10391039-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */10401040-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */10411041-#endif10421042-10431043-/*****************************************************************************10441044-********************* *************************10451045-********************* COMMAND_RUP - MODEM_STATUS *************************10461046-********************* *************************10471047-*****************************************************************************/10481048-10491049-/* (RIO->Driver,pre-emptive)10501050-10511051- COMMAND_RUP - MODEM_STATUS packets are sent whenever the port detects a10521052- change in the input modem signal states.10531053-10541054- */10551055-#if 010561056-#define PKT_Cmd (PKT_Data+0) /* Command code */10571057-#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */10581058-#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */10591059-#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */10601060-#endif10611061-10621062-/*****************************************************************************10631063-************************ *************************10641064-************************ BOOT_RUP - BOOT_REQUEST *************************10651065-************************ *************************10661066-*****************************************************************************/10671067-10681068-/* (RIO->Driver,pre-emptive)10691069-10701070- BOOT_RUP - BOOT_REQUEST packets are sent to the Driver from RIO to request10711071- firmware code to load onto attached RTAs.10721072- */10731073-#if 010741074-#define PKT_Cmd (PKT_Data+0) /* Command code */10751075-#endif10761076-10771077-/*****************************************************************************10781078-************************ ************************10791079-************************ BOOT_RUP - BOOT_SEQUENCE ************************10801080-************************ ************************10811081-*****************************************************************************/10821082-10831083-/* (Driver->RIO,pre-emptive)10841084-10851085- BOOT_RUP - BOOT_SEQUENCE packets are sent from the Driver to RIO in response10861086- to a BOOT_RUP - BOOT_REQUEST packet.10871087- */10881088-#if 010891089-#define PKT_Cmd (PKT_Data+0) /* Command code */10901090-#endif10911091-#define PKT_NumPackets (PKT_Data+2) /* Packets required to load firmware */10921092-#define PKT_LoadBase (PKT_Data+4) /* RTA firmware load address */10931093-#define PKT_CodeSize (PKT_Data+6) /* Size of firmware in bytes */10941094-#define PKT_CmdString (PKT_Data+8) /* Command string */10951095-10961096-/*****************************************************************************10971097-************************ ***********************10981098-************************ BOOT_RUP - BOOT_COMPLETED ***********************10991099-************************ ***********************11001100-*****************************************************************************/11011101-11021102-/* (RIO->Driver,pre-emptive)11031103-11041104- BOOT_RUP - BOOT_COMPLETE is sent to the Driver from RIO when downloading of11051105- RTA firmware has completed.11061106- */11071107-#if 011081108-#define PKT_Cmd (PKT_Data+0) /* Command code */11091109-#endif11101110-#define PKT_LinkNumber (PKT_Data+1) /* Link number RTA booted on */11111111-#define PKT_SerialNumber (PKT_Data+2) /* 4 byte serial number */11121112-11131113-/*****************************************************************************11141114-************************ ***********************11151115-************************ BOOT_RUP - Packet Request ***********************11161116-************************ ***********************11171117-*****************************************************************************/11181118-11191119-/* (RIO->Driver,pre-emptive)11201120-11211121- BOOT_RUP packet without the PKT_CMD_BIT set in the PKT->len field is sent11221122- from RIO to the Driver as a request for a firmware boot packet. */11231123-11241124-#define PKT_SequenceNumber (PKT_Data+0) /* Packet sequence number */11251125-11261126-/*****************************************************************************11271127-*********************** ***********************11281128-*********************** BOOT_RUP - Packet Response ***********************11291129-*********************** ***********************11301130-*****************************************************************************/11311131-11321132-/* (Driver->RIO,pre-emptive)11331133-11341134- In response to a BOOT_RUP boot packet request, the driver fills out the response11351135- packet with the 70 bytes of the requested sequence.11361136- */11371137-#if 011381138-#define PKT_SequenceNumber (PKT_Data+0) /* Packet sequence number */11391139-#endif11401140-#define PKT_FirmwarePacket (PKT_Data+2) /* Firmware packet */11411141-11421142-/*****************************************************************************11431143-**************************** ****************************11441144-**************************** BOOT_RUP - IFOAD ****************************11451145-**************************** ****************************11461146-*****************************************************************************/11471147-11481148-/* (Driver->RIO,pre-emptive)11491149-11501150- BOOT_RUP - IFOAD packets are sent from the Driver to an RTA to cause the11511151- RTA to shut down and reboot.11521152- */11531153-#if 011541154-#define PKT_Cmd (PKT_Data+0) /* Command code */11551155-#endif11561156-#define PKT_IfoadId1 (PKT_Data+2) /* IFOAD Id 1 */11571157-#define PKT_IfoadId2 (PKT_Data+3) /* IFOAD Id 2 */11581158-11591159-#define IFOADID1 0xAD11601160-#define IFOADID2 0xF011611161-11621162-/*****************************************************************************11631163-************************** ***************************11641164-************************** BOOT_RUP - IDENTIFY ***************************11651165-************************** ***************************11661166-*****************************************************************************/11671167-11681168-/* (Driver->RIO,pre-emptive)11691169-11701170- BOOT_RUP - IDENTIFY packets are sent from the Driver to an RTA to cause the11711171- RTA to flash its LEDs for a period of time.11721172- */11731173-#if 011741174-#define PKT_Cmd (PKT_Data+0) /* Command code */11751175-#endif11761176-#define PKT_IdentifyId (PKT_Data+2) /* defines pattern to flash */11771177-11781178-/*****************************************************************************11791179-**************************** ***************************11801180-**************************** BOOT_RUP - ZOMBIE ***************************11811181-**************************** ***************************11821182-*****************************************************************************/11831183-11841184-/* (Driver->RIO,pre-emptive)11851185-11861186- BOOT_RUP - ZOMBIE packets are sent from the Driver to an RTA to cause the11871187- RTA to shut down and flash it's LEDs.11881188- */11891189-#if 011901190-#define PKT_Cmd (PKT_Data+0) /* Command code */11911191-#endif11921192-#define PKT_ZombieId1 (PKT_Data+2) /* ZOMBIE Id 1 */11931193-#define PKT_ZombieId2 (PKT_Data+3) /* ZOMBIE Id 2 */11941194-11951195-#define ZOMBIEID1 0x5211961196-#define ZOMBIEID2 0x2111971197-11981198-/*****************************************************************************11991199-**************************** ****************************12001200-**************************** BOOT_RUP - UFOAD ****************************12011201-**************************** ****************************12021202-*****************************************************************************/12031203-12041204-/* (Driver->RIO,pre-emptive)12051205-12061206- BOOT_RUP - UFOAD packets are sent from the Driver to an RTA to cause the RTA12071207- to ask it's neighbouring RTA to shut down and reboot.12081208- */12091209-#if 012101210-#define PKT_Cmd (PKT_Data+0) /* Command code */12111211-#define PKT_LinkNumber (PKT_Data+1) /* Link number of RTA to UFOAD */12121212-#endif12131213-#define PKT_UfoadId1 (PKT_Data+2) /* UFOAD Id 1 */12141214-#define PKT_UfoadId2 (PKT_Data+3) /* UFOAD Id 2 */12151215-12161216-#define UFOADID1 0x1E12171217-#define UFOADID2 0x0D12181218-12191219-/*****************************************************************************12201220-**************************** ****************************12211221-**************************** BOOT_RUP - IWAIT ****************************12221222-**************************** ****************************12231223-*****************************************************************************/12241224-12251225-/* (Driver->RIO,pre-emptive)12261226-12271227- BOOT_RUP - IWAIT packets are sent from the Driver to an RTA to cause the RTA12281228- to pause booting on the specified link for 30 seconds.12291229- */12301230-#if 012311231-#define PKT_Cmd (PKT_Data+0) /* Command code */12321232-#define PKT_LinkNumber (PKT_Data+1) /* Link number of RTA to UFOAD */12331233-#endif12341234-#define PKT_IwaitId1 (PKT_Data+2) /* IWAIT Id 1 */12351235-#define PKT_IwaitId2 (PKT_Data+3) /* IWAIT Id 2 */12361236-12371237-#define IWAITID1 0xDE12381238-#define IWAITID2 0xB112391239-12401240-/*****************************************************************************12411241-************************ ***********************12421242-************************ ROUTE_RUP - ROUTE_REQUEST ***********************12431243-************************ ***********************12441244-*****************************************************************************/12451245-12461246-/* (RIO->Driver,pre-emptive)12471247-12481248- ROUTE_RUP - ROUTE_REQUEST packets are sent from a newly booted or connected12491249- RTA to a Driver to request an ID (RUP or unit number).12501250- */12511251-#if 012521252-#define PKT_Cmd (PKT_Data+0) /* Command code */12531253-#endif12541254-#define PKT_SerialNumber (PKT_Data+2) /* 4 byte serial number */12551255-#define PKT_ModuleTypes (PKT_Data+6) /* RTA Module types */12561256-12571257-/* ModuleTypes definitions... */12581258-#define MOD_BLANK 0x0F /* Blank plate attached */12591259-#define MOD_RS232DB25 0x00 /* RS232 DB25 connector */12601260-#define MOD_RS232RJ45 0x01 /* RS232 RJ45 connector */12611261-#define MOD_RS422DB25 0x02 /* RS422 DB25 connector */12621262-#define MOD_RS485DB25 0x03 /* RS485 DB25 connector */12631263-#define MOD_PARALLEL 0x04 /* Centronics parallel */12641264-12651265-#define MOD2 0x08 /* Set to indicate Rev2 module */12661266-12671267-/*****************************************************************************12681268-************************* *************************12691269-************************* ROUTE_RUP - ROUTE_FOAD *************************12701270-************************* *************************12711271-*****************************************************************************/12721272-12731273-/* (Driver->RIO,pre-emptive)12741274-12751275- ROUTE_RUP - ROUTE_FOAD packet is sent as a response to a ROUTE_RUP - ROUTE_REQUEST12761276- packet to cause the RTA to "Fall Over And Die"., i.e. shutdown and reboot.12771277- */12781278-#if 012791279-#define PKT_Cmd (PKT_Data+0) /* Command code */12801280-#endif12811281-#define PKT_RouteCmdString (PKT_Data+2) /* Command string */12821282-12831283-/*****************************************************************************12841284-*********************** ***********************12851285-*********************** ROUTE_RUP - ROUTE_ALLOCATE ***********************12861286-*********************** ***********************12871287-*****************************************************************************/12881288-12891289-/* (Driver->RIO,pre-emptive)12901290-12911291- ROUTE_RUP - ROUTE_ALLOCATE packet is sent as a response to a ROUTE_RUP - ROUTE_REQUEST12921292- packet to allocate the RTA's Id number (RUP number 1..16)12931293- */12941294-#if 012951295-#define PKT_Cmd (PKT_Data+0) /* Command code */12961296-#endif12971297-#define PKT_IdNum (PKT_Data+1) /* RUP number for ports 1..8 */12981298-#if 012991299-#define PKT_RouteCmdString (PKT_Data+2) /* Command string */13001300-#endif13011301-#define PKT_IdNum2 (PKT_Data+0x17) /* RUP number for ports 9..16 */13021302-13031303-/*****************************************************************************13041304-*********************** ***********************13051305-*********************** ROUTE_RUP - ROUTE_TOPOLOGY ***********************13061306-*********************** ***********************13071307-*****************************************************************************/13081308-13091309-/* (RIO->Driver,pre-emptive)13101310-13111311- ROUTE_RUP - ROUTE_TOPOLOGY packet is sent to inform the driver of an RTA's13121312- current link status.13131313- */13141314-#if 013151315-#define PKT_Cmd (PKT_Data+0) /* Command code */13161316-#endif13171317-#define PKT_Link1Rup (PKT_Data+2) /* Link 1 RUP number */13181318-#define PKT_Link1Link (PKT_Data+3) /* Link 1 link number */13191319-#define PKT_Link2Rup (PKT_Data+4) /* Link 2 RUP number */13201320-#define PKT_Link2Link (PKT_Data+5) /* Link 2 link number */13211321-#define PKT_Link3Rup (PKT_Data+6) /* Link 3 RUP number */13221322-#define PKT_Link3Link (PKT_Data+7) /* Link 3 link number */13231323-#define PKT_Link4Rup (PKT_Data+8) /* Link 4 RUP number */13241324-#define PKT_Link4Link (PKT_Data+9) /* Link 4 link number */13251325-#define PKT_RtaVpdProm (PKT_Data+10) /* 32 bytes of RTA VPD PROM Contents */13261326-13271327-#endif /* _sxwinif_h */13281328-13291329-/* End of RIOWINIF.H */