Commit 8d8706e2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] lindent rio drivers

Run all rio files through indent -kr -i8 -bri0 -l255, as requested by Alan.

rioboot.c and rioinit.c were skipped due to worrisome lindent warnings.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a9415644
......@@ -52,8 +52,7 @@ static char *_board_h_sccs_ = "@(#)board.h 1.2";
/*
** The shape of the Host Control area, at offset 0x7C00, Write Only
*/
struct s_Ctrl
{
struct s_Ctrl {
BYTE DpCtl; /* 7C00 */
BYTE Dp_Unused2_[127];
BYTE DpIntSet; /* 7C80 */
......@@ -67,8 +66,7 @@ struct s_Ctrl
/*
** The PROM data area on the host (0x7C00), Read Only
*/
struct s_Prom
{
struct s_Prom {
WORD DpSlxCode[2];
WORD DpRev;
WORD Dp_Unused6_;
......@@ -83,8 +81,7 @@ struct s_Prom
/*
** Union of the Ctrl and Prom areas
*/
union u_CtrlProm /* This is the control/PROM area (0x7C00) */
{
union u_CtrlProm { /* This is the control/PROM area (0x7C00) */
struct s_Ctrl DpCtrl;
struct s_Prom DpProm;
};
......@@ -92,22 +89,19 @@ union u_CtrlProm /* This is the control/PROM area (0x7C00) */
/*
** 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];
WORD DpParmMapAd;
};
struct s_StartUpS
{
struct s_StartUpS {
BYTE Dp_Unused9_[DP_STARTUP_ADDR];
BYTE Dp_LongJump[0x4];
BYTE Dp_Unused10_[2];
BYTE 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];
struct s_ParmMapS DpParmMapS;
struct s_StartUpS DpStartUpS;
......@@ -116,8 +110,7 @@ union u_Sram2ParmMap /* This is the top of memory (0x7E00-0x7FFF) */
/*
** This is the DP RAM overlay.
*/
struct DpRam
{
struct DpRam {
BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
......
......@@ -41,7 +41,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ;
static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1";
#endif
#endif
......@@ -49,14 +49,13 @@ static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ;
* Overlayed onto the Data fields of a regular
* Packet
************************************************/
typedef struct BOOT_PKT BOOT_PKT ;
typedef struct BOOT_PKT BOOT_PKT;
struct BOOT_PKT {
short seq_num ;
char data[10] ;
} ;
short seq_num;
char data[10];
};
#endif
/*********** end of file ***********/
......@@ -97,9 +97,8 @@
#define MAX_RATE B2000
struct baud_rate /* Tag for baud rates */
{
/* short host_rate,*/ /* As passed by the driver */
struct baud_rate { /* Tag for baud rates */
/* short host_rate, *//* As passed by the driver */
short divisor, /* The divisor */
prescaler; /* The pre-scaler */
};
......
......@@ -21,7 +21,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_chan_h_sccs = "@(#)chan.h 1.1" ;
static char *_rio_chan_h_sccs = "@(#)chan.h 1.1";
#endif
#endif
......
......@@ -145,7 +145,7 @@
#define ticr 0x45 /* Transmit Interrupting Channel Reg */
#define micr 0x46 /* Modem Interrupting Channel Register */
#define gcr 0x4b /* Global configuration register*/
#define gcr 0x4b /* Global configuration register */
#define misr 0x4c /* Modem interrupt status register */
#define rbusr 0x59
......@@ -162,15 +162,15 @@
#define tir 0x6a /* Transmit Interrupt Register */
#define rir 0x6b /* Receive Interrupt Register */
#define msvr1 0x6c /* Modem Signal Value Register 1 */
#define msvr2 0x6d /* Modem Signal Value Register 2*/
#define psvr 0x6f /* Printer Signal Value Register*/
#define msvr2 0x6d /* Modem Signal Value Register 2 */
#define psvr 0x6f /* Printer Signal Value Register */
#define tbpr 0x72 /* Transmit Baud Rate Period Register */
#define tcor 0x76 /* Transmit Clock Option Register */
#define rbpr 0x78 /* Receive Baud Rate Period Register */
#define rber 0x7a /* Receive Baud Rate Extension Register */
#define rcor 0x7c /* Receive Clock Option Register*/
#define rcor 0x7c /* Receive Clock Option Register */
#define ppr 0x7e /* Prescalar Period Register */
/* Misc registers used for forcing the 1400 out of its reset woes */
......
......@@ -42,7 +42,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1";
#endif
#endif
......@@ -81,4 +81,3 @@ static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
#endif
/*********** end of file ***********/
......@@ -44,15 +44,14 @@ static char *_cmdblk_h_sccs_ = "@(#)cmdblk.h 1.2";
** a rup.
*/
struct CmdBlk
{
struct CmdBlk {
struct CmdBlk *NextP; /* Pointer to next command block */
struct PKT Packet; /* A packet, to copy to the rup */
/* The func to call to check if OK */
int (*PreFuncP)(int, struct CmdBlk *);
int (*PreFuncP) (int, struct CmdBlk *);
int PreArg; /* The arg for the func */
/* The func to call when completed */
int (*PostFuncP)(int, struct CmdBlk *);
int (*PostFuncP) (int, struct CmdBlk *);
int PostArg; /* The arg for the func */
};
......
......@@ -54,8 +54,7 @@ static char *_cmdpkt_h_sccs_ = "@(#)cmdpkt.h 1.2";
** This structure overlays a PktCmd->CmdData structure, and so starts
** at Data[2] in the actual pkt!
*/
struct BootSequence
{
struct BootSequence {
WORD NumPackets;
WORD LoadBase;
WORD CodeSize;
......@@ -63,17 +62,14 @@ struct BootSequence
#define BOOT_SEQUENCE_LEN 8
struct SamTop
{
struct SamTop {
BYTE Unit;
BYTE Link;
};
struct CmdHdr
{
struct CmdHdr {
BYTE PcCommand;
union
{
union {
BYTE PcPhbNum;
BYTE PcLinkNum;
BYTE PcIDNum;
......@@ -81,28 +77,22 @@ struct CmdHdr
};
struct PktCmd
{
union
{
struct
{
struct PktCmd {
union {
struct {
struct CmdHdr CmdHdr;
struct BootSequence PcBootSequence;
} S1;
struct
{
struct {
WORD PcSequence;
BYTE PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct
{
struct {
WORD __crud__;
BYTE PcUniqNum[4]; /* this is really a uint. */
BYTE PcModuleTypes; /* what modules are fitted */
} S3;
struct
{
struct {
struct CmdHdr CmdHdr;
BYTE __undefined__;
BYTE PcModemStatus;
......@@ -111,57 +101,46 @@ struct PktCmd
WORD PcSubAddr; /* Address for command */
BYTE PcSubData[64]; /* Date area for command */
} S4;
struct
{
struct {
struct CmdHdr CmdHdr;
BYTE PcCommandText[1];
BYTE __crud__[20];
BYTE PcIDNum2; /* It had to go somewhere! */
} S5;
struct
{
struct {
struct CmdHdr CmdHdr;
struct SamTop Topology[LINKS_PER_UNIT];
} S6;
} U1;
};
struct PktCmd_M
{
union
{
struct
{
struct
{
struct PktCmd_M {
union {
struct {
struct {
uchar PcCommand;
union
{
union {
uchar PcPhbNum;
uchar PcLinkNum;
uchar PcIDNum;
} U0;
} CmdHdr;
struct
{
struct {
ushort NumPackets;
ushort LoadBase;
ushort CodeSize;
} PcBootSequence;
} S1;
struct
{
struct {
ushort PcSequence;
uchar PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct
{
struct {
ushort __crud__;
uchar PcUniqNum[4]; /* this is really a uint. */
uchar PcModuleTypes; /* what modules are fitted */
} S3;
struct
{
struct {
ushort __cmd_hdr__;
uchar __undefined__;
uchar PcModemStatus;
......@@ -170,15 +149,13 @@ struct PktCmd_M
ushort PcSubAddr;
uchar PcSubData[64];
} S4;
struct
{
struct {
ushort __cmd_hdr__;
uchar PcCommandText[1];
uchar __crud__[20];
uchar PcIDNum2; /* Tacked on end */
} S5;
struct
{
struct {
ushort __cmd_hdr__;
struct Top Topology[LINKS_PER_UNIT];
} S6;
......
......@@ -59,4 +59,3 @@
#endif
/*********** end of file ***********/
......@@ -44,15 +44,13 @@ static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3";
** structures used on /dev/rio
*/
struct Error
{
struct Error {
uint Error;
uint Entry;
uint Other;
};
struct DownLoad
{
struct DownLoad {
char *DataP;
uint Count;
uint ProductCode;
......@@ -69,8 +67,7 @@ struct DownLoad
#define MAX_XP_CTRL_LEN 16 /* ALSO IN PORT.H */
#endif
struct PortSetup
{
struct PortSetup {
uint From; /* Set/Clear XP & IXANY Control from this port.... */
uint To; /* .... to this port */
uint XpCps; /* at this speed */
......@@ -83,28 +80,24 @@ struct PortSetup
uchar Drain; /* close only when drained */
};
struct LpbReq
{
struct LpbReq {
uint Host;
uint Link;
struct LPB *LpbP;
};
struct RupReq
{
struct RupReq {
uint HostNum;
uint RupNum;
struct RUP *RupP;
};
struct PortReq
{
struct PortReq {
uint SysPort;
struct Port *PortP;
};
struct StreamInfo
{
struct StreamInfo {
uint SysPort;
#if 0
queue_t RQueue;
......@@ -115,59 +108,50 @@ struct StreamInfo
#endif
};
struct HostReq
{
struct HostReq {
uint HostNum;
struct Host *HostP;
};
struct HostDpRam
{
struct HostDpRam {
uint HostNum;
struct DpRam *DpRamP;
};
struct DebugCtrl
{
struct DebugCtrl {
uint SysPort;
uint Debug;
uint Wait;
};
struct MapInfo
{
struct MapInfo {
uint FirstPort; /* 8 ports, starting from this (tty) number */
uint RtaUnique; /* reside on this RTA (unique number) */
};
struct MapIn
{
struct MapIn {
uint NumEntries; /* How many port sets are we mapping? */
struct MapInfo *MapInfoP; /* Pointer to (user space) info */
};
struct SendPack
{
struct SendPack {
unsigned int PortNum;
unsigned char Len;
unsigned char Data[PKT_MAX_DATA_LEN];
};
struct SpecialRupCmd
{
struct SpecialRupCmd {
struct PKT Packet;
unsigned short Host;
unsigned short RupNum;
};
struct IdentifyRta
{
struct IdentifyRta {
ulong RtaUnique;
uchar ID;
};
struct KillNeighbour
{
struct KillNeighbour {
ulong UniqueNum;
uchar Link;
};
......
......@@ -37,7 +37,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1" ;
static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1";
#endif
#endif
......@@ -56,4 +56,3 @@ static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1" ;
/*********** end of file ***********/
......@@ -36,7 +36,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_enable_h_sccs = "@(#)enable.h 1.1" ;
static char *_rio_enable_h_sccs = "@(#)enable.h 1.1";
#endif
#endif
......@@ -46,5 +46,3 @@ static char *_rio_enable_h_sccs = "@(#)enable.h 1.1" ;
/*********** end of file ***********/
......@@ -80,6 +80,3 @@
/*********** end of file ***********/
......@@ -41,114 +41,113 @@
#ifndef lint
#ifdef SCCS
static char *_rio_formpkt_h_sccs = "@(#)formpkt.h 1.1" ;
static char *_rio_formpkt_h_sccs = "@(#)formpkt.h 1.1";
#endif
#endif
typedef struct FORM_BOOT_PKT_1 FORM_BOOT_PKT_1 ;
typedef struct FORM_BOOT_PKT_1 FORM_BOOT_PKT_1;
struct FORM_BOOT_PKT_1 {
ushort pkt_number ;
ushort pkt_total ;
ushort boot_top ;
} ;
ushort pkt_number;
ushort pkt_total;
ushort boot_top;
};
typedef struct FORM_BOOT_PKT_2 FORM_BOOT_PKT_2 ;
typedef struct FORM_BOOT_PKT_2 FORM_BOOT_PKT_2;
struct FORM_BOOT_PKT_2 {
ushort pkt_number ;
char boot_data[10] ;
} ;
ushort pkt_number;
char boot_data[10];
};
typedef struct FORM_ATTACH_RTA FORM_ATTACH_RTA ;
typedef struct FORM_ATTACH_RTA FORM_ATTACH_RTA;
struct FORM_ATTACH_RTA {
char cmd_code ;
char booter_serial[4] ;
char booter_link ;
char bootee_serial[4] ;
char bootee_link ;
} ;
char cmd_code;
char booter_serial[4];
char booter_link;
char bootee_serial[4];
char bootee_link;
};
typedef struct FORM_BOOT_ID FORM_BOOT_ID ;
typedef struct FORM_BOOT_ID FORM_BOOT_ID;
struct FORM_BOOT_ID {
char cmd_code ;
char bootee_serial[4] ;
char bootee_prod_id ;
char bootee_link ;
} ;
char cmd_code;
char bootee_serial[4];
char bootee_prod_id;
char bootee_link;
};
typedef struct FORM_ROUTE_1 FORM_ROUTE_1 ;
typedef struct FORM_ROUTE_1 FORM_ROUTE_1;
struct FORM_ROUTE_1 {
char cmd_code ;
char pkt_number ;
char total_in_sequence ;
char unit_id ;
char host_unit_id ;
} ;
typedef struct FORM_ROUTE_2 FORM_ROUTE_2 ;
char cmd_code;
char pkt_number;
char total_in_sequence;
char unit_id;
char host_unit_id;
};
typedef struct FORM_ROUTE_2 FORM_ROUTE_2;
struct FORM_ROUTE_2 {
char cmd_code ;
char pkt_number ;
char total_in_sequence ;
char route_data[9] ;
} ;
char cmd_code;
char pkt_number;
char total_in_sequence;
char route_data[9];
};
typedef struct FORM_ROUTE_REQ FORM_ROUTE_REQ ;
typedef struct FORM_ROUTE_REQ FORM_ROUTE_REQ;
struct FORM_ROUTE_REQ {
char cmd_code ;
char pkt_number ;
char total_in_sequence ;
char route_data[10] ;
} ;
char cmd_code;
char pkt_number;
char total_in_sequence;
char route_data[10];
};
typedef struct FORM_ERROR FORM_ERROR ;
typedef struct FORM_ERROR FORM_ERROR;
struct FORM_ERROR {
char cmd_code ;
char error_code ;
char cmd_code;
char error_code;
} ;
};
typedef struct FORM_STATUS FORM_STATUS ;
typedef struct FORM_STATUS FORM_STATUS;
struct FORM_STATUS {
char cmd_code ;
char status_code ;
char last_packet_valid ;
char tx_buffer ;
char rx_buffer ;
char port_status ;
char phb_status ;
} ;
char cmd_code;
char status_code;
char last_packet_valid;
char tx_buffer;
char rx_buffer;
char port_status;
char phb_status;
};
typedef struct FORM_LINK_STATUS FORM_LINK_STATUS ;
typedef struct FORM_LINK_STATUS FORM_LINK_STATUS;
struct FORM_LINK_STATUS {
char cmd_code ;
char status_code ;
char link_number ;
ushort rx_errors ;
ushort tx_errors ;
ushort csum_errors ;
ushort disconnects ;
} ;
char cmd_code;
char status_code;
char link_number;
ushort rx_errors;
ushort tx_errors;
ushort csum_errors;
ushort disconnects;
};
typedef struct FORM_PARTITION FORM_PARTITION ;
typedef struct FORM_PARTITION FORM_PARTITION;
struct FORM_PARTITION {
char cmd_code ;
char status_code ;
char port_number ;
char tx_max ;
char rx_max ;
char rx_limit ;
} ;
char cmd_code;
char status_code;
char port_number;
char tx_max;
char rx_max;
char rx_limit;
};
#endif
/*********** end of file ***********/
......@@ -47,20 +47,19 @@ int RIOBootCodeHOST(struct rio_info *, register struct DownLoad *);
int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
void msec_timeout(struct Host *);
int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *);
int RIOBootOk(struct rio_info *,struct Host *, ulong);
int RIOBootOk(struct rio_info *, struct Host *, ulong);
int RIORtaBound(struct rio_info *, uint);
void FillSlot(int, int, uint, struct Host *);
/* riocmd.c */
int RIOFoadRta(struct Host *, struct Map *);
int RIOZombieRta(struct Host *, struct Map *);
int RIOCommandRta(struct rio_info *, uint, int (* func)( struct Host *,
struct Map *));
int RIOCommandRta(struct rio_info *, uint, int (*func) (struct Host *, struct Map *));
int RIOIdentifyRta(struct rio_info *, caddr_t);
int RIOKillNeighbour(struct rio_info *, caddr_t);
int RIOSuspendBootRta(struct Host *, int, int);
int RIOFoadWakeup(struct rio_info *);
struct CmdBlk * RIOGetCmdBlk(void);
struct CmdBlk *RIOGetCmdBlk(void);
void RIOFreeCmdBlk(struct CmdBlk *);
int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *);
void RIOPollHostCommands(struct rio_info *, struct Host *);
......@@ -71,13 +70,13 @@ void ShowPacket(uint, struct PKT *);
/* rioctrl.c */
int copyin(int, caddr_t, int);
int riocontrol(struct rio_info *, dev_t,int,caddr_t,int);
int RIOPreemptiveCmd(struct rio_info *,struct Port *,uchar);
int riocontrol(struct rio_info *, dev_t, int, caddr_t, int);
int RIOPreemptiveCmd(struct rio_info *, struct Port *, uchar);
/* rioinit.c */
void rioinit(struct rio_info *, struct RioHostInfo *);
void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
void RIOISAinit(struct rio_info *,int);
void RIOISAinit(struct rio_info *, int);
int RIODoAT(struct rio_info *, int, int);
caddr_t RIOCheckForATCard(int);
int RIOAssignAT(struct rio_info *, int, caddr_t, int);
......@@ -85,7 +84,7 @@ int RIOBoardTest(paddr_t, caddr_t, uchar, int);
void RIOAllocDataStructs(struct rio_info *);
void RIOSetupDataStructs(struct rio_info *);
int RIODefaultName(struct rio_info *, struct Host *, uint);
struct rioVersion * RIOVersid(void);
struct rioVersion *RIOVersid(void);
int RIOMapin(paddr_t, int, caddr_t *);
void RIOMapout(paddr_t, long, caddr_t);
void RIOHostReset(uint, volatile struct DpRam *, uint);
......@@ -116,7 +115,7 @@ int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
/* riotty.c */
int riotopen(struct tty_struct * tty, struct file * filp);
int riotopen(struct tty_struct *tty, struct file *filp);
int riotclose(void *ptr);
int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t);
void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
......@@ -127,27 +126,27 @@ int RIOApel(struct rio_info *);
int RIODeleteRta(struct rio_info *, struct Map *);
int RIOAssignRta(struct rio_info *, struct Map *);
int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
int RIOChangeName(struct rio_info *, struct Map*);
int RIOChangeName(struct rio_info *, struct Map *);
#if 0
/* riodrvr.c */
struct rio_info * rio_install(struct RioHostInfo *);
struct rio_info *rio_install(struct RioHostInfo *);
int rio_uninstall(register struct rio_info *);
int rio_open(struct rio_info *, int, struct file *);
int rio_close(struct rio_info *, struct file *);
int rio_read(struct rio_info *, struct file *, char *, int);
int rio_write(struct rio_info *, struct file * f, char *, int);
int rio_write(struct rio_info *, struct file *f, char *, int);
int rio_ioctl(struct rio_info *, struct file *, int, char *);
int rio_select(struct rio_info *, struct file * f, int, struct sel *);
int rio_select(struct rio_info *, struct file *f, int, struct sel *);
int rio_intr(char *);
int rio_isr_thread(char *);
struct rio_info * rio_info_store( int cmd, struct rio_info * p);
struct rio_info *rio_info_store(int cmd, struct rio_info *p);
#endif
extern int rio_pcicopy(char *src, char *dst, int n);
extern int rio_minor (struct tty_struct *tty);
extern int rio_ismodem (struct tty_struct *tty);
extern int rio_minor(struct tty_struct *tty);
extern int rio_ismodem(struct tty_struct *tty);
extern void rio_start_card_running (struct Host * HostP);
extern void rio_start_card_running(struct Host *HostP);
#endif /* __func_h_def */
......@@ -49,8 +49,7 @@ static char *_host_h_sccs_ = "@(#)host.h 1.2";
** Host data structure. This is used for the software equiv. of
** the host.
*/
struct Host
{
struct Host {
uchar Type; /* RIO_EISA, RIO_MCA, ... */
uchar Ivec; /* POLLED or ivec number */
uchar Mode; /* Control stuff */
......@@ -65,8 +64,8 @@ struct Host
/*struct lockb HostLock; *//* Lock structure for MPX */
uint WorkToBeDone; /* set to true each interrupt */
uint InIntr; /* Being serviced? */
uint IntSrvDone;/* host's interrupt has been serviced */
int (*Copy)( caddr_t, caddr_t, int ); /* copy func */
uint IntSrvDone; /* host's interrupt has been serviced */
int (*Copy) (caddr_t, caddr_t, int); /* copy func */
struct timer_list timer;
/*
** I M P O R T A N T !
......@@ -97,7 +96,7 @@ struct Host
struct Map Mapping[MAX_RUP]; /* Mappings for host */
struct PHB *PhbP; /* Pointer to the PHB array */
ushort *PhbNumP; /* Ptr to Number of PHB's */
struct LPB *LinkStrP ; /* Link Structure Array */
struct LPB *LinkStrP; /* Link Structure Array */
struct RUP *RupP; /* Sixteen real rups here */
struct PARM_MAP *ParmMapP; /* points to the parmmap */
uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
......@@ -107,9 +106,9 @@ struct Host
** The first sixteen are the real Rup entries (above), the last four
** are the link RUPs.
*/
struct UnixRup UnixRups[MAX_RUP+LINKS_PER_UNIT];
struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
int timeout_id; /* For calling 100 ms delays */
int timeout_sem;/* For calling 100 ms delays */
int timeout_sem; /* For calling 100 ms delays */
long locks; /* long req'd for set_bit --RR */
char ____end_marker____;
};
......
......@@ -37,7 +37,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_hosthw_h_sccs = "@(#)hosthw.h 1.2" ;
static char *_rio_hosthw_h_sccs = "@(#)hosthw.h 1.2";
#endif
#endif
......@@ -53,5 +53,3 @@ static char *_rio_hosthw_h_sccs = "@(#)hosthw.h 1.2" ;
/*********** end of file ***********/
......@@ -119,29 +119,29 @@
#endif /* RTA */
struct LPB {
WORD link_number ; /* Link Number */
Channel_ptr in_ch ; /* Link In Channel */
Channel_ptr out_ch ; /* Link Out Channel */
WORD link_number; /* Link Number */
Channel_ptr in_ch; /* Link In Channel */
Channel_ptr out_ch; /* Link Out Channel */
#ifdef RTA
uchar stat_led ; /* Port open leds */
uchar led ; /* True, light led! */
uchar stat_led; /* Port open leds */
uchar led; /* True, light led! */
#endif
BYTE attached_serial[4]; /* Attached serial number */
BYTE attached_host_serial[4];
/* Serial number of Host who
booted the other end */
WORD descheduled ; /* Currently Descheduled */
WORD descheduled; /* Currently Descheduled */
WORD state; /* Current state */
WORD send_poll ; /* Send a Poll Packet */
Process_ptr ltt_p ; /* Process Descriptor */
Process_ptr lrt_p ; /* Process Descriptor */
WORD lrt_status ; /* Current lrt status */
WORD ltt_status ; /* Current ltt status */
WORD timeout ; /* Timeout value */
WORD send_poll; /* Send a Poll Packet */
Process_ptr ltt_p; /* Process Descriptor */
Process_ptr lrt_p; /* Process Descriptor */
WORD lrt_status; /* Current lrt status */
WORD ltt_status; /* Current ltt status */
WORD timeout; /* Timeout value */
WORD topology; /* Topology bits */
WORD mon_ltt ;
WORD mon_lrt ;
WORD WaitNoBoot ; /* Secs to hold off booting */
WORD mon_ltt;
WORD mon_lrt;
WORD WaitNoBoot; /* Secs to hold off booting */
PKT_ptr add_packet_list; /* Add packets to here */
PKT_ptr remove_packet_list; /* Send packets from here */
#ifdef RTA
......@@ -150,38 +150,38 @@ struct LPB {
#else
#define QBUFS_PER_REDIRECT (8 / PKTS_PER_BUFFER + 1)
#endif
PKT_ptr_ptr rd_add ; /* Add a new Packet here */
PKT_ptr_ptr rd_add; /* Add a new Packet here */
Q_BUF_ptr rd_add_qb; /* Pointer to the add Q buf */
PKT_ptr_ptr rd_add_st_qbb ; /* Pointer to start of the Q's buf */
PKT_ptr_ptr rd_add_end_qbb ; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rd_remove ; /* Remove a Packet here */
Q_BUF_ptr rd_remove_qb ; /* Pointer to the remove Q buf */
PKT_ptr_ptr rd_remove_st_qbb ; /* Pointer to the start of the Q buf */
PKT_ptr_ptr rd_remove_end_qbb ; /* Pointer to the end of the Q buf */
ushort pkts_in_q ; /* Packets in queue */
PKT_ptr_ptr rd_add_st_qbb; /* Pointer to start of the Q's buf */
PKT_ptr_ptr rd_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rd_remove; /* Remove a Packet here */
Q_BUF_ptr rd_remove_qb; /* Pointer to the remove Q buf */
PKT_ptr_ptr rd_remove_st_qbb; /* Pointer to the start of the Q buf */
PKT_ptr_ptr rd_remove_end_qbb; /* Pointer to the end of the Q buf */
ushort pkts_in_q; /* Packets in queue */
#endif
Channel_ptr lrt_fail_chan ; /* Lrt's failure channel */
Channel_ptr ltt_fail_chan ; /* Ltt's failure channel */
Channel_ptr lrt_fail_chan; /* Lrt's failure channel */
Channel_ptr ltt_fail_chan; /* Ltt's failure channel */
#if defined (HOST) || defined (INKERNEL)
/* RUP structure for HOST to driver communications */
struct RUP rup ;
struct RUP rup;
#endif
struct RUP link_rup; /* RUP for the link (POLL,
topology etc.) */
WORD attached_link ; /* Number of attached link */
WORD csum_errors ; /* csum errors */
WORD num_disconnects ; /* number of disconnects */
WORD num_sync_rcvd ; /* # sync's received */
WORD num_sync_rqst ; /* # sync requests */
WORD num_tx ; /* Num pkts sent */
WORD num_rx ; /* Num pkts received */
WORD attached_link; /* Number of attached link */
WORD csum_errors; /* csum errors */
WORD num_disconnects; /* number of disconnects */
WORD num_sync_rcvd; /* # sync's received */
WORD num_sync_rqst; /* # sync requests */
WORD num_tx; /* Num pkts sent */
WORD num_rx; /* Num pkts received */
WORD module_attached; /* Module tpyes of attached */
WORD led_timeout; /* LED timeout */
WORD first_port; /* First port to service */
WORD last_port; /* Last port to service */
} ;
};
#endif
......
......@@ -118,5 +118,3 @@ the definitions from Linux, and is incompatible... */
#define RIO_B64000 0x12 /* 64000 baud */
#define RIO_B115200 0x13 /* 115200 baud */
#define RIO_B2000 0x14 /* 2000 baud */
......@@ -38,7 +38,7 @@
#ifdef SCCS_LABELS
#ifndef lint
static char *_rio_list_h_sccs = "@(#)list.h 1.9" ;
static char *_rio_list_h_sccs = "@(#)list.h 1.9";
#endif
#endif
......
......@@ -36,7 +36,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_lrt_h_sccs = "@(#)lrt.h 1.1" ;
static char *_rio_lrt_h_sccs = "@(#)lrt.h 1.1";
#endif
#endif
......@@ -50,6 +50,3 @@ static char *_rio_lrt_h_sccs = "@(#)lrt.h 1.1" ;
/*********** end of file ***********/
......@@ -36,7 +36,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_ltt_h_sccs = "@(#)ltt.h 1.1" ;
static char *_rio_ltt_h_sccs = "@(#)ltt.h 1.1";
#endif
#endif
......@@ -50,6 +50,3 @@ static char *_rio_ltt_h_sccs = "@(#)ltt.h 1.1" ;
/*********** end of file ***********/
......@@ -39,7 +39,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_lttwake_h_sccs = "@(#)lttwake.h 1.1" ;
static char *_rio_lttwake_h_sccs = "@(#)lttwake.h 1.1";
#endif
#endif
......@@ -48,6 +48,3 @@ static char *_rio_lttwake_h_sccs = "@(#)lttwake.h 1.1" ;
/*********** end of file ***********/
......@@ -46,8 +46,7 @@ static char *_map_h_sccs_ = "@(#)map.h 1.2";
#define TOTAL_MAP_ENTRIES (MAX_MAP_ENTRY*RIO_SLOTS)
#define MAX_NAME_LEN 32
struct Map
{
struct Map {
uint HostUniqueNum; /* Supporting hosts unique number */
uint RtaUniqueNum; /* Unique number */
/*
......
......@@ -42,8 +42,7 @@ static char *_param_h_sccs_ = "@(#)param.h 1.2";
** the param command block, as used in OPEN and PARAM calls.
*/
struct phb_param
{
struct phb_param {
BYTE Cmd; /* It is very important that these line up */
BYTE Cor1; /* with what is expected at the other end. */
BYTE Cor2; /* to confirm that you've got it right, */
......
......@@ -44,53 +44,50 @@
#endif
#endif
typedef struct PARM_MAP PARM_MAP ;
typedef struct PARM_MAP PARM_MAP;
struct PARM_MAP
{
PHB_ptr phb_ptr ; /* Pointer to the PHB array */
WORD_ptr phb_num_ptr ; /* Ptr to Number of PHB's */
FREE_LIST_ptr free_list; /* Free List pointer */
FREE_LIST_ptr free_list_end; /* Free List End pointer */
Q_BUF_ptr_ptr q_free_list_ptr ; /* Ptr to Q_BUF variable */
BYTE_ptr unit_id_ptr ; /* Unit Id */
LPB_ptr link_str_ptr ; /* Link Structure Array */
BYTE_ptr bootloader_1 ; /* 1st Stage Boot Loader */
BYTE_ptr bootloader_2 ; /* 2nd Stage Boot Loader */
WORD_ptr port_route_map_ptr ; /* Port Route Map */
ROUTE_STR_ptr route_ptr ; /* Unit Route Map */
NUMBER_ptr map_present ; /* Route Map present */
NUMBER pkt_num ; /* Total number of packets */
NUMBER q_num ; /* Total number of Q packets */
WORD buffers_per_port ; /* Number of buffers per port */
WORD heap_size ; /* Initial size of heap */
WORD heap_left ; /* Current Heap left */
WORD error ; /* Error code */
WORD tx_max; /* Max number of tx pkts per phb */
WORD rx_max; /* Max number of rx pkts per phb */
WORD rx_limit; /* For high / low watermarks */
NUMBER links ; /* Links to use */
NUMBER timer ; /* Interrupts per second */
RUP_ptr rups ; /* Pointer to the RUPs */
WORD max_phb ; /* Mostly for debugging */
WORD living ; /* Just increments!! */
WORD init_done ; /* Initialisation over */
WORD booting_link ;
WORD idle_count ; /* Idle time counter */
WORD busy_count ; /* Busy counter */
WORD idle_control ; /* Control Idle Process */
struct PARM_MAP {
PHB_ptr phb_ptr; /* Pointer to the PHB array */
WORD_ptr phb_num_ptr; /* Ptr to Number of PHB's */
FREE_LIST_ptr free_list; /* Free List pointer */
FREE_LIST_ptr free_list_end; /* Free List End pointer */
Q_BUF_ptr_ptr q_free_list_ptr; /* Ptr to Q_BUF variable */
BYTE_ptr unit_id_ptr; /* Unit Id */
LPB_ptr link_str_ptr; /* Link Structure Array */
BYTE_ptr bootloader_1; /* 1st Stage Boot Loader */
BYTE_ptr bootloader_2; /* 2nd Stage Boot Loader */
WORD_ptr port_route_map_ptr; /* Port Route Map */
ROUTE_STR_ptr route_ptr; /* Unit Route Map */
NUMBER_ptr map_present; /* Route Map present */
NUMBER pkt_num; /* Total number of packets */
NUMBER q_num; /* Total number of Q packets */
WORD buffers_per_port; /* Number of buffers per port */
WORD heap_size; /* Initial size of heap */
WORD heap_left; /* Current Heap left */
WORD error; /* Error code */
WORD tx_max; /* Max number of tx pkts per phb */
WORD rx_max; /* Max number of rx pkts per phb */
WORD rx_limit; /* For high / low watermarks */
NUMBER links; /* Links to use */
NUMBER timer; /* Interrupts per second */
RUP_ptr rups; /* Pointer to the RUPs */
WORD max_phb; /* Mostly for debugging */
WORD living; /* Just increments!! */
WORD init_done; /* Initialisation over */
WORD booting_link;
WORD idle_count; /* Idle time counter */
WORD busy_count; /* Busy counter */
WORD idle_control; /* Control Idle Process */
#if defined(HOST) || defined(INKERNEL)
WORD tx_intr; /* TX interrupt pending */
WORD rx_intr; /* RX interrupt pending */
WORD rup_intr; /* RUP interrupt pending */
WORD tx_intr; /* TX interrupt pending */
WORD rx_intr; /* RX interrupt pending */
WORD rup_intr; /* RUP interrupt pending */
#endif
#if defined(RTA)
WORD dying_count; /* Count of processes dead */
WORD dying_count; /* Count of processes dead */
#endif
} ;
};
#endif
/*********** end of file ***********/
......@@ -155,7 +155,7 @@
#define rx_end u4.s1.rx_end_ptr_ptr
#define rx_remove u4.s1.rx_remove_ptr_ptr
#endif
typedef struct PHB PHB ;
typedef struct PHB PHB;
struct PHB {
#ifdef RTA
ushort port;
......@@ -163,28 +163,24 @@ struct PHB {
#ifdef INKERNEL
WORD source;
#else
union
{
union {
ushort source; /* Complete source */
struct
{
struct {
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
#endif
WORD handshake ;
WORD status ;
NUMBER timeout ; /* Maximum of 1.9 seconds */
WORD link ; /* Send down this link */
WORD handshake;
WORD status;
NUMBER timeout; /* Maximum of 1.9 seconds */
WORD link; /* Send down this link */
#ifdef INKERNEL
WORD destination;
#else
union
{
union {
ushort destination; /* Complete destination */
struct
{
struct {
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
......@@ -193,39 +189,36 @@ struct PHB {
#ifdef RTA
ushort tx_pkts_added;
ushort tx_pkts_removed;
Q_BUF_ptr tx_q_start ; /* Start of the Q list chain */
short num_tx_q_bufs ; /* Number of Q buffers in the chain */
PKT_ptr_ptr tx_add ; /* Add a new Packet here */
Q_BUF_ptr tx_q_start; /* Start of the Q list chain */
short num_tx_q_bufs; /* Number of Q buffers in the chain */
PKT_ptr_ptr tx_add; /* Add a new Packet here */
Q_BUF_ptr tx_add_qb; /* Pointer to the add Q buf */
PKT_ptr_ptr tx_add_st_qbb ; /* Pointer to start of the Q's buf */
PKT_ptr_ptr tx_add_end_qbb ; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr tx_remove ; /* Remove a Packet here */
Q_BUF_ptr tx_remove_qb ; /* Pointer to the remove Q buf */
PKT_ptr_ptr tx_remove_st_qbb ; /* Pointer to the start of the Q buf */
PKT_ptr_ptr tx_remove_end_qbb ; /* Pointer to the end of the Q buf */
PKT_ptr_ptr tx_add_st_qbb; /* Pointer to start of the Q's buf */
PKT_ptr_ptr tx_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr tx_remove; /* Remove a Packet here */
Q_BUF_ptr tx_remove_qb; /* Pointer to the remove Q buf */
PKT_ptr_ptr tx_remove_st_qbb; /* Pointer to the start of the Q buf */
PKT_ptr_ptr tx_remove_end_qbb; /* Pointer to the end of the Q buf */
#endif
#ifdef INKERNEL
PKT_ptr_ptr tx_start ;
PKT_ptr_ptr tx_end ;
PKT_ptr_ptr tx_add ;
PKT_ptr_ptr tx_remove ;
PKT_ptr_ptr tx_start;
PKT_ptr_ptr tx_end;
PKT_ptr_ptr tx_add;
PKT_ptr_ptr tx_remove;
#endif
#ifdef HOST
union
{
struct
{
union {
struct {
PKT_ptr_ptr tx_start_ptr_ptr;
PKT_ptr_ptr tx_end_ptr_ptr;
PKT_ptr_ptr tx_add_ptr_ptr;
PKT_ptr_ptr tx_remove_ptr_ptr;
} s1;
struct
{
ushort * tx_start_ptr;
ushort * tx_end_ptr;
ushort * tx_add_ptr;
ushort * tx_remove_ptr;
struct {
ushort *tx_start_ptr;
ushort *tx_end_ptr;
ushort *tx_add_ptr;
ushort *tx_remove_ptr;
} s2;
} u3;
#endif
......@@ -233,39 +226,36 @@ struct PHB {
#ifdef RTA
ushort rx_pkts_added;
ushort rx_pkts_removed;
Q_BUF_ptr rx_q_start ; /* Start of the Q list chain */
short num_rx_q_bufs ; /* Number of Q buffers in the chain */
PKT_ptr_ptr rx_add ; /* Add a new Packet here */
Q_BUF_ptr rx_add_qb ; /* Pointer to the add Q buf */
PKT_ptr_ptr rx_add_st_qbb ; /* Pointer to start of the Q's buf */
PKT_ptr_ptr rx_add_end_qbb ; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rx_remove ; /* Remove a Packet here */
Q_BUF_ptr rx_remove_qb ; /* Pointer to the remove Q buf */
PKT_ptr_ptr rx_remove_st_qbb ; /* Pointer to the start of the Q buf */
PKT_ptr_ptr rx_remove_end_qbb ; /* Pointer to the end of the Q buf */
Q_BUF_ptr rx_q_start; /* Start of the Q list chain */
short num_rx_q_bufs; /* Number of Q buffers in the chain */
PKT_ptr_ptr rx_add; /* Add a new Packet here */
Q_BUF_ptr rx_add_qb; /* Pointer to the add Q buf */
PKT_ptr_ptr rx_add_st_qbb; /* Pointer to start of the Q's buf */
PKT_ptr_ptr rx_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rx_remove; /* Remove a Packet here */
Q_BUF_ptr rx_remove_qb; /* Pointer to the remove Q buf */
PKT_ptr_ptr rx_remove_st_qbb; /* Pointer to the start of the Q buf */
PKT_ptr_ptr rx_remove_end_qbb; /* Pointer to the end of the Q buf */
#endif
#ifdef INKERNEL
PKT_ptr_ptr rx_start ;
PKT_ptr_ptr rx_end ;
PKT_ptr_ptr rx_add ;
PKT_ptr_ptr rx_remove ;
PKT_ptr_ptr rx_start;
PKT_ptr_ptr rx_end;
PKT_ptr_ptr rx_add;
PKT_ptr_ptr rx_remove;
#endif
#ifdef HOST
union
{
struct
{
union {
struct {
PKT_ptr_ptr rx_start_ptr_ptr;
PKT_ptr_ptr rx_end_ptr_ptr;
PKT_ptr_ptr rx_add_ptr_ptr;
PKT_ptr_ptr rx_remove_ptr_ptr;
} s1;
struct
{
ushort * rx_start_ptr;
ushort * rx_end_ptr;
ushort * rx_add_ptr;
ushort * rx_remove_ptr;
struct {
ushort *rx_start_ptr;
ushort *rx_end_ptr;
ushort *rx_add_ptr;
ushort *rx_remove_ptr;
} s2;
} u4;
#endif
......@@ -285,9 +275,8 @@ struct PHB {
ushort MonitorTstate; /* TRUE if monitoring tstop */
#endif
} ;
};
#endif
/*********** end of file ***********/
......@@ -71,50 +71,42 @@
struct PKT {
#ifdef INKERNEL
BYTE dest_unit ; /* Destination Unit Id */
BYTE dest_port ; /* Destination POrt */
BYTE src_unit ; /* Source Unit Id */
BYTE src_port ; /* Source POrt */
BYTE dest_unit; /* Destination Unit Id */
BYTE dest_port; /* Destination POrt */
BYTE src_unit; /* Source Unit Id */
BYTE src_port; /* Source POrt */
#else
union
{
union {
ushort destination; /* Complete destination */
struct
{
struct {
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
} u1;
union
{
union {
ushort source; /* Complete source */
struct
{
struct {
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
#endif
#ifdef INKERNEL
BYTE len ;
BYTE len;
BYTE control;
#else
union
{
union {
ushort control;
struct
{
struct {
unsigned char len;
unsigned char control;
} s3;
} u3;
#endif
BYTE data[PKT_MAX_DATA_LEN] ;
BYTE data[PKT_MAX_DATA_LEN];
/* Actual data :-) */
WORD csum ; /* C-SUM */
} ;
WORD csum; /* C-SUM */
};
#endif
/*********** end of file ***********/
......@@ -39,7 +39,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_poll_h_sccs = "@(#)poll.h 1.2" ;
static char *_rio_poll_h_sccs = "@(#)poll.h 1.2";
#endif
#endif
......@@ -71,6 +71,3 @@ static char *_rio_poll_h_sccs = "@(#)poll.h 1.2" ;
#endif
/*********** end of file ***********/
......@@ -46,8 +46,7 @@ static char *_port_h_sccs_ = "@(#)port.h 1.3";
*/
#ifdef STATS
struct RIOStats
{
struct RIOStats {
/*
** interrupt statistics
*/
......@@ -91,8 +90,7 @@ struct RIOStats
/*
** Port data structure
*/
struct Port
{
struct Port {
struct gs_port gs;
int PortNum; /* RIO port no., 0-511 */
struct Host *HostP;
......@@ -177,8 +175,7 @@ struct Port
/*
** Transparent print stuff
*/
struct Xprint
{
struct Xprint {
#ifndef MAX_XP_CTRL_LEN
#define MAX_XP_CTRL_LEN 16 /* ALSO IN DAEMON.H */
#endif
......@@ -221,13 +218,12 @@ struct Port
spinlock_t portSem; /* Lock using this sem */
int MonitorTstate; /* Monitoring ? */
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 ? */
char * p; /* save the global struc here .. */
char *p; /* save the global struc here .. */
};
struct ModuleInfo
{
struct ModuleInfo {
char *Name;
uint Flags[4]; /* one per port on a module */
};
......
......@@ -23,15 +23,15 @@
/*
** boot.c
*/
void init_boot( char *p, short stage);
void init_boot(char *p, short stage);
/*
** disconct.c
*/
void kill_boot ( LPB *link );
void disconnected( LPB *link );
short boot_3( LPB *link, PKT *pkt );
short send_3_pkt( LPB *link, PKT *pkt);
void kill_boot(LPB * link);
void disconnected(LPB * link);
short boot_3(LPB * link, PKT * pkt);
short send_3_pkt(LPB * link, PKT * pkt);
/*
** error.c
......@@ -41,116 +41,116 @@ void du_error(void);
/*
** formpkt.c
*/
ushort sum_it( PKT *pkt ) ;
void form_rup_pkt( RUP *form_rup, PKT *pkt );
void form_poll_pkt ( int type, LPB *link, int node );
void form_route_pkt ( int type, PKT *pkt, LPB *link );
ushort sum_it(PKT * pkt);
void form_rup_pkt(RUP * form_rup, PKT * pkt);
void form_poll_pkt(int type, LPB * link, int node);
void form_route_pkt(int type, PKT * pkt, LPB * link);
/*
** idle.c
*/
void idle( Process *idle_p );
void idle(Process * idle_p);
/*
** init.c
*/
void general_init(void);
void mem_halt( int error);
void mem_halt(int error);
/*
** linkinit.c
*/
void initlink( u_short number, LPB *link);
void runlink( LPB *link);
void initlink(u_short number, LPB * link);
void runlink(LPB * link);
/*
** list.c
*/
PKT *get_free_start(void);
void put_free_start( PKT *pkt);
void put_free_start(PKT * pkt);
#ifdef HOST
int can_remove_transmit ( PKT **pkt, PKT *pointer );
int can_remove_transmit(PKT ** pkt, PKT * pointer);
#endif
#ifdef RTA
int spl7 ( void );
int spl0 ( void );
Q_BUF *get_free_q( void );
int spl7(void);
int spl0(void);
Q_BUF *get_free_q(void);
PKT *get_free_end(void);
int add_end( PKT *pkt, PHB *phb, int type);
unsigned short free_packets( PHB *phb, int type);
int can_remove_start( PKT **pkt, PHB *phb, int type);
int can_add_start( PHB *phb, int type);
int can_add_end( PHB *phb, int type);
void put_free_end( PKT *pkt);
int remove_start( PKT **pkt, PHB *phb, int type);
int add_end(PKT * pkt, PHB * phb, int type);
unsigned short free_packets(PHB * phb, int type);
int can_remove_start(PKT ** pkt, PHB * phb, int type);
int can_add_start(PHB * phb, int type);
int can_add_end(PHB * phb, int type);
void put_free_end(PKT * pkt);
int remove_start(PKT ** pkt, PHB * phb, int type);
#endif
/*
** Lrt.c
*/
void lrt( Process *lrt_p, LPB *link );
void lrt(Process * lrt_p, LPB * link);
#ifdef RTA
void set_led_red ( LPB *link );
void set_led_red(LPB * link);
#endif
/*
** ltt.c
*/
void ltt( Process *ltt_p, LPB *link, PHB *phb_ptr[] );
void send_poll ( LPB *link );
void request_id ( LPB *link );
void send_topology_update ( LPB *link );
void send_topology ( LPB *link );
void supply_id ( LPB *link );
void ltt(Process * ltt_p, LPB * link, PHB * phb_ptr[]);
void send_poll(LPB * link);
void request_id(LPB * link);
void send_topology_update(LPB * link);
void send_topology(LPB * link);
void supply_id(LPB * link);
#ifdef RTA
void redirect_queue ( LPB *link, ushort flush );
int obtain_rup ( int rup_number, PKT **pkt_address, LPB *link );
void redirect_queue(LPB * link, ushort flush);
int obtain_rup(int rup_number, PKT ** pkt_address, LPB * link);
#endif
#ifdef TESTING_PERF
int consume_cpu( void );
int consume_cpu(void);
#endif
/*
** lttwake.c
*/
#ifdef HOST
void ltt_wakeup( Process *ltt_wakeup_p );
void ltt_wakeup(Process * ltt_wakeup_p);
#endif
/*
** mapgen.c
*/
void generate_id_map( short mapping, ROUTE_STR route[] );
void gen_map( int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl );
void adjust_ttl( int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl);
void generate_id_map(short mapping, ROUTE_STR route[]);
void gen_map(int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl);
void adjust_ttl(int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl);
void init_sys_map(void);
/*
** mmu.c
*/
char *rio_malloc( unsigned int amount);
char *rio_calloc( unsigned int num, unsigned int size);
ERROR rio_mmu_init( uint total_mem );
char *rio_malloc(unsigned int amount);
char *rio_calloc(unsigned int num, unsigned int size);
ERROR rio_mmu_init(uint total_mem);
/*
** partn.c
*/
void partition_tx( struct PHB *phb, u_short tx_size, u_short rx_size, u_short rx_limit);
void partition_tx(struct PHB *phb, u_short tx_size, u_short rx_size, u_short rx_limit);
/*
** poll.c
*/
void tx_poll( Process *tx_poll_p);
void tx_poll(Process * tx_poll_p);
/*
** process.c
*/
int get_proc_space( Process **pd, int **pws, int wssize);
int get_proc_space(Process ** pd, int **pws, int wssize);
/*
** readrom.c
......@@ -160,12 +160,12 @@ void read_serial_number(char *buf);
/*
** rio.c
*/
int main( void );
int main(void);
/*
** route.c
*/
void route_update ( PKT *pkt, LPB *link);
void route_update(PKT * pkt, LPB * link);
/*
** rtainit.c
......@@ -177,68 +177,68 @@ void rta_init(ushort RtaType);
/*
** rupboot.c
*/
void rup_boot( PKT *pkt, RUP *this_rup, LPB *link);
void rup_boot(PKT * pkt, RUP * this_rup, LPB * link);
#ifdef RTA
void kill_your_neighbour( int link_to_kill );
void kill_your_neighbour(int link_to_kill);
#endif
/*
** rupcmd.c
*/
void rup_command( PKT *pkt, struct RUP *this_rup, LPB *link);
void rup_command(PKT * pkt, struct RUP *this_rup, LPB * link);
/*
** ruperr.c
*/
void rup_error( PKT *pkt, RUP *this_rup, LPB *link );
void illegal_cmd( PKT *src_pkt );
void rup_error(PKT * pkt, RUP * this_rup, LPB * link);
void illegal_cmd(PKT * src_pkt);
/*
** ruppoll.c
*/
void rup_poll( PKT *pkt, RUP *this_rup, LPB *link );
void rup_poll(PKT * pkt, RUP * this_rup, LPB * link);
/*
** ruppower.c
*/
void rup_power( PKT *pkt, RUP *this_rup, LPB *link );
void rup_power(PKT * pkt, RUP * this_rup, LPB * link);
/*
** ruprm.c
*/
void rup_route_map( PKT *pkt, RUP *this_rup, LPB *link);
void rup_route_map(PKT * pkt, RUP * this_rup, LPB * link);
/*
** rupstat.c
*/
void rup_status( PKT *pkt, RUP *this_rup, LPB *link);
void rup_status(PKT * pkt, RUP * this_rup, LPB * link);
/*
** rupsync.c
*/
void rup_sync( PKT *pkt);
void rup_sync(PKT * pkt);
/*
** rxpkt.c
*/
ERROR rx_pkt( PKT_ptr_ptr pkt_address, LPB *link);
ERROR rx_pkt(PKT_ptr_ptr pkt_address, LPB * link);
/*
** sendsts.c
*/
void send_status( PKT *requesting_pkt, RUP *this_rup);
void send_status(PKT * requesting_pkt, RUP * this_rup);
/*
** serial.c
*/
void assign_serial ( char *ser_in, char *ser_out);
int cmp_serial ( char *ser_1, char *ser_2);
void assign_serial(char *ser_in, char *ser_out);
int cmp_serial(char *ser_1, char *ser_2);
/*
** txpkt.c
*/
ERROR tx_pkt( PKT *pkt, LPB *link);
short send_sync( LPB *link);
ERROR tx_pkt(PKT * pkt, LPB * link);
short send_sync(LPB * link);
#endif /* _prototypes_h */
......@@ -115,5 +115,3 @@
#endif
/*********** end of file ***********/
......@@ -40,7 +40,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_qbuf_h_sccs = "@(#)qbuf.h 1.1" ;
static char *_rio_qbuf_h_sccs = "@(#)qbuf.h 1.1";
#endif
#endif
......@@ -52,16 +52,15 @@ static char *_rio_qbuf_h_sccs = "@(#)qbuf.h 1.1" ;
#define PKTS_PER_BUFFER (220 / PKT_LENGTH)
#endif
typedef struct Q_BUF Q_BUF ;
typedef struct Q_BUF Q_BUF;
struct Q_BUF {
Q_BUF_ptr next ;
Q_BUF_ptr prev ;
PKT_ptr buf[PKTS_PER_BUFFER] ;
} ;
Q_BUF_ptr next;
Q_BUF_ptr prev;
PKT_ptr buf[PKTS_PER_BUFFER];
};
#endif
/*********** end of file ***********/
......@@ -216,8 +216,7 @@ static char *_rio_h_sccs_ = "@(#)rio.h 1.3";
#define RIO_PRI (PZERO+10)
#define RIO_CLOSE_PRI PZERO-1 /* uninterruptible sleeps for close */
typedef struct DbInf
{
typedef struct DbInf {
uint Flag;
char Name[8];
} DbInf;
......
This diff is collapsed.
......@@ -131,27 +131,27 @@ struct vpd_prom {
#ifdef CONFIG_RIO_OLDPCI
static inline void *rio_memcpy_toio (void *dummy, void *dest, void *source, int n)
static inline void *rio_memcpy_toio(void *dummy, void *dest, void *source, int n)
{
char *dst = dest;
char *src = source;
while (n--) {
writeb (*src++, dst++);
(void) readb (dummy);
writeb(*src++, dst++);
(void) readb(dummy);
}
return dest;
}
static inline void *rio_memcpy_fromio (void *dest, void *source, int n)
static inline void *rio_memcpy_fromio(void *dest, void *source, int n)
{
char *dst = dest;
char *src = source;
while (n--)
*dst++ = readb (src++);
*dst++ = readb(src++);
return dest;
}
......@@ -184,4 +184,3 @@ static inline void *rio_memcpy_fromio (void *dest, void *source, int n)
#define func_exit()
#define func_enter2()
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -51,7 +51,7 @@ struct rio_info {
int RIOInstallAttempts; /* no. of rio-install() calls */
int RIOLastPCISearch; /* status of last search */
int RIONumHosts; /* Number of RIO Hosts */
struct Host * RIOHosts; /* RIO Host values */
struct Host *RIOHosts; /* RIO Host values */
struct Port **RIOPortp; /* RIO port values */
/*
** 02.03.1999 ARG - ESIL 0820 fix
......@@ -115,7 +115,7 @@ struct rio_info {
struct Error RIOError; /* to Identify what went wrong */
struct Conf RIOConf; /* Configuration ??? */
struct ttystatics channel[RIO_PORTS]; /* channel information */
char RIOBootPackets[1+(SIXTY_FOUR_K/RTA_BOOT_DATA_SIZE)]
char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
[RTA_BOOT_DATA_SIZE];
struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
......
......@@ -46,7 +46,7 @@ struct RioHostInfo {
int bus; /* ISA/EISA/MCA/PCI */
int mode; /* pointer to host mode - INTERRUPT / POLLED */
struct old_sgttyb
* Sg; /* pointer to default term characteristics */
*Sg; /* pointer to default term characteristics */
};
......
This diff is collapsed.
This diff is collapsed.
/* Yeah. We have copyright on this one. Sure. */
void rio_pcicopy( char *from, char *to, int amount)
void rio_pcicopy(char *from, char *to, int amount)
{
while ( amount-- )
while (amount--)
*to++ = *from++;
}
This diff is collapsed.
......@@ -47,8 +47,7 @@ static char *_riospace_h_sccs_ = "@(#)riospace.h 1.2";
** In particular, it won't be able to see changes to RIO_SLOTS
*/
struct Conf
{
struct Conf {
char Locator[24];
unsigned int StartupTime;
unsigned int SlowCook;
......@@ -86,15 +85,13 @@ struct Conf
/*
** Board data structure. This is used for configuration info
*/
struct Brd
{
struct Brd {
unsigned char Type; /* RIO_EISA, RIO_MCA, RIO_AT, RIO_EMPTY... */
unsigned char Ivec; /* POLLED or ivec number */
unsigned char Mode; /* Control stuff, see below */
};
struct Board
{
struct Board {
char Locator[RIO_LOCATOR_LEN];
int NumSlots;
struct Brd Boards[MAX_RIO_BOARDS];
......
This diff is collapsed.
......@@ -40,7 +40,7 @@
#ifndef lint
#ifdef SCCS
static char *_rio_riotime_h_sccs = "@(#)riotime.h 1.1" ;
static char *_rio_riotime_h_sccs = "@(#)riotime.h 1.1";
#endif
#endif
......
This diff is collapsed.
......@@ -97,16 +97,16 @@ typedef short NUMBER;
typedef short *NUMBER_ptr;
typedef unsigned short *WORD_ptr;
typedef unsigned char *BYTE_ptr;
typedef unsigned char uchar ;
typedef unsigned short ushort ;
typedef unsigned int uint ;
typedef unsigned long ulong ;
typedef unsigned char u_char ;
typedef unsigned short u_short ;
typedef unsigned int u_int ;
typedef unsigned long u_long ;
typedef unsigned short ERROR ;
typedef unsigned long ID ;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short ERROR;
typedef unsigned long ID;
typedef char *char_ptr;
typedef Channel *Channel_ptr;
typedef struct FREE_LIST *FREE_LIST_ptr;
......@@ -132,4 +132,3 @@ typedef struct RUP RUP;
#endif /* __riotypes__ */
/*********** end of file ***********/
......@@ -60,8 +60,7 @@
/* The PARM_MAP structure defines global values relating to the Host Card / RTA
and is the main structure from which all other structures are referenced. */
typedef struct _PARM_MAP
{
typedef struct _PARM_MAP {
_u16 phb_ptr; /* 0x00 Pointer to the PHB array */
_u16 phb_num_ptr; /* 0x02 Ptr to Number of PHB's */
_u16 free_list; /* 0x04 Free List pointer */
......@@ -184,8 +183,7 @@ typedef struct _PARM_MAP
attached to the system and there is normally an array of MAX_RUPS (=16) structures
in a host card, defined by PARM_MAP->rup. */
typedef struct _RUP
{
typedef struct _RUP {
_u16 txpkt; /* 0x00 Outgoing packet */
_u16 rxpkt; /* 0x02 ncoming packet */
_u16 link; /* 0x04 Which link to send packet down ? */
......@@ -234,8 +232,7 @@ typedef struct _RUP
to the system and there is normally an array of MAX_PHBS (=128) structures
in a host card, defined by PARM_MAP->phb_ptr and PARM_MAP->phb_num_ptr. */
typedef struct _PHB
{
typedef struct _PHB {
_u16 source; /* 0x00 Location of the PHB in the host card */
_u16 handshake; /* 0x02 Used to manage receive packet flow control */
_u16 status; /* 0x04 Internal port transmit/receive status */
......@@ -291,13 +288,12 @@ typedef struct _PHB
and there is normally an array of MAX_LINKS (=4) structures in a host card,
defined by PARM_MAP->link_str_ptr. */
typedef struct _LPB
{
typedef struct _LPB {
_u16 link_number; /* 0x00 Link Number */
_u16 in_ch; /* 0x02 Link In Channel */
_u16 out_ch; /* 0x04 Link Out Channel */
_u8 attached_serial[4]; /* 0x06 Attached serial number */
_u8 attached_host_serial[4];/* 0x0A Serial number of Host who booted other end */
_u8 attached_host_serial[4]; /* 0x0A Serial number of Host who booted other end */
_u16 descheduled; /* 0x0E Currently Descheduled */
_u16 state; /* 0x10 Current state */
_u16 send_poll; /* 0x12 Send a Poll Packet */
......@@ -380,8 +376,7 @@ typedef struct _LPB
/* Used to overlay packet headers when allocating/freeing packets from the free list */
typedef struct _FREE_LIST
{
typedef struct _FREE_LIST {
_u16 next; /* 0x00 offset of next list item */
_u16 prev; /* 0x02 offset of previous list item */
......@@ -403,8 +398,7 @@ typedef struct _FREE_LIST
#define PKT_MAX_DATA_LEN 72 /* Size of packet data */
typedef struct _PKT
{
typedef struct _PKT {
_u8 dest_unit; /* 0x00 Destination Unit Id */
_u8 dest_port; /* 0x01 Destination Port */
_u8 src_unit; /* 0x02 Source Unit Id */
......
......@@ -39,19 +39,19 @@
#ifndef lint
#ifdef SCCS
static char *_rio_rom_h_sccs = "@(#)rom.h 1.1" ;
static char *_rio_rom_h_sccs = "@(#)rom.h 1.1";
#endif
#endif
typedef struct ROM ROM ;
typedef struct ROM ROM;
struct ROM {
u_short slx ;
char pcb_letter_rev ;
char pcb_number_rev ;
char serial[4] ;
char year ;
char week ;
} ;
u_short slx;
char pcb_letter_rev;
char pcb_number_rev;
char serial[4];
char year;
char week;
};
#endif
......@@ -60,5 +60,3 @@ struct ROM {
#define ROM_LENGTH 0x20
/*********** end of file ***********/
......@@ -74,14 +74,14 @@ typedef struct COST_ROUTE COST_ROUTE;
struct COST_ROUTE {
unsigned char cost; /* Cost down this link */
unsigned char route[NODE_BYTES]; /* Nodes thorough this route */
} ;
};
typedef struct ROUTE_STR ROUTE_STR ;
typedef struct ROUTE_STR ROUTE_STR;
struct ROUTE_STR {
COST_ROUTE cost_route[MAX_LINKS];
/* cost / route for this link */
ushort favoured; /* favoured link */
} ;
};
#define NO_LINK (short) 5 /* Link unattached */
......@@ -105,4 +105,3 @@ struct ROUTE_STR {
#endif
/*********** end of file ***********/
......@@ -37,7 +37,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_rtahw_h_sccs = "@(#)rtahw.h 1.5" ;
static char *_rio_rtahw_h_sccs = "@(#)rtahw.h 1.5";
#endif
#endif
......
......@@ -74,9 +74,8 @@ struct RUP {
WORD status; /* Status */
WORD txcontrol; /* Transmit control */
WORD rxcontrol; /* Receive control */
};
};
#endif
/*********** end of file ***********/
......@@ -39,7 +39,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1" ;
static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1";
#endif
#endif
......@@ -48,4 +48,3 @@ static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1" ;
#define STATUS_TOPOLOGY 2
#endif
......@@ -60,15 +60,12 @@
#define RX FALSE
typedef struct FREE_LIST FREE_LIST ;
typedef struct FREE_LIST FREE_LIST;
struct FREE_LIST {
FREE_LIST_ptr next ;
FREE_LIST_ptr prev ;
} ;
FREE_LIST_ptr next;
FREE_LIST_ptr prev;
};
#endif
/*********** end of file ***********/
......@@ -43,7 +43,7 @@ typedef struct {
unsigned int result; /* Result value */
unsigned int dataIn;
unsigned int dataOut;
}selftestStruct;
} selftestStruct;
/*
** The different tests are identified by the following data values.
......
......@@ -37,27 +37,26 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_sysmap_h_sccs = "@(#)sysmap.h 1.1" ;
static char *_rio_sysmap_h_sccs = "@(#)sysmap.h 1.1";
#endif
#endif
#define SYSTEM_MAP_LEN 64 /* Len of System Map array */
typedef struct SYS_MAP SYS_MAP ;
typedef struct SYS_MAP_LINK SYS_MAP_LINK ;
typedef struct SYS_MAP SYS_MAP;
typedef struct SYS_MAP_LINK SYS_MAP_LINK;
struct SYS_MAP_LINK {
short id ; /* Unit Id */
short link ; /* Id's Link */
short been_here ; /* Used by map_gen */
} ;
short id; /* Unit Id */
short link; /* Id's Link */
short been_here; /* Used by map_gen */
};
struct SYS_MAP {
char serial_num[4] ;
SYS_MAP_LINK link[4] ;
} ;
char serial_num[4];
SYS_MAP_LINK link[4];
};
/*********** end of file ***********/
......@@ -37,7 +37,7 @@
#ifndef lint
#ifdef SCCS_LABELS
static char *_rio_defaults_h_sccs = "@(#)timeouts.h 1.3" ;
static char *_rio_defaults_h_sccs = "@(#)timeouts.h 1.3";
#endif
#endif
......@@ -48,4 +48,3 @@ static char *_rio_defaults_h_sccs = "@(#)timeouts.h 1.3" ;
/*********** end of file ***********/
......@@ -40,8 +40,7 @@ static char *_top_h_sccs_ = "@(#)top.h 1.2";
/*
** Topology information
*/
struct Top
{
struct Top {
uchar Unit;
uchar Link;
};
......
......@@ -41,8 +41,7 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2";
** UnixRup data structure. This contains pointers to actual RUPs on the
** host card, and all the command/boot control stuff.
*/
struct UnixRup
{
struct UnixRup {
struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */
struct CmdBlk *CmdPendingP; /* The command currently being sent */
struct RUP *RupP; /* the Rup to send it to */
......@@ -50,7 +49,7 @@ struct UnixRup
uint BaseSysPort; /* SysPort of first tty on this RTA */
uint ModTypes; /* Modules on this RTA */
spinlock_t RupLock; /* Lock structure for MPX */
/* struct lockb RupLock; */ /* Lock structure for MPX */
/* struct lockb RupLock; *//* Lock structure for MPX */
};
#endif /* __rio_unixrup_h__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment