[PATCH] rio: more header cleanup
Strip some of the typedef mess out Remove a small subset of unused defines and the like. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
10e705f83c
commit
74769abfcb
10 changed files with 242 additions and 399 deletions
|
@ -33,10 +33,6 @@
|
||||||
#ifndef __rio_board_h__
|
#ifndef __rio_board_h__
|
||||||
#define __rio_board_h__
|
#define __rio_board_h__
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
static char *_board_h_sccs_ = "@(#)board.h 1.2";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** board.h contains the definitions for the *hardware* of the host cards.
|
** board.h contains the definitions for the *hardware* of the host cards.
|
||||||
** It describes the memory overlay for the dual port RAM area.
|
** It describes the memory overlay for the dual port RAM area.
|
||||||
|
@ -53,29 +49,29 @@ static char *_board_h_sccs_ = "@(#)board.h 1.2";
|
||||||
** The shape of the Host Control area, at offset 0x7C00, Write Only
|
** The shape of the Host Control area, at offset 0x7C00, Write Only
|
||||||
*/
|
*/
|
||||||
struct s_Ctrl {
|
struct s_Ctrl {
|
||||||
BYTE DpCtl; /* 7C00 */
|
u8 DpCtl; /* 7C00 */
|
||||||
BYTE Dp_Unused2_[127];
|
u8 Dp_Unused2_[127];
|
||||||
BYTE DpIntSet; /* 7C80 */
|
u8 DpIntSet; /* 7C80 */
|
||||||
BYTE Dp_Unused3_[127];
|
u8 Dp_Unused3_[127];
|
||||||
BYTE DpTpuReset; /* 7D00 */
|
u8 DpTpuReset; /* 7D00 */
|
||||||
BYTE Dp_Unused4_[127];
|
u8 Dp_Unused4_[127];
|
||||||
BYTE DpIntReset; /* 7D80 */
|
u8 DpIntReset; /* 7D80 */
|
||||||
BYTE Dp_Unused5_[127];
|
u8 Dp_Unused5_[127];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The PROM data area on the host (0x7C00), Read Only
|
** The PROM data area on the host (0x7C00), Read Only
|
||||||
*/
|
*/
|
||||||
struct s_Prom {
|
struct s_Prom {
|
||||||
WORD DpSlxCode[2];
|
u16 DpSlxCode[2];
|
||||||
WORD DpRev;
|
u16 DpRev;
|
||||||
WORD Dp_Unused6_;
|
u16 Dp_Unused6_;
|
||||||
WORD DpUniq[4];
|
u16 DpUniq[4];
|
||||||
WORD DpJahre;
|
u16 DpJahre;
|
||||||
WORD DpWoche;
|
u16 DpWoche;
|
||||||
WORD DpHwFeature[5];
|
u16 DpHwFeature[5];
|
||||||
WORD DpOemId;
|
u16 DpOemId;
|
||||||
WORD DpSiggy[16];
|
u16 DpSiggy[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -90,19 +86,19 @@ union u_CtrlProm { /* This is the control/PROM area (0x7C00) */
|
||||||
** The top end of memory!
|
** The top end of memory!
|
||||||
*/
|
*/
|
||||||
struct s_ParmMapS { /* Area containing Parm Map Pointer */
|
struct s_ParmMapS { /* Area containing Parm Map Pointer */
|
||||||
BYTE Dp_Unused8_[DP_PARMMAP_ADDR];
|
u8 Dp_Unused8_[DP_PARMMAP_ADDR];
|
||||||
WORD DpParmMapAd;
|
u16 DpParmMapAd;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct s_StartUpS {
|
struct s_StartUpS {
|
||||||
BYTE Dp_Unused9_[DP_STARTUP_ADDR];
|
u8 Dp_Unused9_[DP_STARTUP_ADDR];
|
||||||
BYTE Dp_LongJump[0x4];
|
u8 Dp_LongJump[0x4];
|
||||||
BYTE Dp_Unused10_[2];
|
u8 Dp_Unused10_[2];
|
||||||
BYTE Dp_ShortJump[0x2];
|
u8 Dp_ShortJump[0x2];
|
||||||
};
|
};
|
||||||
|
|
||||||
union u_Sram2ParmMap { /* This is the top of memory (0x7E00-0x7FFF) */
|
union u_Sram2ParmMap { /* This is the top of memory (0x7E00-0x7FFF) */
|
||||||
BYTE DpSramMem[DP_SRAM2_SIZE];
|
u8 DpSramMem[DP_SRAM2_SIZE];
|
||||||
struct s_ParmMapS DpParmMapS;
|
struct s_ParmMapS DpParmMapS;
|
||||||
struct s_StartUpS DpStartUpS;
|
struct s_StartUpS DpStartUpS;
|
||||||
};
|
};
|
||||||
|
@ -111,11 +107,11 @@ union u_Sram2ParmMap { /* This is the top of memory (0x7E00-0x7FFF) */
|
||||||
** This is the DP RAM overlay.
|
** This is the DP RAM overlay.
|
||||||
*/
|
*/
|
||||||
struct DpRam {
|
struct DpRam {
|
||||||
BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
|
u8 DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
|
||||||
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
|
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
|
||||||
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
|
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
|
||||||
BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */
|
u8 DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */
|
||||||
BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
|
u8 DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DpControl DpCtrlProm.DpCtrl.DpCtl
|
#define DpControl DpCtrlProm.DpCtrl.DpCtl
|
||||||
|
|
|
@ -55,24 +55,24 @@ static char *_cmdpkt_h_sccs_ = "@(#)cmdpkt.h 1.2";
|
||||||
** at Data[2] in the actual pkt!
|
** at Data[2] in the actual pkt!
|
||||||
*/
|
*/
|
||||||
struct BootSequence {
|
struct BootSequence {
|
||||||
WORD NumPackets;
|
u16 NumPackets;
|
||||||
WORD LoadBase;
|
u16 LoadBase;
|
||||||
WORD CodeSize;
|
u16 CodeSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BOOT_SEQUENCE_LEN 8
|
#define BOOT_SEQUENCE_LEN 8
|
||||||
|
|
||||||
struct SamTop {
|
struct SamTop {
|
||||||
BYTE Unit;
|
u8 Unit;
|
||||||
BYTE Link;
|
u8 Link;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CmdHdr {
|
struct CmdHdr {
|
||||||
BYTE PcCommand;
|
u8 PcCommand;
|
||||||
union {
|
union {
|
||||||
BYTE PcPhbNum;
|
u8 PcPhbNum;
|
||||||
BYTE PcLinkNum;
|
u8 PcLinkNum;
|
||||||
BYTE PcIDNum;
|
u8 PcIDNum;
|
||||||
} U0;
|
} U0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,28 +84,28 @@ struct PktCmd {
|
||||||
struct BootSequence PcBootSequence;
|
struct BootSequence PcBootSequence;
|
||||||
} S1;
|
} S1;
|
||||||
struct {
|
struct {
|
||||||
WORD PcSequence;
|
u16 PcSequence;
|
||||||
BYTE PcBootData[RTA_BOOT_DATA_SIZE];
|
u8 PcBootData[RTA_BOOT_DATA_SIZE];
|
||||||
} S2;
|
} S2;
|
||||||
struct {
|
struct {
|
||||||
WORD __crud__;
|
u16 __crud__;
|
||||||
BYTE PcUniqNum[4]; /* this is really a uint. */
|
u8 PcUniqNum[4]; /* this is really a uint. */
|
||||||
BYTE PcModuleTypes; /* what modules are fitted */
|
u8 PcModuleTypes; /* what modules are fitted */
|
||||||
} S3;
|
} S3;
|
||||||
struct {
|
struct {
|
||||||
struct CmdHdr CmdHdr;
|
struct CmdHdr CmdHdr;
|
||||||
BYTE __undefined__;
|
u8 __undefined__;
|
||||||
BYTE PcModemStatus;
|
u8 PcModemStatus;
|
||||||
BYTE PcPortStatus;
|
u8 PcPortStatus;
|
||||||
BYTE PcSubCommand; /* commands like mem or register dump */
|
u8 PcSubCommand; /* commands like mem or register dump */
|
||||||
WORD PcSubAddr; /* Address for command */
|
u16 PcSubAddr; /* Address for command */
|
||||||
BYTE PcSubData[64]; /* Date area for command */
|
u8 PcSubData[64]; /* Date area for command */
|
||||||
} S4;
|
} S4;
|
||||||
struct {
|
struct {
|
||||||
struct CmdHdr CmdHdr;
|
struct CmdHdr CmdHdr;
|
||||||
BYTE PcCommandText[1];
|
u8 PcCommandText[1];
|
||||||
BYTE __crud__[20];
|
u8 __crud__[20];
|
||||||
BYTE PcIDNum2; /* It had to go somewhere! */
|
u8 PcIDNum2; /* It had to go somewhere! */
|
||||||
} S5;
|
} S5;
|
||||||
struct {
|
struct {
|
||||||
struct CmdHdr CmdHdr;
|
struct CmdHdr CmdHdr;
|
||||||
|
|
|
@ -37,38 +37,9 @@
|
||||||
#ifndef _link_h
|
#ifndef _link_h
|
||||||
#define _link_h 1
|
#define _link_h 1
|
||||||
|
|
||||||
#ifndef lint
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
/* static char *_rio_link_h_sccs = "@(#)link.h 1.15"; */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Define the Link Status stuff
|
* Define the Link Status stuff
|
||||||
************************************************/
|
************************************************/
|
||||||
#define LRT_ACTIVE ((ushort) 0x01)
|
|
||||||
#define LRT_SPARE1 ((ushort) 0x02)
|
|
||||||
#define INTRO_RCVD ((ushort) 0x04)
|
|
||||||
#define FORCED_DISCONNECT ((ushort) 0x08)
|
|
||||||
#define LRT_SPARE2 ((ushort) 0x80)
|
|
||||||
|
|
||||||
#define TOP_OF_RTA_RAM ((ushort) 0x7000)
|
|
||||||
#define HOST_SERIAL_POINTER (unsigned char **) (TOP_OF_RTA_RAM - 2 * sizeof (ushort))
|
|
||||||
|
|
||||||
/* Flags for ltt_status */
|
|
||||||
#define WAITING_ACK (ushort) 0x0001
|
|
||||||
#define DATA_SENT (ushort) 0x0002
|
|
||||||
#define WAITING_RUP (ushort) 0x0004
|
|
||||||
#define WAITING_RETRY (ushort) 0x0008
|
|
||||||
#define WAITING_TOPOLOGY (ushort) 0x0010
|
|
||||||
#define SEND_SYNC (ushort) 0x0020
|
|
||||||
#define FOAD_THIS_LINK (ushort) 0x0040
|
|
||||||
#define REQUEST_SYNC (ushort) 0x0080
|
|
||||||
#define REMOTE_DYING (ushort) 0x0100
|
|
||||||
#define DIE_NOW (ushort) 0x0200
|
|
||||||
|
|
||||||
/* Boot request stuff */
|
/* Boot request stuff */
|
||||||
#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
|
#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
|
||||||
#define BOOT_ABORT ((ushort) 1) /* Abort a boot */
|
#define BOOT_ABORT ((ushort) 1) /* Abort a boot */
|
||||||
|
@ -76,56 +47,27 @@
|
||||||
and load address */
|
and load address */
|
||||||
#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */
|
#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */
|
||||||
|
|
||||||
/* States that a link can be in */
|
|
||||||
#define LINK_DISCONNECTED ((ushort) 0) /* Disconnected */
|
|
||||||
#define LINK_BOOT1 ((ushort) 1) /* Trying to send 1st stage boot */
|
|
||||||
#define LINK_BOOT2 ((ushort) 2) /* Trying to send 2nd stage boot */
|
|
||||||
#define LINK_BOOT2WAIT ((ushort) 3) /* Waiting for selftest results */
|
|
||||||
#define LINK_BOOT3 ((ushort) 4) /* Trying to send 3rd stage boots */
|
|
||||||
#define LINK_SYNC ((ushort) 5) /* Syncing */
|
|
||||||
|
|
||||||
#define LINK_INTRO ((ushort) 10) /* Introductory packet */
|
|
||||||
#define LINK_SUPPLYID ((ushort) 11) /* Trying to supply an ID */
|
|
||||||
#define LINK_TOPOLOGY ((ushort) 12) /* Send a topology update */
|
|
||||||
#define LINK_REQUESTID ((ushort) 13) /* Waiting for an ID */
|
|
||||||
#define LINK_CONNECTED ((ushort) 14) /* Connected */
|
|
||||||
|
|
||||||
#define LINK_INTERCONNECT ((ushort) 20) /* Subnets interconnected */
|
|
||||||
|
|
||||||
#define LINK_SPARE ((ushort) 40)
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Set the default timeout for link communications.
|
|
||||||
*/
|
|
||||||
#define LINKTIMEOUT (400 * MILLISECOND)
|
|
||||||
|
|
||||||
/*
|
|
||||||
** LED stuff
|
|
||||||
*/
|
|
||||||
#define LED_SET_COLOUR(colour)
|
|
||||||
#define LED_OR_COLOUR(colour)
|
|
||||||
#define LED_TIMEOUT(time)
|
|
||||||
|
|
||||||
struct LPB {
|
struct LPB {
|
||||||
WORD link_number; /* Link Number */
|
u16 link_number; /* Link Number */
|
||||||
Channel_ptr in_ch; /* Link In Channel */
|
Channel_ptr in_ch; /* Link In Channel */
|
||||||
Channel_ptr out_ch; /* Link Out Channel */
|
Channel_ptr out_ch; /* Link Out Channel */
|
||||||
BYTE attached_serial[4]; /* Attached serial number */
|
u8 attached_serial[4]; /* Attached serial number */
|
||||||
BYTE attached_host_serial[4];
|
u8 attached_host_serial[4];
|
||||||
/* Serial number of Host who
|
/* Serial number of Host who
|
||||||
booted the other end */
|
booted the other end */
|
||||||
WORD descheduled; /* Currently Descheduled */
|
u16 descheduled; /* Currently Descheduled */
|
||||||
WORD state; /* Current state */
|
u16 state; /* Current state */
|
||||||
WORD send_poll; /* Send a Poll Packet */
|
u16 send_poll; /* Send a Poll Packet */
|
||||||
Process_ptr ltt_p; /* Process Descriptor */
|
Process_ptr ltt_p; /* Process Descriptor */
|
||||||
Process_ptr lrt_p; /* Process Descriptor */
|
Process_ptr lrt_p; /* Process Descriptor */
|
||||||
WORD lrt_status; /* Current lrt status */
|
u16 lrt_status; /* Current lrt status */
|
||||||
WORD ltt_status; /* Current ltt status */
|
u16 ltt_status; /* Current ltt status */
|
||||||
WORD timeout; /* Timeout value */
|
u16 timeout; /* Timeout value */
|
||||||
WORD topology; /* Topology bits */
|
u16 topology; /* Topology bits */
|
||||||
WORD mon_ltt;
|
u16 mon_ltt;
|
||||||
WORD mon_lrt;
|
u16 mon_lrt;
|
||||||
WORD WaitNoBoot; /* Secs to hold off booting */
|
u16 WaitNoBoot; /* Secs to hold off booting */
|
||||||
PKT_ptr add_packet_list; /* Add packets to here */
|
PKT_ptr add_packet_list; /* Add packets to here */
|
||||||
PKT_ptr remove_packet_list; /* Send packets from here */
|
PKT_ptr remove_packet_list; /* Send packets from here */
|
||||||
|
|
||||||
|
@ -136,17 +78,17 @@ struct LPB {
|
||||||
struct RUP rup;
|
struct RUP rup;
|
||||||
struct RUP link_rup; /* RUP for the link (POLL,
|
struct RUP link_rup; /* RUP for the link (POLL,
|
||||||
topology etc.) */
|
topology etc.) */
|
||||||
WORD attached_link; /* Number of attached link */
|
u16 attached_link; /* Number of attached link */
|
||||||
WORD csum_errors; /* csum errors */
|
u16 csum_errors; /* csum errors */
|
||||||
WORD num_disconnects; /* number of disconnects */
|
u16 num_disconnects; /* number of disconnects */
|
||||||
WORD num_sync_rcvd; /* # sync's received */
|
u16 num_sync_rcvd; /* # sync's received */
|
||||||
WORD num_sync_rqst; /* # sync requests */
|
u16 num_sync_rqst; /* # sync requests */
|
||||||
WORD num_tx; /* Num pkts sent */
|
u16 num_tx; /* Num pkts sent */
|
||||||
WORD num_rx; /* Num pkts received */
|
u16 num_rx; /* Num pkts received */
|
||||||
WORD module_attached; /* Module tpyes of attached */
|
u16 module_attached; /* Module tpyes of attached */
|
||||||
WORD led_timeout; /* LED timeout */
|
u16 led_timeout; /* LED timeout */
|
||||||
WORD first_port; /* First port to service */
|
u16 first_port; /* First port to service */
|
||||||
WORD last_port; /* Last port to service */
|
u16 last_port; /* Last port to service */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -48,39 +48,39 @@ typedef struct PARM_MAP PARM_MAP;
|
||||||
|
|
||||||
struct PARM_MAP {
|
struct PARM_MAP {
|
||||||
PHB_ptr phb_ptr; /* Pointer to the PHB array */
|
PHB_ptr phb_ptr; /* Pointer to the PHB array */
|
||||||
WORD_ptr phb_num_ptr; /* Ptr to Number of PHB's */
|
u16 phb_num_ptr; /* Ptr to Number of PHB's */
|
||||||
FREE_LIST_ptr free_list; /* Free List pointer */
|
FREE_LIST_ptr free_list; /* Free List pointer */
|
||||||
FREE_LIST_ptr free_list_end; /* Free List End pointer */
|
FREE_LIST_ptr free_list_end; /* Free List End pointer */
|
||||||
Q_BUF_ptr_ptr q_free_list_ptr; /* Ptr to Q_BUF variable */
|
Q_BUF_ptr_ptr q_free_list_ptr; /* Ptr to Q_BUF variable */
|
||||||
BYTE_ptr unit_id_ptr; /* Unit Id */
|
u16 unit_id_ptr; /* Unit Id */
|
||||||
LPB_ptr link_str_ptr; /* Link Structure Array */
|
LPB_ptr link_str_ptr; /* Link Structure Array */
|
||||||
BYTE_ptr bootloader_1; /* 1st Stage Boot Loader */
|
u16 bootloader_1; /* 1st Stage Boot Loader */
|
||||||
BYTE_ptr bootloader_2; /* 2nd Stage Boot Loader */
|
u16 bootloader_2; /* 2nd Stage Boot Loader */
|
||||||
WORD_ptr port_route_map_ptr; /* Port Route Map */
|
u16 port_route_map_ptr; /* Port Route Map */
|
||||||
ROUTE_STR_ptr route_ptr; /* Unit Route Map */
|
ROUTE_STR_ptr route_ptr; /* Unit Route Map */
|
||||||
NUMBER_ptr map_present; /* Route Map present */
|
u16 map_present; /* Route Map present */
|
||||||
NUMBER pkt_num; /* Total number of packets */
|
s16 pkt_num; /* Total number of packets */
|
||||||
NUMBER q_num; /* Total number of Q packets */
|
s16 q_num; /* Total number of Q packets */
|
||||||
WORD buffers_per_port; /* Number of buffers per port */
|
u16 buffers_per_port; /* Number of buffers per port */
|
||||||
WORD heap_size; /* Initial size of heap */
|
u16 heap_size; /* Initial size of heap */
|
||||||
WORD heap_left; /* Current Heap left */
|
u16 heap_left; /* Current Heap left */
|
||||||
WORD error; /* Error code */
|
u16 error; /* Error code */
|
||||||
WORD tx_max; /* Max number of tx pkts per phb */
|
u16 tx_max; /* Max number of tx pkts per phb */
|
||||||
WORD rx_max; /* Max number of rx pkts per phb */
|
u16 rx_max; /* Max number of rx pkts per phb */
|
||||||
WORD rx_limit; /* For high / low watermarks */
|
u16 rx_limit; /* For high / low watermarks */
|
||||||
NUMBER links; /* Links to use */
|
s16 links; /* Links to use */
|
||||||
NUMBER timer; /* Interrupts per second */
|
s16 timer; /* Interrupts per second */
|
||||||
RUP_ptr rups; /* Pointer to the RUPs */
|
RUP_ptr rups; /* Pointer to the RUPs */
|
||||||
WORD max_phb; /* Mostly for debugging */
|
u16 max_phb; /* Mostly for debugging */
|
||||||
WORD living; /* Just increments!! */
|
u16 living; /* Just increments!! */
|
||||||
WORD init_done; /* Initialisation over */
|
u16 init_done; /* Initialisation over */
|
||||||
WORD booting_link;
|
u16 booting_link;
|
||||||
WORD idle_count; /* Idle time counter */
|
u16 idle_count; /* Idle time counter */
|
||||||
WORD busy_count; /* Busy counter */
|
u16 busy_count; /* Busy counter */
|
||||||
WORD idle_control; /* Control Idle Process */
|
u16 idle_control; /* Control Idle Process */
|
||||||
WORD tx_intr; /* TX interrupt pending */
|
u16 tx_intr; /* TX interrupt pending */
|
||||||
WORD rx_intr; /* RX interrupt pending */
|
u16 rx_intr; /* RX interrupt pending */
|
||||||
WORD rup_intr; /* RUP interrupt pending */
|
u16 rup_intr; /* RUP interrupt pending */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,13 +37,6 @@
|
||||||
#ifndef _phb_h
|
#ifndef _phb_h
|
||||||
#define _phb_h 1
|
#define _phb_h 1
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
#ifndef lint
|
|
||||||
/* static char *_rio_phb_h_sccs = "@(#)phb.h 1.12"; */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Handshake asserted. Deasserted by the LTT(s)
|
* Handshake asserted. Deasserted by the LTT(s)
|
||||||
************************************************/
|
************************************************/
|
||||||
|
@ -126,21 +119,21 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
typedef struct PHB PHB;
|
typedef struct PHB PHB;
|
||||||
struct PHB {
|
struct PHB {
|
||||||
WORD source;
|
u8 source;
|
||||||
WORD handshake;
|
u8 handshake;
|
||||||
WORD status;
|
u8 status;
|
||||||
NUMBER timeout; /* Maximum of 1.9 seconds */
|
u16 timeout; /* Maximum of 1.9 seconds */
|
||||||
WORD link; /* Send down this link */
|
u8 link; /* Send down this link */
|
||||||
WORD destination;
|
u8 destination;
|
||||||
PKT_ptr_ptr tx_start;
|
u16 tx_start;
|
||||||
PKT_ptr_ptr tx_end;
|
u16 tx_end;
|
||||||
PKT_ptr_ptr tx_add;
|
u16 tx_add;
|
||||||
PKT_ptr_ptr tx_remove;
|
u16 tx_remove;
|
||||||
|
|
||||||
PKT_ptr_ptr rx_start;
|
u16 rx_start;
|
||||||
PKT_ptr_ptr rx_end;
|
u16 rx_end;
|
||||||
PKT_ptr_ptr rx_add;
|
u16 rx_add;
|
||||||
PKT_ptr_ptr rx_remove;
|
u16 rx_remove;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,6 @@
|
||||||
#ifndef _pkt_h
|
#ifndef _pkt_h
|
||||||
#define _pkt_h 1
|
#define _pkt_h 1
|
||||||
|
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
#ifndef lint
|
|
||||||
/* static char *_rio_pkt_h_sccs = "@(#)pkt.h 1.8"; */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_TTL 0xf
|
|
||||||
#define PKT_CMD_BIT ((ushort) 0x080)
|
#define PKT_CMD_BIT ((ushort) 0x080)
|
||||||
#define PKT_CMD_DATA ((ushort) 0x080)
|
#define PKT_CMD_DATA ((ushort) 0x080)
|
||||||
|
|
||||||
|
@ -70,15 +62,15 @@
|
||||||
#define CONTROL_DATA_WNDW (DATA_WNDW << 8)
|
#define CONTROL_DATA_WNDW (DATA_WNDW << 8)
|
||||||
|
|
||||||
struct PKT {
|
struct PKT {
|
||||||
BYTE dest_unit; /* Destination Unit Id */
|
u8 dest_unit; /* Destination Unit Id */
|
||||||
BYTE dest_port; /* Destination POrt */
|
u8 dest_port; /* Destination POrt */
|
||||||
BYTE src_unit; /* Source Unit Id */
|
u8 src_unit; /* Source Unit Id */
|
||||||
BYTE src_port; /* Source POrt */
|
u8 src_port; /* Source POrt */
|
||||||
BYTE len;
|
u8 len;
|
||||||
BYTE control;
|
u8 control;
|
||||||
BYTE data[PKT_MAX_DATA_LEN];
|
u8 data[PKT_MAX_DATA_LEN];
|
||||||
/* Actual data :-) */
|
/* Actual data :-) */
|
||||||
WORD csum; /* C-SUM */
|
u16 csum; /* C-SUM */
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -33,91 +33,37 @@
|
||||||
#ifndef __rio_port_h__
|
#ifndef __rio_port_h__
|
||||||
#define __rio_port_h__
|
#define __rio_port_h__
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
static char *_port_h_sccs_ = "@(#)port.h 1.3";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#undef VPIX
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** the port data structure - one per port in the system
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef STATS
|
|
||||||
struct RIOStats {
|
|
||||||
/*
|
|
||||||
** interrupt statistics
|
|
||||||
*/
|
|
||||||
uint BreakIntCnt;
|
|
||||||
uint ModemOffCnt;
|
|
||||||
uint ModemOnCnt;
|
|
||||||
uint RxIntCnt;
|
|
||||||
uint TxIntCnt;
|
|
||||||
/*
|
|
||||||
** throughput statistics
|
|
||||||
*/
|
|
||||||
uint RxCharCnt;
|
|
||||||
uint RxPktCnt;
|
|
||||||
uint RxSaveCnt;
|
|
||||||
uint TxCharCnt;
|
|
||||||
uint TxPktCnt;
|
|
||||||
/*
|
|
||||||
** driver entry statistics
|
|
||||||
*/
|
|
||||||
uint CloseCnt;
|
|
||||||
uint IoctlCnt;
|
|
||||||
uint OpenCnt;
|
|
||||||
uint ReadCnt;
|
|
||||||
uint WriteCnt;
|
|
||||||
/*
|
|
||||||
** proc statistics
|
|
||||||
*/
|
|
||||||
uint BlockCnt;
|
|
||||||
uint OutputCnt;
|
|
||||||
uint ResumeCnt;
|
|
||||||
uint RflushCnt;
|
|
||||||
uint SuspendCnt;
|
|
||||||
uint TbreakCnt;
|
|
||||||
uint TimeoutCnt;
|
|
||||||
uint UnblockCnt;
|
|
||||||
uint WflushCnt;
|
|
||||||
uint WFBodgeCnt;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Port data structure
|
** Port data structure
|
||||||
*/
|
*/
|
||||||
struct Port {
|
struct Port {
|
||||||
struct gs_port gs;
|
struct gs_port gs;
|
||||||
int PortNum; /* RIO port no., 0-511 */
|
int PortNum; /* RIO port no., 0-511 */
|
||||||
struct Host *HostP;
|
struct Host *HostP;
|
||||||
volatile caddr_t Caddr;
|
volatile caddr_t Caddr;
|
||||||
ushort HostPort; /* Port number on host card */
|
unsigned short HostPort; /* Port number on host card */
|
||||||
uchar RupNum; /* Number of RUP for port */
|
unsigned char RupNum; /* Number of RUP for port */
|
||||||
uchar ID2; /* Second ID of RTA for port */
|
unsigned char ID2; /* Second ID of RTA for port */
|
||||||
ulong State; /* FLAGS for open & xopen */
|
unsigned long State; /* FLAGS for open & xopen */
|
||||||
#define RIO_LOPEN 0x00001 /* Local open */
|
#define RIO_LOPEN 0x00001 /* Local open */
|
||||||
#define RIO_MOPEN 0x00002 /* Modem open */
|
#define RIO_MOPEN 0x00002 /* Modem open */
|
||||||
#define RIO_WOPEN 0x00004 /* Waiting for open */
|
#define RIO_WOPEN 0x00004 /* Waiting for open */
|
||||||
#define RIO_CLOSING 0x00008 /* The port is being close */
|
#define RIO_CLOSING 0x00008 /* The port is being close */
|
||||||
#define RIO_XPBUSY 0x00010 /* Transparent printer busy */
|
#define RIO_XPBUSY 0x00010 /* Transparent printer busy */
|
||||||
#define RIO_BREAKING 0x00020 /* Break in progress */
|
#define RIO_BREAKING 0x00020 /* Break in progress */
|
||||||
#define RIO_DIRECT 0x00040 /* Doing Direct output */
|
#define RIO_DIRECT 0x00040 /* Doing Direct output */
|
||||||
#define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */
|
#define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */
|
||||||
#define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */
|
#define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */
|
||||||
#define RIO_CARR_ON 0x00200 /* Stream has carrier present */
|
#define RIO_CARR_ON 0x00200 /* Stream has carrier present */
|
||||||
#define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */
|
#define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */
|
||||||
#define RIO_RBLK 0x00800 /* Stream is read-blocked */
|
#define RIO_RBLK 0x00800 /* Stream is read-blocked */
|
||||||
#define RIO_BUSY 0x01000 /* Stream is BUSY for write */
|
#define RIO_BUSY 0x01000 /* Stream is BUSY for write */
|
||||||
#define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */
|
#define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */
|
||||||
#define RIO_TXSTOP 0x04000 /* Stream output is stopped */
|
#define RIO_TXSTOP 0x04000 /* Stream output is stopped */
|
||||||
#define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */
|
#define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */
|
||||||
#define RIO_DYNOROD 0x10000 /* Drain failed */
|
#define RIO_DYNOROD 0x10000 /* Drain failed */
|
||||||
#define RIO_DELETED 0x20000 /* RTA has been deleted */
|
#define RIO_DELETED 0x20000 /* RTA has been deleted */
|
||||||
#define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
|
#define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
|
||||||
#define RIO_USING_EUC 0x100000 /* Using extended Unix chars */
|
#define RIO_USING_EUC 0x100000 /* Using extended Unix chars */
|
||||||
#define RIO_CAN_COOK 0x200000 /* This line can do cooking */
|
#define RIO_CAN_COOK 0x200000 /* This line can do cooking */
|
||||||
#define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */
|
#define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */
|
||||||
|
@ -125,15 +71,15 @@ struct Port {
|
||||||
#define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */
|
#define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */
|
||||||
#define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */
|
#define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */
|
||||||
|
|
||||||
ulong Config; /* FLAGS for NOREAD.... */
|
unsigned long Config; /* FLAGS for NOREAD.... */
|
||||||
#define RIO_NOREAD 0x0001 /* Are not allowed to read port */
|
#define RIO_NOREAD 0x0001 /* Are not allowed to read port */
|
||||||
#define RIO_NOWRITE 0x0002 /* Are not allowed to write port */
|
#define RIO_NOWRITE 0x0002 /* Are not allowed to write port */
|
||||||
#define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */
|
#define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */
|
||||||
#define RIO_NOMASK 0x0007 /* All not allowed things */
|
#define RIO_NOMASK 0x0007 /* All not allowed things */
|
||||||
#define RIO_IXANY 0x0008 /* Port is allowed ixany */
|
#define RIO_IXANY 0x0008 /* Port is allowed ixany */
|
||||||
#define RIO_MODEM 0x0010 /* Stream is a modem device */
|
#define RIO_MODEM 0x0010 /* Stream is a modem device */
|
||||||
#define RIO_IXON 0x0020 /* Port is allowed ixon */
|
#define RIO_IXON 0x0020 /* Port is allowed ixon */
|
||||||
#define RIO_WAITDRAIN 0x0040 /* Wait for port to completely drain */
|
#define RIO_WAITDRAIN 0x0040 /* Wait for port to completely drain */
|
||||||
#define RIO_MAP_50_TO_50 0x0080 /* Map 50 baud to 50 baud */
|
#define RIO_MAP_50_TO_50 0x0080 /* Map 50 baud to 50 baud */
|
||||||
#define RIO_MAP_110_TO_110 0x0100 /* Map 110 baud to 110 baud */
|
#define RIO_MAP_110_TO_110 0x0100 /* Map 110 baud to 110 baud */
|
||||||
|
|
||||||
|
@ -142,36 +88,36 @@ struct Port {
|
||||||
** As LynxOS does not appear to support Hardware Flow Control .....
|
** As LynxOS does not appear to support Hardware Flow Control .....
|
||||||
** Define our own flow control flags in 'Config'.
|
** Define our own flow control flags in 'Config'.
|
||||||
*/
|
*/
|
||||||
#define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */
|
#define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */
|
||||||
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
|
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
|
||||||
|
|
||||||
|
|
||||||
struct PHB *PhbP; /* pointer to PHB for port */
|
struct PHB *PhbP; /* pointer to PHB for port */
|
||||||
WORD *TxAdd; /* Add packets here */
|
u16 *TxAdd; /* Add packets here */
|
||||||
WORD *TxStart; /* Start of add array */
|
u16 *TxStart; /* Start of add array */
|
||||||
WORD *TxEnd; /* End of add array */
|
u16 *TxEnd; /* End of add array */
|
||||||
WORD *RxRemove; /* Remove packets here */
|
u16 *RxRemove; /* Remove packets here */
|
||||||
WORD *RxStart; /* Start of remove array */
|
u16 *RxStart; /* Start of remove array */
|
||||||
WORD *RxEnd; /* End of remove array */
|
u16 *RxEnd; /* End of remove array */
|
||||||
uint RtaUniqueNum; /* Unique number of RTA */
|
unsigned int RtaUniqueNum; /* Unique number of RTA */
|
||||||
ushort PortState; /* status of port */
|
unsigned short PortState; /* status of port */
|
||||||
ushort ModemState; /* status of modem lines */
|
unsigned short ModemState; /* status of modem lines */
|
||||||
ulong ModemLines; /* Modem bits sent to RTA */
|
unsigned long ModemLines; /* Modem bits sent to RTA */
|
||||||
uchar CookMode; /* who expands CR/LF? */
|
unsigned char CookMode; /* who expands CR/LF? */
|
||||||
uchar ParamSem; /* Prevent write during param */
|
unsigned char ParamSem; /* Prevent write during param */
|
||||||
uchar Mapped; /* if port mapped onto host */
|
unsigned char Mapped; /* if port mapped onto host */
|
||||||
uchar SecondBlock; /* if port belongs to 2nd block
|
unsigned char SecondBlock; /* if port belongs to 2nd block
|
||||||
of 16 port RTA */
|
of 16 port RTA */
|
||||||
uchar InUse; /* how many pre-emptive cmds */
|
unsigned char InUse; /* how many pre-emptive cmds */
|
||||||
uchar Lock; /* if params locked */
|
unsigned char Lock; /* if params locked */
|
||||||
uchar Store; /* if params stored across closes */
|
unsigned char Store; /* if params stored across closes */
|
||||||
uchar FirstOpen; /* TRUE if first time port opened */
|
unsigned char FirstOpen; /* TRUE if first time port opened */
|
||||||
uchar FlushCmdBodge; /* if doing a (non)flush */
|
unsigned char FlushCmdBodge; /* if doing a (non)flush */
|
||||||
uchar MagicFlags; /* require intr processing */
|
unsigned char MagicFlags; /* require intr processing */
|
||||||
#define MAGIC_FLUSH 0x01 /* mirror of WflushFlag */
|
#define MAGIC_FLUSH 0x01 /* mirror of WflushFlag */
|
||||||
#define MAGIC_REBOOT 0x02 /* RTA re-booted, re-open ports */
|
#define MAGIC_REBOOT 0x02 /* RTA re-booted, re-open ports */
|
||||||
#define MORE_OUTPUT_EYGOR 0x04 /* riotproc failed to empty clists */
|
#define MORE_OUTPUT_EYGOR 0x04 /* riotproc failed to empty clists */
|
||||||
uchar WflushFlag; /* 1 How many WFLUSHs active */
|
unsigned char WflushFlag; /* 1 How many WFLUSHs active */
|
||||||
/*
|
/*
|
||||||
** Transparent print stuff
|
** Transparent print stuff
|
||||||
*/
|
*/
|
||||||
|
@ -179,63 +125,55 @@ struct Port {
|
||||||
#ifndef MAX_XP_CTRL_LEN
|
#ifndef MAX_XP_CTRL_LEN
|
||||||
#define MAX_XP_CTRL_LEN 16 /* ALSO IN DAEMON.H */
|
#define MAX_XP_CTRL_LEN 16 /* ALSO IN DAEMON.H */
|
||||||
#endif
|
#endif
|
||||||
uint XpCps;
|
unsigned int XpCps;
|
||||||
char XpOn[MAX_XP_CTRL_LEN];
|
char XpOn[MAX_XP_CTRL_LEN];
|
||||||
char XpOff[MAX_XP_CTRL_LEN];
|
char XpOff[MAX_XP_CTRL_LEN];
|
||||||
ushort XpLen; /* strlen(XpOn)+strlen(XpOff) */
|
unsigned short XpLen; /* strlen(XpOn)+strlen(XpOff) */
|
||||||
uchar XpActive;
|
unsigned char XpActive;
|
||||||
uchar XpLastTickOk; /* TRUE if we can process */
|
unsigned char XpLastTickOk; /* TRUE if we can process */
|
||||||
#define XP_OPEN 00001
|
#define XP_OPEN 00001
|
||||||
#define XP_RUNABLE 00002
|
#define XP_RUNABLE 00002
|
||||||
struct ttystatics *XttyP;
|
struct ttystatics *XttyP;
|
||||||
} Xprint;
|
} Xprint;
|
||||||
#ifdef VPIX
|
unsigned char RxDataStart;
|
||||||
v86_t *StashP;
|
unsigned char Cor2Copy; /* copy of COR2 */
|
||||||
uint IntMask;
|
char *Name; /* points to the Rta's name */
|
||||||
struct termss VpixSs;
|
|
||||||
uchar ModemStatusReg; /* Modem status register */
|
|
||||||
#endif
|
|
||||||
uchar RxDataStart;
|
|
||||||
uchar Cor2Copy; /* copy of COR2 */
|
|
||||||
char *Name; /* points to the Rta's name */
|
|
||||||
#ifdef STATS
|
|
||||||
struct RIOStats Stat; /* ports statistics */
|
|
||||||
#endif
|
|
||||||
char *TxRingBuffer;
|
char *TxRingBuffer;
|
||||||
ushort TxBufferIn; /* New data arrives here */
|
unsigned short TxBufferIn; /* New data arrives here */
|
||||||
ushort TxBufferOut; /* Intr removes data here */
|
unsigned short TxBufferOut; /* Intr removes data here */
|
||||||
ushort OldTxBufferOut; /* Indicates if draining */
|
unsigned short OldTxBufferOut; /* Indicates if draining */
|
||||||
int TimeoutId; /* Timeout ID */
|
int TimeoutId; /* Timeout ID */
|
||||||
uint Debug;
|
unsigned int Debug;
|
||||||
uchar WaitUntilBooted; /* True if open should block */
|
unsigned char WaitUntilBooted; /* True if open should block */
|
||||||
uint statsGather; /* True if gathering stats */
|
unsigned int statsGather; /* True if gathering stats */
|
||||||
ulong txchars; /* Chars transmitted */
|
unsigned long txchars; /* Chars transmitted */
|
||||||
ulong rxchars; /* Chars received */
|
unsigned long rxchars; /* Chars received */
|
||||||
ulong opens; /* port open count */
|
unsigned long opens; /* port open count */
|
||||||
ulong closes; /* port close count */
|
unsigned long closes; /* port close count */
|
||||||
ulong ioctls; /* ioctl count */
|
unsigned long ioctls; /* ioctl count */
|
||||||
uchar LastRxTgl; /* Last state of rx toggle bit */
|
unsigned char LastRxTgl; /* Last state of rx toggle bit */
|
||||||
spinlock_t portSem; /* Lock using this sem */
|
spinlock_t portSem; /* Lock using this sem */
|
||||||
int MonitorTstate; /* Monitoring ? */
|
int MonitorTstate; /* Monitoring ? */
|
||||||
int timeout_id; /* For calling 100 ms delays */
|
int timeout_id; /* For calling 100 ms delays */
|
||||||
int timeout_sem; /* For calling 100 ms delays */
|
int timeout_sem; /* For calling 100 ms delays */
|
||||||
int firstOpen; /* First time open ? */
|
int firstOpen; /* First time open ? */
|
||||||
char *p; /* save the global struc here .. */
|
char *p; /* save the global struc here .. */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ModuleInfo {
|
struct ModuleInfo {
|
||||||
char *Name;
|
char *Name;
|
||||||
uint Flags[4]; /* one per port on a module */
|
unsigned int Flags[4]; /* one per port on a module */
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This struct is required because trying to grab an entire Port structure
|
** This struct is required because trying to grab an entire Port structure
|
||||||
** runs into problems with differing struct sizes between driver and config.
|
** runs into problems with differing struct sizes between driver and config.
|
||||||
*/
|
*/
|
||||||
struct PortParams {
|
struct PortParams {
|
||||||
uint Port;
|
unsigned int Port;
|
||||||
ulong Config;
|
unsigned long Config;
|
||||||
ulong State;
|
unsigned long State;
|
||||||
struct ttystatics *TtyP;
|
struct ttystatics *TtyP;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -43,25 +43,21 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned short NUMBER_ptr;
|
typedef u16 char_ptr;
|
||||||
typedef unsigned short WORD_ptr;
|
typedef u16 Channel_ptr;
|
||||||
typedef unsigned short BYTE_ptr;
|
typedef u16 FREE_LIST_ptr_ptr;
|
||||||
typedef unsigned short char_ptr;
|
typedef u16 FREE_LIST_ptr;
|
||||||
typedef unsigned short Channel_ptr;
|
typedef u16 LPB_ptr;
|
||||||
typedef unsigned short FREE_LIST_ptr_ptr;
|
typedef u16 Process_ptr;
|
||||||
typedef unsigned short FREE_LIST_ptr;
|
typedef u16 PHB_ptr;
|
||||||
typedef unsigned short LPB_ptr;
|
typedef u16 PKT_ptr;
|
||||||
typedef unsigned short Process_ptr;
|
typedef u16 Q_BUF_ptr;
|
||||||
typedef unsigned short PHB_ptr;
|
typedef u16 Q_BUF_ptr_ptr;
|
||||||
typedef unsigned short PKT_ptr;
|
typedef u16 ROUTE_STR_ptr;
|
||||||
typedef unsigned short PKT_ptr_ptr;
|
typedef u16 RUP_ptr;
|
||||||
typedef unsigned short Q_BUF_ptr;
|
typedef u16 short_ptr;
|
||||||
typedef unsigned short Q_BUF_ptr_ptr;
|
typedef u16 u_short_ptr;
|
||||||
typedef unsigned short ROUTE_STR_ptr;
|
typedef u16 ushort_ptr;
|
||||||
typedef unsigned short RUP_ptr;
|
|
||||||
typedef unsigned short short_ptr;
|
|
||||||
typedef unsigned short u_short_ptr;
|
|
||||||
typedef unsigned short ushort_ptr;
|
|
||||||
|
|
||||||
#endif /* __riotypes__ */
|
#endif /* __riotypes__ */
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,7 @@
|
||||||
#ifndef _rup_h
|
#ifndef _rup_h
|
||||||
#define _rup_h 1
|
#define _rup_h 1
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
#ifndef lint
|
|
||||||
/* static char *_rio_rup_h_sccs = "@(#)rup.h 1.5"; */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_RUP ((short) 16)
|
#define MAX_RUP ((short) 16)
|
||||||
|
|
||||||
#define PKTS_PER_RUP ((short) 2) /* They are always used in pairs */
|
#define PKTS_PER_RUP ((short) 2) /* They are always used in pairs */
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
|
@ -62,13 +55,13 @@
|
||||||
struct RUP {
|
struct RUP {
|
||||||
PKT_ptr txpkt; /* Outgoing packet */
|
PKT_ptr txpkt; /* Outgoing packet */
|
||||||
PKT_ptr rxpkt; /* Incoming packet */
|
PKT_ptr rxpkt; /* Incoming packet */
|
||||||
WORD link; /* Which link to send down? */
|
u16 link; /* Which link to send down? */
|
||||||
BYTE rup_dest_unit[2]; /* Destination unit */
|
u8 rup_dest_unit[2]; /* Destination unit */
|
||||||
WORD handshake; /* For handshaking */
|
u16 handshake; /* For handshaking */
|
||||||
WORD timeout; /* Timeout */
|
u16 timeout; /* Timeout */
|
||||||
WORD status; /* Status */
|
u16 status; /* Status */
|
||||||
WORD txcontrol; /* Transmit control */
|
u16 txcontrol; /* Transmit control */
|
||||||
WORD rxcontrol; /* Receive control */
|
u16 rxcontrol; /* Receive control */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,23 +33,16 @@
|
||||||
#ifndef __rio_typdef_h__
|
#ifndef __rio_typdef_h__
|
||||||
#define __rio_typdef_h__
|
#define __rio_typdef_h__
|
||||||
|
|
||||||
#ifdef SCCS_LABELS
|
|
||||||
static char *_typdef_h_sccs_ = "@(#)typdef.h 1.2";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef VPIX
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** IT IS REALLY, REALLY, IMPORTANT THAT BYTES ARE UNSIGNED!
|
** IT IS REALLY, REALLY, IMPORTANT THAT BYTES ARE UNSIGNED!
|
||||||
**
|
**
|
||||||
** These types are ONLY to be used for refering to data structures
|
** These types are ONLY to be used for refering to data structures
|
||||||
** on the RIO Host card!
|
** on the RIO Host card!
|
||||||
*/
|
*/
|
||||||
typedef volatile unsigned char BYTE;
|
typedef volatile u8 BYTE;
|
||||||
typedef volatile unsigned short WORD;
|
typedef volatile u16 WORD;
|
||||||
typedef volatile unsigned int DWORD;
|
typedef volatile u32 DWORD;
|
||||||
typedef volatile unsigned short RIOP;
|
typedef volatile u16 RIOP;
|
||||||
typedef volatile short NUMBER;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue