提交 8d8706e2 编写于 作者: A Andrew Morton 提交者: 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: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a9415644
......@@ -52,63 +52,57 @@ static char *_board_h_sccs_ = "@(#)board.h 1.2";
/*
** The shape of the Host Control area, at offset 0x7C00, Write Only
*/
struct s_Ctrl
{
BYTE DpCtl; /* 7C00 */
BYTE Dp_Unused2_[127];
BYTE DpIntSet; /* 7C80 */
BYTE Dp_Unused3_[127];
BYTE DpTpuReset; /* 7D00 */
BYTE Dp_Unused4_[127];
BYTE DpIntReset; /* 7D80 */
BYTE Dp_Unused5_[127];
struct s_Ctrl {
BYTE DpCtl; /* 7C00 */
BYTE Dp_Unused2_[127];
BYTE DpIntSet; /* 7C80 */
BYTE Dp_Unused3_[127];
BYTE DpTpuReset; /* 7D00 */
BYTE Dp_Unused4_[127];
BYTE DpIntReset; /* 7D80 */
BYTE Dp_Unused5_[127];
};
/*
** The PROM data area on the host (0x7C00), Read Only
*/
struct s_Prom
{
WORD DpSlxCode[2];
WORD DpRev;
WORD Dp_Unused6_;
WORD DpUniq[4];
WORD DpJahre;
WORD DpWoche;
WORD DpHwFeature[5];
WORD DpOemId;
WORD DpSiggy[16];
struct s_Prom {
WORD DpSlxCode[2];
WORD DpRev;
WORD Dp_Unused6_;
WORD DpUniq[4];
WORD DpJahre;
WORD DpWoche;
WORD DpHwFeature[5];
WORD DpOemId;
WORD DpSiggy[16];
};
/*
** Union of the Ctrl and Prom areas
*/
union u_CtrlProm /* This is the control/PROM area (0x7C00) */
{
struct s_Ctrl DpCtrl;
struct s_Prom DpProm;
union u_CtrlProm { /* This is the control/PROM area (0x7C00) */
struct s_Ctrl DpCtrl;
struct s_Prom DpProm;
};
/*
** The top end of memory!
*/
struct s_ParmMapS /* Area containing Parm Map Pointer */
{
BYTE Dp_Unused8_[DP_PARMMAP_ADDR];
WORD DpParmMapAd;
struct s_ParmMapS { /* Area containing Parm Map Pointer */
BYTE Dp_Unused8_[DP_PARMMAP_ADDR];
WORD DpParmMapAd;
};
struct s_StartUpS
{
BYTE Dp_Unused9_[DP_STARTUP_ADDR];
BYTE Dp_LongJump[0x4];
BYTE Dp_Unused10_[2];
BYTE Dp_ShortJump[0x2];
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) */
{
BYTE DpSramMem[DP_SRAM2_SIZE];
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,13 +110,12 @@ union u_Sram2ParmMap /* This is the top of memory (0x7E00-0x7FFF) */
/*
** This is the DP RAM overlay.
*/
struct DpRam
{
BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */
BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
struct DpRam {
BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */
BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
};
#define DpControl DpCtrlProm.DpCtrl.DpCtl
......
......@@ -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,11 +97,10 @@
#define MAX_RATE B2000
struct baud_rate /* Tag for baud rates */
{
/* short host_rate,*/ /* As passed by the driver */
short divisor, /* The divisor */
prescaler; /* The pre-scaler */
struct baud_rate { /* Tag for baud rates */
/* short host_rate, *//* As passed by the driver */
short divisor, /* The divisor */
prescaler; /* The pre-scaler */
};
#endif
......@@ -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
......
......@@ -73,20 +73,20 @@
#define TIMER_TICK 0x82
#define STOP_BREAK 0x83
#define BASE(a) ((a) < 4 ? (short*)CIRRUS_FIRST : ((a) < 8 ? (short *)CIRRUS_SECOND : ((a) < 12 ? (short*)CIRRUS_THIRD : (short *)CIRRUS_FOURTH)))
#define txack1 ((short *)0x7104)
#define rxack1 ((short *)0x7102)
#define txack1 ((short *)0x7104)
#define rxack1 ((short *)0x7102)
#define mdack1 ((short *)0x7106)
#define txack2 ((short *)0x7006)
#define rxack2 ((short *)0x7004)
#define mdack2 ((short *)0x7100)
#define txack2 ((short *)0x7006)
#define rxack2 ((short *)0x7004)
#define mdack2 ((short *)0x7100)
#define int_latch ((short *) 0x7800)
#define int_status ((short *) 0x7c00)
#define tx1_pending 0x20
#define rx1_pending 0x10
#define md1_pending 0x40
#define tx2_pending 0x02
#define rx2_pending 0x01
#define md2_pending 0x40
#define int_status ((short *) 0x7c00)
#define tx1_pending 0x20
#define rx1_pending 0x10
#define md1_pending 0x40
#define tx2_pending 0x02
#define rx2_pending 0x01
#define md2_pending 0x40
#define module1_bits 0x07
#define module1_modern 0x08
#define module2_bits 0x70
......@@ -113,65 +113,65 @@
NB. These registers are relative values on 8 bit boundaries whereas
on the RTA's the CIRRUS registers are on word boundaries. Use pointer
arithmetic (short *) to obtain the real addresses required */
#define ccr 0x05 /* Channel Command Register */
#define ier 0x06 /* Interrupt Enable Register */
#define cor1 0x08 /* Channel Option Register 1 */
#define cor2 0x09 /* Channel Option Register 2 */
#define cor3 0x0a /* Channel Option Register 3 */
#define cor4 0x1e /* Channel Option Register 4 */
#define cor5 0x1f /* Channel Option Register 5 */
#define ccsr 0x0b /* Channel Control Status Register */
#define rdcr 0x0e /* Receive Data Count Register */
#define tdcr 0x12 /* Transmit Data Count Register */
#define mcor1 0x15 /* Modem Change Option Register 1 */
#define mcor2 0x16 /* Modem Change Option Regsiter 2 */
#define livr 0x18 /* Local Interrupt Vector Register */
#define schr1 0x1a /* Special Character Register 1 */
#define schr2 0x1b /* Special Character Register 2 */
#define schr3 0x1c /* Special Character Register 3 */
#define schr4 0x1d /* Special Character Register 4 */
#define rtr 0x20 /* Receive Timer Register */
#define rtpr 0x21 /* Receive Timeout Period Register */
#define lnc 0x24 /* Lnext character */
#define rivr 0x43 /* Receive Interrupt Vector Register */
#define tivr 0x42 /* Transmit Interrupt Vector Register */
#define mivr 0x41 /* Modem Interrupt Vector Register */
#define gfrcr 0x40 /* Global Firmware Revision code Reg */
#define ricr 0x44 /* Receive Interrupting Channel Reg */
#define ticr 0x45 /* Transmit Interrupting Channel Reg */
#define micr 0x46 /* Modem Interrupting Channel Register */
#define gcr 0x4b /* Global configuration register*/
#define misr 0x4c /* Modem interrupt status register */
#define ccr 0x05 /* Channel Command Register */
#define ier 0x06 /* Interrupt Enable Register */
#define cor1 0x08 /* Channel Option Register 1 */
#define cor2 0x09 /* Channel Option Register 2 */
#define cor3 0x0a /* Channel Option Register 3 */
#define cor4 0x1e /* Channel Option Register 4 */
#define cor5 0x1f /* Channel Option Register 5 */
#define ccsr 0x0b /* Channel Control Status Register */
#define rdcr 0x0e /* Receive Data Count Register */
#define tdcr 0x12 /* Transmit Data Count Register */
#define mcor1 0x15 /* Modem Change Option Register 1 */
#define mcor2 0x16 /* Modem Change Option Regsiter 2 */
#define livr 0x18 /* Local Interrupt Vector Register */
#define schr1 0x1a /* Special Character Register 1 */
#define schr2 0x1b /* Special Character Register 2 */
#define schr3 0x1c /* Special Character Register 3 */
#define schr4 0x1d /* Special Character Register 4 */
#define rtr 0x20 /* Receive Timer Register */
#define rtpr 0x21 /* Receive Timeout Period Register */
#define lnc 0x24 /* Lnext character */
#define rivr 0x43 /* Receive Interrupt Vector Register */
#define tivr 0x42 /* Transmit Interrupt Vector Register */
#define mivr 0x41 /* Modem Interrupt Vector Register */
#define gfrcr 0x40 /* Global Firmware Revision code Reg */
#define ricr 0x44 /* Receive Interrupting Channel Reg */
#define ticr 0x45 /* Transmit Interrupting Channel Reg */
#define micr 0x46 /* Modem Interrupting Channel Register */
#define gcr 0x4b /* Global configuration register */
#define misr 0x4c /* Modem interrupt status register */
#define rbusr 0x59
#define tbusr 0x5a
#define mbusr 0x5b
#define eoir 0x60 /* End Of Interrupt Register */
#define rdsr 0x62 /* Receive Data / Status Register */
#define tdr 0x63 /* Transmit Data Register */
#define svrr 0x67 /* Service Request Register */
#define eoir 0x60 /* End Of Interrupt Register */
#define rdsr 0x62 /* Receive Data / Status Register */
#define tdr 0x63 /* Transmit Data Register */
#define svrr 0x67 /* Service Request Register */
#define car 0x68 /* Channel Access Register */
#define mir 0x69 /* Modem Interrupt Register */
#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 car 0x68 /* Channel Access Register */
#define mir 0x69 /* Modem Interrupt Register */
#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 tbpr 0x72 /* Transmit Baud Rate Period Register */
#define tcor 0x76 /* Transmit Clock Option 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 ppr 0x7e /* Prescalar Period 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 ppr 0x7e /* Prescalar Period Register */
/* Misc registers used for forcing the 1400 out of its reset woes */
#define airl 0x6d
......@@ -192,10 +192,10 @@
/* RDSR - when status read from FIFO */
#define RDSR_BREAK 0x08 /* Break received */
#define RDSR_TIMEOUT 0x80 /* No new data timeout */
#define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */
#define RDSR_SC2 0x20 /* Special char 2 (tx XOFF) matched */
#define RDSR_SC12_MASK 0x30 /* Mask for special chars 1 and 2 */
#define RDSR_TIMEOUT 0x80 /* No new data timeout */
#define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */
#define RDSR_SC2 0x20 /* Special char 2 (tx XOFF) matched */
#define RDSR_SC12_MASK 0x30 /* Mask for special chars 1 and 2 */
/* PPR */
#define PPR_DEFAULT 0x31 /* Default value - for a 25Mhz clock gives
......@@ -244,7 +244,7 @@
#define IER_TIMEOUT 0x01 /* Timeout on no data */
#define IER_DEFAULT 0x94 /* Default values */
#define IER_PARALLEL 0x84 /* Default for Parallel */
#define IER_PARALLEL 0x84 /* Default for Parallel */
#define IER_EMPTY 0x92 /* Transmitter empty rather than ready */
/* COR1 - Driver only */
......@@ -264,11 +264,11 @@
#define COR1_7BITS 0x02 /* 7 data bits */
#define COR1_8BITS 0x03 /* 8 data bits */
#define COR1_HOST 0xef /* Safe host bits */
#define COR1_HOST 0xef /* Safe host bits */
/* RTA only */
#define COR1_CINPCK 0x00 /* Check parity of received characters */
#define COR1_CNINPCK 0x10 /* Don't check parity */
#define COR1_CINPCK 0x00 /* Check parity of received characters */
#define COR1_CNINPCK 0x10 /* Don't check parity */
/* COR2 bits for both RTA and driver use */
#define COR2_IXANY 0x80 /* IXANY - any character is XON */
......@@ -293,9 +293,9 @@
#define COR3_FCT 0x20 /* Flow control transparency */
#define COR3_SCD12 0x10 /* Special character detect for SCHR's 1 + 2 */
#define COR3_FIFO12 0x0c /* 12 chars for receive FIFO threshold */
#define COR3_FIFO10 0x0a /* 10 chars for receive FIFO threshold */
#define COR3_FIFO8 0x08 /* 8 chars for receive FIFO threshold */
#define COR3_FIFO6 0x06 /* 6 chars for receive FIFO threshold */
#define COR3_FIFO10 0x0a /* 10 chars for receive FIFO threshold */
#define COR3_FIFO8 0x08 /* 8 chars for receive FIFO threshold */
#define COR3_FIFO6 0x06 /* 6 chars for receive FIFO threshold */
#define COR3_THRESHOLD COR3_FIFO8 /* MUST BE LESS THAN MCOR_THRESHOLD */
......@@ -386,7 +386,7 @@
#define MCOR_THRESHBITS 0x0F /* mask for ANDing out the above */
#define MCOR_THRESHOLD MCOR_THRESH9 /* MUST BE GREATER THAN COR3_THRESHOLD */
#define MCOR_THRESHOLD MCOR_THRESH9 /* MUST BE GREATER THAN COR3_THRESHOLD */
/* RTPR */
......@@ -429,25 +429,25 @@
#define CONFIG 0x01 /* Configure a port */
#define MOPEN 0x02 /* Modem open (block for DCD) */
#define CLOSE 0x03 /* Close a port */
#define WFLUSH (0x04 | PRE_EMPTIVE) /* Write flush */
#define RFLUSH (0x05 | PRE_EMPTIVE) /* Read flush */
#define RESUME (0x06 | PRE_EMPTIVE) /* Resume if xoffed */
#define SBREAK 0x07 /* Start break */
#define WFLUSH (0x04 | PRE_EMPTIVE) /* Write flush */
#define RFLUSH (0x05 | PRE_EMPTIVE) /* Read flush */
#define RESUME (0x06 | PRE_EMPTIVE) /* Resume if xoffed */
#define SBREAK 0x07 /* Start break */
#define EBREAK 0x08 /* End break */
#define SUSPEND (0x09 | PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */
#define FCLOSE (0x0a | PRE_EMPTIVE) /* Force close */
#define XPRINT 0x0b /* Xprint packet */
#define MBIS (0x0c | PRE_EMPTIVE) /* Set modem lines */
#define MBIC (0x0d | PRE_EMPTIVE) /* Clear modem lines */
#define MSET (0x0e | PRE_EMPTIVE) /* Set modem lines */
#define SUSPEND (0x09 | PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */
#define FCLOSE (0x0a | PRE_EMPTIVE) /* Force close */
#define XPRINT 0x0b /* Xprint packet */
#define MBIS (0x0c | PRE_EMPTIVE) /* Set modem lines */
#define MBIC (0x0d | PRE_EMPTIVE) /* Clear modem lines */
#define MSET (0x0e | PRE_EMPTIVE) /* Set modem lines */
#define PCLOSE 0x0f /* Pseudo close - Leaves rx/tx enabled */
#define MGET (0x10 | PRE_EMPTIVE) /* Force update of modem status */
#define MEMDUMP (0x11 | PRE_EMPTIVE) /* Send back mem from addr supplied */
#define READ_REGISTER (0x12 | PRE_EMPTIVE) /* Read CD1400 register (debug) */
#define MGET (0x10 | PRE_EMPTIVE) /* Force update of modem status */
#define MEMDUMP (0x11 | PRE_EMPTIVE) /* Send back mem from addr supplied */
#define READ_REGISTER (0x12 | PRE_EMPTIVE) /* Read CD1400 register (debug) */
/* "Command" packets going from remote to host COMPLETE and MODEM_STATUS
use data[4] / data[3] to indicate current state and modem status respectively
*/
*/
#define COMPLETE (0x20 | PRE_EMPTIVE)
/* Command complete */
......
......@@ -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
......@@ -52,7 +52,7 @@ static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
#define CMD_IGNORE_PKT ( (ushort) 0)
#define CMD_STATUS_REQ ( (ushort) 1)
#define CMD_UNIT_STATUS_REQ ( (ushort) 2) /* Is this needed ??? */
#define CMD_UNIT_STATUS_REQ ( (ushort) 2) /* Is this needed ??? */
#define CMD_CONF_PORT ( (ushort) 3)
#define CMD_CONF_UNIT ( (ushort) 4)
#define CMD_ROUTE_MAP_REQ ( (ushort) 5)
......@@ -81,4 +81,3 @@ static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
#endif
/*********** end of file ***********/
......@@ -44,16 +44,15 @@ static char *_cmdblk_h_sccs_ = "@(#)cmdblk.h 1.2";
** a rup.
*/
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 PreArg; /* The arg for the func */
/* The func to call when completed */
int (*PostFuncP)(int, struct CmdBlk *);
int PostArg; /* The arg for the func */
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 PreArg; /* The arg for the func */
/* The func to call when completed */
int (*PostFuncP) (int, struct CmdBlk *);
int PostArg; /* The arg for the func */
};
#define NUM_RIO_CMD_BLKS (3 * (MAX_RUP * 4 + LINKS_PER_UNIT * 4))
......
......@@ -54,135 +54,112 @@ 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
{
WORD NumPackets;
WORD LoadBase;
WORD CodeSize;
struct BootSequence {
WORD NumPackets;
WORD LoadBase;
WORD CodeSize;
};
#define BOOT_SEQUENCE_LEN 8
struct SamTop
{
BYTE Unit;
BYTE Link;
struct SamTop {
BYTE Unit;
BYTE Link;
};
struct CmdHdr
{
BYTE PcCommand;
union
{
BYTE PcPhbNum;
BYTE PcLinkNum;
BYTE PcIDNum;
} U0;
struct CmdHdr {
BYTE PcCommand;
union {
BYTE PcPhbNum;
BYTE PcLinkNum;
BYTE PcIDNum;
} U0;
};
struct PktCmd
{
union
{
struct
{
struct CmdHdr CmdHdr;
struct BootSequence PcBootSequence;
} S1;
struct
{
WORD PcSequence;
BYTE PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct
{
WORD __crud__;
BYTE PcUniqNum[4]; /* this is really a uint. */
BYTE PcModuleTypes; /* what modules are fitted */
} S3;
struct
{
struct CmdHdr CmdHdr;
BYTE __undefined__;
BYTE PcModemStatus;
BYTE PcPortStatus;
BYTE PcSubCommand; /* commands like mem or register dump */
WORD PcSubAddr; /* Address for command */
BYTE PcSubData[64]; /* Date area for command */
} S4;
struct
{
struct CmdHdr CmdHdr;
BYTE PcCommandText[1];
BYTE __crud__[20];
BYTE PcIDNum2; /* It had to go somewhere! */
} S5;
struct
{
struct CmdHdr CmdHdr;
struct SamTop Topology[LINKS_PER_UNIT];
} S6;
} U1;
struct PktCmd {
union {
struct {
struct CmdHdr CmdHdr;
struct BootSequence PcBootSequence;
} S1;
struct {
WORD PcSequence;
BYTE PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct {
WORD __crud__;
BYTE PcUniqNum[4]; /* this is really a uint. */
BYTE PcModuleTypes; /* what modules are fitted */
} S3;
struct {
struct CmdHdr CmdHdr;
BYTE __undefined__;
BYTE PcModemStatus;
BYTE PcPortStatus;
BYTE PcSubCommand; /* commands like mem or register dump */
WORD PcSubAddr; /* Address for command */
BYTE PcSubData[64]; /* Date area for command */
} S4;
struct {
struct CmdHdr CmdHdr;
BYTE PcCommandText[1];
BYTE __crud__[20];
BYTE PcIDNum2; /* It had to go somewhere! */
} S5;
struct {
struct CmdHdr CmdHdr;
struct SamTop Topology[LINKS_PER_UNIT];
} S6;
} U1;
};
struct PktCmd_M
{
union
{
struct
{
struct
{
uchar PcCommand;
union
{
uchar PcPhbNum;
uchar PcLinkNum;
uchar PcIDNum;
} U0;
} CmdHdr;
struct
{
ushort NumPackets;
ushort LoadBase;
ushort CodeSize;
} PcBootSequence;
} S1;
struct
{
ushort PcSequence;
uchar PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct
{
ushort __crud__;
uchar PcUniqNum[4]; /* this is really a uint. */
uchar PcModuleTypes; /* what modules are fitted */
} S3;
struct
{
ushort __cmd_hdr__;
uchar __undefined__;
uchar PcModemStatus;
uchar PcPortStatus;
uchar PcSubCommand;
ushort PcSubAddr;
uchar PcSubData[64];
} S4;
struct
{
ushort __cmd_hdr__;
uchar PcCommandText[1];
uchar __crud__[20];
uchar PcIDNum2; /* Tacked on end */
} S5;
struct
{
ushort __cmd_hdr__;
struct Top Topology[LINKS_PER_UNIT];
} S6;
} U1;
struct PktCmd_M {
union {
struct {
struct {
uchar PcCommand;
union {
uchar PcPhbNum;
uchar PcLinkNum;
uchar PcIDNum;
} U0;
} CmdHdr;
struct {
ushort NumPackets;
ushort LoadBase;
ushort CodeSize;
} PcBootSequence;
} S1;
struct {
ushort PcSequence;
uchar PcBootData[RTA_BOOT_DATA_SIZE];
} S2;
struct {
ushort __crud__;
uchar PcUniqNum[4]; /* this is really a uint. */
uchar PcModuleTypes; /* what modules are fitted */
} S3;
struct {
ushort __cmd_hdr__;
uchar __undefined__;
uchar PcModemStatus;
uchar PcPortStatus;
uchar PcSubCommand;
ushort PcSubAddr;
uchar PcSubData[64];
} S4;
struct {
ushort __cmd_hdr__;
uchar PcCommandText[1];
uchar __crud__[20];
uchar PcIDNum2; /* Tacked on end */
} S5;
struct {
ushort __cmd_hdr__;
struct Top Topology[LINKS_PER_UNIT];
} S6;
} U1;
};
#define Command U1.S1.CmdHdr.PcCommand
......
......@@ -51,12 +51,11 @@
#define UFOAD ( CONTROL + 4 )
#define IWAIT ( CONTROL + 5 )
#define IFOAD_MAGIC 0xF0AD /* of course */
#define IFOAD_MAGIC 0xF0AD /* of course */
#define ZOMBIE_MAGIC (~0xDEAD) /* not dead -> zombie */
#define UFOAD_MAGIC 0xD1E /* kill-your-neighbour */
#define IWAIT_MAGIC 0xB1DE /* Bide your time */
#define UFOAD_MAGIC 0xD1E /* kill-your-neighbour */
#define IWAIT_MAGIC 0xB1DE /* Bide your time */
#endif
/*********** end of file ***********/
......@@ -44,18 +44,16 @@ static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3";
** structures used on /dev/rio
*/
struct Error
{
uint Error;
uint Entry;
uint Other;
struct Error {
uint Error;
uint Entry;
uint Other;
};
struct DownLoad
{
char *DataP;
uint Count;
uint ProductCode;
struct DownLoad {
char *DataP;
uint Count;
uint ProductCode;
};
/*
......@@ -66,46 +64,41 @@ struct DownLoad
#endif
#ifndef MAX_XP_CTRL_LEN
#define MAX_XP_CTRL_LEN 16 /* ALSO IN PORT.H */
#define MAX_XP_CTRL_LEN 16 /* ALSO IN PORT.H */
#endif
struct PortSetup
{
uint From; /* Set/Clear XP & IXANY Control from this port.... */
uint To; /* .... to this port */
uint XpCps; /* at this speed */
char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */
char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */
uchar IxAny; /* enable/disable IXANY */
uchar IxOn; /* enable/disable IXON */
uchar Lock; /* lock port params */
uchar Store; /* store params across closes */
uchar Drain; /* close only when drained */
struct PortSetup {
uint From; /* Set/Clear XP & IXANY Control from this port.... */
uint To; /* .... to this port */
uint XpCps; /* at this speed */
char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */
char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */
uchar IxAny; /* enable/disable IXANY */
uchar IxOn; /* enable/disable IXON */
uchar Lock; /* lock port params */
uchar Store; /* store params across closes */
uchar Drain; /* close only when drained */
};
struct LpbReq
{
uint Host;
uint Link;
struct LPB *LpbP;
struct LpbReq {
uint Host;
uint Link;
struct LPB *LpbP;
};
struct RupReq
{
uint HostNum;
uint RupNum;
struct RUP *RupP;
struct RupReq {
uint HostNum;
uint RupNum;
struct RUP *RupP;
};
struct PortReq
{
uint SysPort;
struct Port *PortP;
struct PortReq {
uint SysPort;
struct Port *PortP;
};
struct StreamInfo
{
uint SysPort;
struct StreamInfo {
uint SysPort;
#if 0
queue_t RQueue;
queue_t WQueue;
......@@ -115,68 +108,59 @@ struct StreamInfo
#endif
};
struct HostReq
{
uint HostNum;
struct Host *HostP;
struct HostReq {
uint HostNum;
struct Host *HostP;
};
struct HostDpRam
{
uint HostNum;
struct DpRam *DpRamP;
struct HostDpRam {
uint HostNum;
struct DpRam *DpRamP;
};
struct DebugCtrl
{
uint SysPort;
uint Debug;
uint Wait;
struct DebugCtrl {
uint SysPort;
uint Debug;
uint Wait;
};
struct MapInfo
{
uint FirstPort; /* 8 ports, starting from this (tty) number */
uint RtaUnique; /* reside on this RTA (unique number) */
struct MapInfo {
uint FirstPort; /* 8 ports, starting from this (tty) number */
uint RtaUnique; /* reside on this RTA (unique number) */
};
struct MapIn
{
uint NumEntries; /* How many port sets are we mapping? */
struct MapInfo *MapInfoP; /* Pointer to (user space) info */
struct MapIn {
uint NumEntries; /* How many port sets are we mapping? */
struct MapInfo *MapInfoP; /* Pointer to (user space) info */
};
struct SendPack
{
unsigned int PortNum;
unsigned char Len;
unsigned char Data[PKT_MAX_DATA_LEN];
struct SendPack {
unsigned int PortNum;
unsigned char Len;
unsigned char Data[PKT_MAX_DATA_LEN];
};
struct SpecialRupCmd
{
struct PKT Packet;
unsigned short Host;
unsigned short RupNum;
struct SpecialRupCmd {
struct PKT Packet;
unsigned short Host;
unsigned short RupNum;
};
struct IdentifyRta
{
ulong RtaUnique;
uchar ID;
struct IdentifyRta {
ulong RtaUnique;
uchar ID;
};
struct KillNeighbour
{
ulong UniqueNum;
uchar Link;
struct KillNeighbour {
ulong UniqueNum;
uchar Link;
};
struct rioVersion {
char version[MAX_VERSION_LEN];
char relid[MAX_VERSION_LEN];
int buildLevel;
char buildDate[MAX_VERSION_LEN];
char version[MAX_VERSION_LEN];
char relid[MAX_VERSION_LEN];
int buildLevel;
char buildDate[MAX_VERSION_LEN];
};
......@@ -316,16 +300,16 @@ struct rioVersion {
#define RIO_SET_XP_CPS rIOCW(155,int)
#define RIO_GET_IXANY rIOCR(156,int) /* ixany allowed? */
#define RIO_SET_IXANY rIOCW(157,int)
#define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */
#define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */
#define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */
#define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */
#define RIO_GET_MODEM rIOCR(160,int) /* port is modem/direct line? */
#define RIO_SET_MODEM rIOCW(161,int)
#define RIO_SET_MODEM_ON rIOCN(162) /* port is a modem */
#define RIO_SET_MODEM_OFF rIOCN(163) /* port is direct */
#define RIO_SET_MODEM_ON rIOCN(162) /* port is a modem */
#define RIO_SET_MODEM_OFF rIOCN(163) /* port is direct */
#define RIO_GET_IXON rIOCR(164,int) /* ixon allowed? */
#define RIO_SET_IXON rIOCW(165,int)
#define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */
#define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */
#define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */
#define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */
#define RIO_GET_SIVIEW ((('s')<<8) | 106) /* backwards compatible with SI */
......
......@@ -33,7 +33,7 @@
#define DBPACKET(pkt, opt, str, chn) debug_packet((pkt), (opt), (str), (chn))
#else
#define DBPACKET(pkt, opt, str, c)
#endif /* DCIRRUS */
#endif /* DCIRRUS */
#endif /* _debug_h_ */
#endif /* _debug_h_ */
......@@ -37,13 +37,13 @@
#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
#define MILLISECOND (int) (1000/64) /* 15.625 low ticks */
#define SECOND (int) 15625 /* Low priority ticks */
#define MILLISECOND (int) (1000/64) /* 15.625 low ticks */
#define SECOND (int) 15625 /* Low priority ticks */
#ifdef RTA
#define RX_LIMIT (ushort) 3
......@@ -56,4 +56,3 @@ static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1" ;
/*********** end of file ***********/
......@@ -60,7 +60,7 @@ static char *_eisa_h_sccs_ = "@(#)eisa.h 1.2";
#define EISA_PRODUCT_IDENT_LO 0xC80 /* where RIO_EISA_IDENT is */
#define EISA_PRODUCT_IDENT_HI 0xC81
#define EISA_PRODUCT_NUMBER 0xC82 /* where PROD_CODE is */
#define EISA_PRODUCT_NUMBER 0xC82 /* where PROD_CODE is */
#define EISA_REVISION_NUMBER 0xC83 /* revision (1dp) */
#define EISA_ENABLE 0xC84 /* set LSB to enable card */
#define EISA_UNIQUE_NUM_0 0xC88 /* vomit */
......@@ -101,4 +101,4 @@ static char *_eisa_h_sccs_ = "@(#)eisa.h 1.2";
#define INBZ(z,x) inb(((z)<<12) | (x))
#define OUTBZ(z,x,y) outb((((z)<<12) | (x)), y)
#endif /* __rio_eisa_h__ */
#endif /* __rio_eisa_h__ */
......@@ -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 ***********/
......@@ -101,4 +101,4 @@ static char *_errors_h_sccs_ = "@(#)errors.h 1.2";
#define NOT_ENOUGH_CORE_FOR_PCI_COPY 53
#endif /* __rio_errors_h__ */
#endif /* __rio_errors_h__ */
......@@ -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 ;
struct FORM_ATTACH_RTA {
char cmd_code ;
char booter_serial[4] ;
char booter_link ;
char bootee_serial[4] ;
char bootee_link ;
} ;
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;
};
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 ;
} ;
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;
};
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 RIORtaBound(struct rio_info *, uint);
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 RIOIdentifyRta(struct rio_info *, caddr_t);
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);
......@@ -108,7 +107,7 @@ void remove_receive(struct Port *);
/* rioroute.c */
int RIORouteRup(struct rio_info *, uint, struct Host *, struct PKT *);
void RIOFixPhbs(struct rio_info *, struct Host *, uint);
void RIOFixPhbs(struct rio_info *, struct Host *, uint);
uint GetUnitType(uint);
int RIOSetChange(struct rio_info *);
int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
......@@ -116,9 +115,9 @@ int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
/* riotty.c */
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);
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);
/* riotable.c */
......@@ -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_intr(char *);
int rio_isr_thread(char *);
struct rio_info * rio_info_store( int cmd, struct rio_info * p);
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);
#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_pcicopy(char *src, char *dst, int n);
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 */
#endif /* __func_h_def */
......@@ -49,33 +49,32 @@ static char *_host_h_sccs_ = "@(#)host.h 1.2";
** Host data structure. This is used for the software equiv. of
** the host.
*/
struct Host
{
uchar Type; /* RIO_EISA, RIO_MCA, ... */
uchar Ivec; /* POLLED or ivec number */
uchar Mode; /* Control stuff */
uchar Slot; /* Slot */
volatile caddr_t Caddr; /* KV address of DPRAM */
volatile struct DpRam *CardP; /* KV address of DPRAM, with overlay */
paddr_t PaddrP; /* Phys. address of DPRAM */
char Name[MAX_NAME_LEN]; /* The name of the host */
uint UniqueNum; /* host unique number */
spinlock_t HostLock; /* Lock structure for MPX */
/*struct pci_devinfo PciDevInfo; *//* PCI Bus/Device/Function stuff */
/*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 */
struct timer_list timer;
/*
** I M P O R T A N T !
**
** The rest of this data structure is cleared to zero after
** a RIO_HOST_FOAD command.
*/
ulong Flags; /* Whats going down */
struct Host {
uchar Type; /* RIO_EISA, RIO_MCA, ... */
uchar Ivec; /* POLLED or ivec number */
uchar Mode; /* Control stuff */
uchar Slot; /* Slot */
volatile caddr_t Caddr; /* KV address of DPRAM */
volatile struct DpRam *CardP; /* KV address of DPRAM, with overlay */
paddr_t PaddrP; /* Phys. address of DPRAM */
char Name[MAX_NAME_LEN]; /* The name of the host */
uint UniqueNum; /* host unique number */
spinlock_t HostLock; /* Lock structure for MPX */
/*struct pci_devinfo PciDevInfo; *//* PCI Bus/Device/Function stuff */
/*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 */
struct timer_list timer;
/*
** I M P O R T A N T !
**
** The rest of this data structure is cleared to zero after
** a RIO_HOST_FOAD command.
*/
ulong Flags; /* Whats going down */
#define RC_WAITING 0
#define RC_STARTUP 1
#define RC_RUNNING 2
......@@ -93,25 +92,25 @@ struct Host
#define RC_BOOT_OWN 0x10 /* Only boot RTAs bound to this system */
#define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */
struct Top Topology[LINKS_PER_UNIT]; /* one per link */
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 RUP *RupP; /* Sixteen real rups here */
struct PARM_MAP *ParmMapP; /* points to the parmmap */
uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
uint NumExtraBooted; /* how many of the above */
/*
** Twenty logical rups.
** The first sixteen are the real Rup entries (above), the last four
** are the link RUPs.
*/
struct UnixRup UnixRups[MAX_RUP+LINKS_PER_UNIT];
int timeout_id; /* 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____;
struct Top Topology[LINKS_PER_UNIT]; /* one per link */
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 RUP *RupP; /* Sixteen real rups here */
struct PARM_MAP *ParmMapP; /* points to the parmmap */
uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
uint NumExtraBooted; /* how many of the above */
/*
** Twenty logical rups.
** The first sixteen are the real Rup entries (above), the last four
** are the link RUPs.
*/
struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
int timeout_id; /* 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____;
};
#define Control CardP->DpControl
#define SetInt CardP->DpSetInt
......@@ -129,6 +128,6 @@ struct Host
#define Year CardP->DpYear
#define Week CardP->DpWeek
#define RIO_DUMBPARM 0x0860 /* what not to expect */
#define RIO_DUMBPARM 0x0860 /* what not to expect */
#endif
......@@ -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 ***********/
......@@ -70,27 +70,27 @@
#define DIE_NOW (ushort) 0x0200
/* Boot request stuff */
#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
#define BOOT_ABORT ((ushort) 1) /* Abort a boot */
#define BOOT_SEQUENCE ((ushort) 2) /* Packet with the number of packets
and load address */
#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */
#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
#define BOOT_ABORT ((ushort) 1) /* Abort a boot */
#define BOOT_SEQUENCE ((ushort) 2) /* Packet with the number of packets
and load address */
#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_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_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_INTERCONNECT ((ushort) 20) /* Subnets interconnected */
#define LINK_SPARE ((ushort) 40)
......@@ -103,12 +103,12 @@
** LED stuff
*/
#if defined(RTA)
#define LED_OFF ((ushort) 0) /* LED off */
#define LED_RED ((ushort) 1) /* LED Red */
#define LED_GREEN ((ushort) 2) /* LED Green */
#define LED_ORANGE ((ushort) 4) /* LED Orange */
#define LED_1TO8_OPEN ((ushort) 1) /* Port 1->8 LED on */
#define LED_9TO16_OPEN ((ushort) 2) /* Port 9->16 LED on */
#define LED_OFF ((ushort) 0) /* LED off */
#define LED_RED ((ushort) 1) /* LED Red */
#define LED_GREEN ((ushort) 2) /* LED Green */
#define LED_ORANGE ((ushort) 4) /* LED Orange */
#define LED_1TO8_OPEN ((ushort) 1) /* Port 1->8 LED on */
#define LED_9TO16_OPEN ((ushort) 2) /* Port 9->16 LED on */
#define LED_SET_COLOUR(colour) (link->led = (colour))
#define LED_OR_COLOUR(colour) (link->led |= (colour))
#define LED_TIMEOUT(time) (link->led_timeout = RioTimePlus(RioTime(),(time)))
......@@ -116,72 +116,72 @@
#define LED_SET_COLOUR(colour)
#define LED_OR_COLOUR(colour)
#define LED_TIMEOUT(time)
#endif /* RTA */
#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 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 topology; /* Topology bits */
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 */
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 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 topology; /* Topology bits */
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
#ifdef DCIRRUS
#define QBUFS_PER_REDIRECT (4 / PKTS_PER_BUFFER + 1)
#define QBUFS_PER_REDIRECT (4 / PKTS_PER_BUFFER + 1)
#else
#define QBUFS_PER_REDIRECT (8 / PKTS_PER_BUFFER + 1)
#define QBUFS_PER_REDIRECT (8 / PKTS_PER_BUFFER + 1)
#endif
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; /* 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 */
#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 ;
/* RUP structure for HOST to driver communications */
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 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 */
} ;
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 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
......
......@@ -41,7 +41,7 @@
#endif
struct ttystatics {
struct termios tm;
struct termios tm;
};
#define bzero(d, n) memset((d), 0, (n))
......@@ -97,26 +97,24 @@ the older driver. The older driver includes "brates.h" which shadows
the definitions from Linux, and is incompatible... */
/* RxBaud and TxBaud definitions... */
#define RIO_B0 0x00 /* RTS / DTR signals dropped */
#define RIO_B50 0x01 /* 50 baud */
#define RIO_B75 0x02 /* 75 baud */
#define RIO_B110 0x03 /* 110 baud */
#define RIO_B134 0x04 /* 134.5 baud */
#define RIO_B150 0x05 /* 150 baud */
#define RIO_B200 0x06 /* 200 baud */
#define RIO_B300 0x07 /* 300 baud */
#define RIO_B600 0x08 /* 600 baud */
#define RIO_B1200 0x09 /* 1200 baud */
#define RIO_B1800 0x0A /* 1800 baud */
#define RIO_B2400 0x0B /* 2400 baud */
#define RIO_B4800 0x0C /* 4800 baud */
#define RIO_B9600 0x0D /* 9600 baud */
#define RIO_B19200 0x0E /* 19200 baud */
#define RIO_B38400 0x0F /* 38400 baud */
#define RIO_B56000 0x10 /* 56000 baud */
#define RIO_B57600 0x11 /* 57600 baud */
#define RIO_B64000 0x12 /* 64000 baud */
#define RIO_B115200 0x13 /* 115200 baud */
#define RIO_B2000 0x14 /* 2000 baud */
#define RIO_B0 0x00 /* RTS / DTR signals dropped */
#define RIO_B50 0x01 /* 50 baud */
#define RIO_B75 0x02 /* 75 baud */
#define RIO_B110 0x03 /* 110 baud */
#define RIO_B134 0x04 /* 134.5 baud */
#define RIO_B150 0x05 /* 150 baud */
#define RIO_B200 0x06 /* 200 baud */
#define RIO_B300 0x07 /* 300 baud */
#define RIO_B600 0x08 /* 600 baud */
#define RIO_B1200 0x09 /* 1200 baud */
#define RIO_B1800 0x0A /* 1800 baud */
#define RIO_B2400 0x0B /* 2400 baud */
#define RIO_B4800 0x0C /* 4800 baud */
#define RIO_B9600 0x0D /* 9600 baud */
#define RIO_B19200 0x0E /* 19200 baud */
#define RIO_B38400 0x0F /* 38400 baud */
#define RIO_B56000 0x10 /* 56000 baud */
#define RIO_B57600 0x11 /* 57600 baud */
#define RIO_B64000 0x12 /* 64000 baud */
#define RIO_B115200 0x13 /* 115200 baud */
#define RIO_B2000 0x14 /* 2000 baud */
......@@ -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
......@@ -166,7 +166,7 @@ static char *_rio_list_h_sccs = "@(#)list.h 1.9" ;
#endif
#else /* !IN_KERNEL */
#else /* !IN_KERNEL */
#define ZERO_PTR NULL
......@@ -192,5 +192,5 @@ static char *_rio_list_h_sccs = "@(#)list.h 1.9" ;
#define splx(oldspl) if ((oldspl) == 0) spl0()
#endif
#endif /* ifndef _list.h */
#endif /* ifndef _list.h */
/*********** end of file ***********/
......@@ -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
......@@ -45,11 +45,8 @@ static char *_rio_ltt_h_sccs = "@(#)ltt.h 1.1" ;
#else
#define LTT_STACK (ushort) 200
#endif
/*********** end of file ***********/
/*********** 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,21 +46,20 @@ 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
{
uint HostUniqueNum; /* Supporting hosts unique number */
uint RtaUniqueNum; /* Unique number */
struct Map {
uint HostUniqueNum; /* Supporting hosts unique number */
uint RtaUniqueNum; /* Unique number */
/*
** The next two IDs must be swapped on big-endian architectures
** when using a v2.04 /etc/rio/config with a v3.00 driver (when
** upgrading for example).
*/
ushort ID; /* ID used in the subnet */
ushort ID2; /* ID of 2nd block of 8 for 16 port */
ulong Flags; /* Booted, ID Given, Disconnected */
ulong SysPort; /* First tty mapped to this port */
struct Top Topology[LINKS_PER_UNIT]; /* ID connected to each link */
char Name[MAX_NAME_LEN]; /* Cute name by which RTA is known */
** The next two IDs must be swapped on big-endian architectures
** when using a v2.04 /etc/rio/config with a v3.00 driver (when
** upgrading for example).
*/
ushort ID; /* ID used in the subnet */
ushort ID2; /* ID of 2nd block of 8 for 16 port */
ulong Flags; /* Booted, ID Given, Disconnected */
ulong SysPort; /* First tty mapped to this port */
struct Top Topology[LINKS_PER_UNIT]; /* ID connected to each link */
char Name[MAX_NAME_LEN]; /* Cute name by which RTA is known */
};
/*
......
......@@ -70,4 +70,4 @@ static char *_mca_h_sccs_ = "@(#)mca.h 1.2";
#define RIO_MCA_DEFAULT_MODE SLOW_LINKS
#endif /* __rio_mca_h__ */
#endif /* __rio_mca_h__ */
......@@ -38,4 +38,4 @@ static char *_mesg_h_sccs_ = "@(#)mesg.h 1.2";
#endif
#endif /* __rio_mesg_h__ */
#endif /* __rio_mesg_h__ */
......@@ -42,20 +42,19 @@ static char *_param_h_sccs_ = "@(#)param.h 1.2";
** the param command block, as used in OPEN and PARAM calls.
*/
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, */
BYTE Cor4; /* check with cirrus/cirrus.h */
BYTE Cor5;
BYTE TxXon; /* Transmit X-On character */
BYTE TxXoff; /* Transmit X-Off character */
BYTE RxXon; /* Receive X-On character */
BYTE RxXoff; /* Receive X-Off character */
BYTE LNext; /* Literal-next character */
BYTE TxBaud; /* Transmit baudrate */
BYTE RxBaud; /* Receive baudrate */
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, */
BYTE Cor4; /* check with cirrus/cirrus.h */
BYTE Cor5;
BYTE TxXon; /* Transmit X-On character */
BYTE TxXoff; /* Transmit X-Off character */
BYTE RxXon; /* Receive X-On character */
BYTE RxXoff; /* Receive X-Off character */
BYTE LNext; /* Literal-next character */
BYTE TxBaud; /* Transmit baudrate */
BYTE RxBaud; /* Receive baudrate */
};
#endif
......@@ -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 ***********/
......@@ -73,4 +73,4 @@ static char *_pci_h_sccs_ = "@(#)pci.h 1.2";
#define RIO_PCI_DEFAULT_MODE 0x05
#endif /* __rio_pci_h__ */
#endif /* __rio_pci_h__ */
......@@ -58,37 +58,37 @@
/*************************************************
* Handshake asserted. Deasserted by the LTT(s)
************************************************/
#define PHB_HANDSHAKE_SET ((ushort) 0x001) /* Set by LRT */
#define PHB_HANDSHAKE_SET ((ushort) 0x001) /* Set by LRT */
#define PHB_HANDSHAKE_RESET ((ushort) 0x002) /* Set by ISR / driver */
#define PHB_HANDSHAKE_RESET ((ushort) 0x002) /* Set by ISR / driver */
#define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET | PHB_HANDSHAKE_SET)
/* Reset by ltt */
/* Reset by ltt */
/*************************************************
* Maximum number of PHB's
************************************************/
#if defined (HOST) || defined (INKERNEL)
#define MAX_PHB ((ushort) 128) /* range 0-127 */
#define MAX_PHB ((ushort) 128) /* range 0-127 */
#else
#define MAX_PHB ((ushort) 8) /* range 0-7 */
#define MAX_PHB ((ushort) 8) /* range 0-7 */
#endif
/*************************************************
* Defines for the mode fields
************************************************/
#define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */
#define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */
#define TX_TAB3 0x0004 /* TAB3 mode */
#define TX_OCRNL 0x0008 /* OCRNL mode */
#define TX_ONLCR 0x0010 /* ONLCR mode */
#define TX_SENDSPACES 0x0020 /* Send n spaces command needs
completing */
#define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */
#define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */
#define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */
#define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */
#define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */
#define TX_TAB3 0x0004 /* TAB3 mode */
#define TX_OCRNL 0x0008 /* OCRNL mode */
#define TX_ONLCR 0x0010 /* ONLCR mode */
#define TX_SENDSPACES 0x0020 /* Send n spaces command needs
completing */
#define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */
#define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */
#define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */
#define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL)
#define TX_DTRFLOW 0x0200 /* DTR tx flow control */
#define TX_DTRFLOWED 0x0400 /* DTR is low - don't allow more data
......@@ -96,34 +96,34 @@
#define TX_DATAINFIFO 0x0800 /* There is data in the FIFO */
#define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */
#define RX_SPARE 0x0001 /* SPARE */
#define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */
#define RX_ICRNL 0x0008 /* ICRNL mode */
#define RX_INLCR 0x0010 /* INLCR mode */
#define RX_IGNCR 0x0020 /* IGNCR mode */
#define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */
#define RX_IXOFF 0x0080 /* IXOFF enabled */
#define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */
#define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */
#define RX_BUFFERED 0x0400 /* Try and pass on complete packets */
#define RX_SPARE 0x0001 /* SPARE */
#define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */
#define RX_ICRNL 0x0008 /* ICRNL mode */
#define RX_INLCR 0x0010 /* INLCR mode */
#define RX_IGNCR 0x0020 /* IGNCR mode */
#define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */
#define RX_IXOFF 0x0080 /* IXOFF enabled */
#define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */
#define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */
#define RX_BUFFERED 0x0400 /* Try and pass on complete packets */
#define PORT_ISOPEN 0x0001 /* Port open? */
#define PORT_HUPCL 0x0002 /* Hangup on close? */
#define PORT_MOPENPEND 0x0004 /* Modem open pending */
#define PORT_ISPARALLEL 0x0008 /* Parallel port */
#define PORT_BREAK 0x0010 /* Port on break */
#define PORT_STATUSPEND 0x0020 /* Status packet pending */
#define PORT_BREAKPEND 0x0040 /* Break packet pending */
#define PORT_MODEMPEND 0x0080 /* Modem status packet pending */
#define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */
#define PORT_FULLMODEM 0x0200 /* Full modem signals */
#define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */
#define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */
#define PORT_ISOPEN 0x0001 /* Port open? */
#define PORT_HUPCL 0x0002 /* Hangup on close? */
#define PORT_MOPENPEND 0x0004 /* Modem open pending */
#define PORT_ISPARALLEL 0x0008 /* Parallel port */
#define PORT_BREAK 0x0010 /* Port on break */
#define PORT_STATUSPEND 0x0020 /* Status packet pending */
#define PORT_BREAKPEND 0x0040 /* Break packet pending */
#define PORT_MODEMPEND 0x0080 /* Modem status packet pending */
#define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */
#define PORT_FULLMODEM 0x0200 /* Full modem signals */
#define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */
#define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */
#define PORT_MODEMBITS 0x0600 /* Mask for modem fields */
#define PORT_MODEMBITS 0x0600 /* Mask for modem fields */
#define PORT_WCLOSE 0x0800 /* Waiting for close */
#define PORT_WCLOSE 0x0800 /* Waiting for close */
#define PORT_HANDSHAKEFIX 0x1000 /* Port has H/W flow control fix */
#define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */
#define DUMPMODE 0x4000 /* Dump RTA mem */
......@@ -155,139 +155,128 @@
#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;
ushort port;
#endif
#ifdef INKERNEL
WORD source;
WORD source;
#else
union
{
ushort source; /* Complete source */
struct
{
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
union {
ushort source; /* Complete source */
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;
WORD destination;
#else
union
{
ushort destination; /* Complete destination */
struct
{
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
} u1;
union {
ushort destination; /* Complete destination */
struct {
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
} u1;
#endif
#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_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 */
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_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 */
#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
{
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;
} s2;
} u3;
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;
} s2;
} u3;
#endif
#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 */
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 */
#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
{
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;
} s2;
} u4;
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;
} s2;
} u4;
#endif
#ifdef RTA /* some fields for the remotes */
ushort flush_count; /* Count of write flushes */
ushort txmode; /* Modes for tx */
ushort rxmode; /* Modes for rx */
ushort portmode; /* Generic modes */
ushort column; /* TAB3 column count */
ushort tx_subscript; /* (TX) Subscript into data field */
ushort rx_subscript; /* (RX) Subscript into data field */
PKT_ptr rx_incomplete; /* Hold an incomplete packet here */
ushort modem_bits; /* Modem bits to mask */
ushort lastModem; /* Modem control lines. */
ushort addr; /* Address for sub commands */
ushort MonitorTstate; /* TRUE if monitoring tstop */
#ifdef RTA /* some fields for the remotes */
ushort flush_count; /* Count of write flushes */
ushort txmode; /* Modes for tx */
ushort rxmode; /* Modes for rx */
ushort portmode; /* Generic modes */
ushort column; /* TAB3 column count */
ushort tx_subscript; /* (TX) Subscript into data field */
ushort rx_subscript; /* (RX) Subscript into data field */
PKT_ptr rx_incomplete; /* Hold an incomplete packet here */
ushort modem_bits; /* Modem bits to mask */
ushort lastModem; /* Modem control lines. */
ushort addr; /* Address for sub commands */
ushort MonitorTstate; /* TRUE if monitoring tstop */
#endif
} ;
};
#endif
/*********** end of file ***********/
......@@ -69,52 +69,44 @@
#define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8)
#define CONTROL_DATA_WNDW (DATA_WNDW << 8)
struct PKT {
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
{
ushort destination; /* Complete destination */
struct
{
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
} u1;
union
{
ushort source; /* Complete source */
struct
{
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
union {
ushort destination; /* Complete destination */
struct {
unsigned char unit; /* Destination unit */
unsigned char port; /* Destination port */
} s1;
} u1;
union {
ushort source; /* Complete source */
struct {
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
#endif
#ifdef INKERNEL
BYTE len ;
BYTE control;
BYTE len;
BYTE control;
#else
union
{
ushort control;
struct
{
unsigned char len;
unsigned char control;
} s3;
} u3;
union {
ushort control;
struct {
unsigned char len;
unsigned char control;
} s3;
} u3;
#endif
BYTE data[PKT_MAX_DATA_LEN] ;
/* Actual data :-) */
WORD csum ; /* C-SUM */
} ;
BYTE data[PKT_MAX_DATA_LEN];
/* Actual data :-) */
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
......@@ -54,23 +54,20 @@ static char *_rio_poll_h_sccs = "@(#)poll.h 1.2" ;
#define POLL_PERIOD (int) SECOND
/* The various poll commands */
#define POLL_POLL 0 /* We are connected and happy.. */
#define POLL_INTRO 1 /* Introduction packet */
#define POLL_TOPOLOGY 2 /* Topology update */
#define POLL_ASSIGN 3 /* ID assign */
#define POLL_FOAD 4 /* F*** Off And Die */
#define POLL_LMD 5 /* Let Me Die */
#define POLL_DYB 6 /* Die You Ba***** */
#define POLL_POLL 0 /* We are connected and happy.. */
#define POLL_INTRO 1 /* Introduction packet */
#define POLL_TOPOLOGY 2 /* Topology update */
#define POLL_ASSIGN 3 /* ID assign */
#define POLL_FOAD 4 /* F*** Off And Die */
#define POLL_LMD 5 /* Let Me Die */
#define POLL_DYB 6 /* Die You Ba***** */
/* The way data fields are split up for POLL packets */
#define POLL_HOST_SERIAL 2 /* Host who booted me */
#define POLL_MY_SERIAL 6 /* My serial number */
#define POLL_YOUR_ID 1 /* Your ID number */
#define POLL_TOPOLOGY_FIELDS 2 /* Topology maps */
#define POLL_HOST_SERIAL 2 /* Host who booted me */
#define POLL_MY_SERIAL 6 /* My serial number */
#define POLL_YOUR_ID 1 /* Your ID number */
#define POLL_TOPOLOGY_FIELDS 2 /* Topology maps */
#endif
/*********** end of file ***********/
......@@ -46,96 +46,94 @@ static char *_port_h_sccs_ = "@(#)port.h 1.3";
*/
#ifdef STATS
struct RIOStats
{
struct RIOStats {
/*
** interrupt statistics
*/
uint BreakIntCnt;
uint ModemOffCnt;
uint ModemOnCnt;
uint RxIntCnt;
uint TxIntCnt;
** interrupt statistics
*/
uint BreakIntCnt;
uint ModemOffCnt;
uint ModemOnCnt;
uint RxIntCnt;
uint TxIntCnt;
/*
** throughput statistics
*/
uint RxCharCnt;
uint RxPktCnt;
uint RxSaveCnt;
uint TxCharCnt;
uint TxPktCnt;
** 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;
** 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;
** 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
*/
struct Port
{
struct gs_port gs;
int PortNum; /* RIO port no., 0-511 */
struct Host *HostP;
volatile caddr_t Caddr;
ushort HostPort; /* Port number on host card */
uchar RupNum; /* Number of RUP for port */
uchar ID2; /* Second ID of RTA for port */
ulong State; /* FLAGS for open & xopen */
#define RIO_LOPEN 0x00001 /* Local open */
#define RIO_MOPEN 0x00002 /* Modem open */
#define RIO_WOPEN 0x00004 /* Waiting for open */
#define RIO_CLOSING 0x00008 /* The port is being close */
#define RIO_XPBUSY 0x00010 /* Transparent printer busy */
#define RIO_BREAKING 0x00020 /* Break in progress */
#define RIO_DIRECT 0x00040 /* Doing Direct output */
#define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */
#define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */
#define RIO_CARR_ON 0x00200 /* Stream has carrier present */
#define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */
#define RIO_RBLK 0x00800 /* Stream is read-blocked */
#define RIO_BUSY 0x01000 /* Stream is BUSY for write */
#define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */
#define RIO_TXSTOP 0x04000 /* Stream output is stopped */
#define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */
#define RIO_DYNOROD 0x10000 /* Drain failed */
#define RIO_DELETED 0x20000 /* RTA has been deleted */
#define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
struct Port {
struct gs_port gs;
int PortNum; /* RIO port no., 0-511 */
struct Host *HostP;
volatile caddr_t Caddr;
ushort HostPort; /* Port number on host card */
uchar RupNum; /* Number of RUP for port */
uchar ID2; /* Second ID of RTA for port */
ulong State; /* FLAGS for open & xopen */
#define RIO_LOPEN 0x00001 /* Local open */
#define RIO_MOPEN 0x00002 /* Modem open */
#define RIO_WOPEN 0x00004 /* Waiting for open */
#define RIO_CLOSING 0x00008 /* The port is being close */
#define RIO_XPBUSY 0x00010 /* Transparent printer busy */
#define RIO_BREAKING 0x00020 /* Break in progress */
#define RIO_DIRECT 0x00040 /* Doing Direct output */
#define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */
#define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */
#define RIO_CARR_ON 0x00200 /* Stream has carrier present */
#define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */
#define RIO_RBLK 0x00800 /* Stream is read-blocked */
#define RIO_BUSY 0x01000 /* Stream is BUSY for write */
#define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */
#define RIO_TXSTOP 0x04000 /* Stream output is stopped */
#define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */
#define RIO_DYNOROD 0x10000 /* Drain failed */
#define RIO_DELETED 0x20000 /* RTA has been deleted */
#define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
#define RIO_USING_EUC 0x100000 /* Using extended Unix chars */
#define RIO_CAN_COOK 0x200000 /* This line can do cooking */
#define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */
#define RIO_TRIAD_BLOCK 0x800000 /* Next read will block */
#define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */
#define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */
#define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */
#define RIO_TRIAD_BLOCK 0x800000 /* Next read will block */
#define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */
#define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */
ulong Config; /* FLAGS for NOREAD.... */
#define RIO_NOREAD 0x0001 /* Are not allowed to read port */
#define RIO_NOWRITE 0x0002 /* Are not allowed to write port */
#define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */
#define RIO_NOMASK 0x0007 /* All not allowed things */
#define RIO_IXANY 0x0008 /* Port is allowed ixany */
#define RIO_MODEM 0x0010 /* Stream is a modem device */
#define RIO_IXON 0x0020 /* Port is allowed ixon */
#define RIO_WAITDRAIN 0x0040 /* Wait for port to completely drain */
ulong Config; /* FLAGS for NOREAD.... */
#define RIO_NOREAD 0x0001 /* Are not allowed to read port */
#define RIO_NOWRITE 0x0002 /* Are not allowed to write port */
#define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */
#define RIO_NOMASK 0x0007 /* All not allowed things */
#define RIO_IXANY 0x0008 /* Port is allowed ixany */
#define RIO_MODEM 0x0010 /* Stream is a modem device */
#define RIO_IXON 0x0020 /* Port is allowed ixon */
#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_110_TO_110 0x0100 /* Map 110 baud to 110 baud */
......@@ -144,92 +142,90 @@ struct Port
** As LynxOS does not appear to support Hardware Flow Control .....
** Define our own flow control flags in 'Config'.
*/
#define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
#define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
struct PHB *PhbP; /* pointer to PHB for port */
WORD *TxAdd; /* Add packets here */
WORD *TxStart; /* Start of add array */
WORD *TxEnd; /* End of add array */
WORD *RxRemove; /* Remove packets here */
WORD *RxStart; /* Start of remove array */
WORD *RxEnd; /* End of remove array */
uint RtaUniqueNum; /* Unique number of RTA */
ushort PortState; /* status of port */
ushort ModemState; /* status of modem lines */
ulong ModemLines; /* Modem bits sent to RTA */
uchar CookMode; /* who expands CR/LF? */
uchar ParamSem; /* Prevent write during param */
uchar Mapped; /* if port mapped onto host */
uchar SecondBlock; /* if port belongs to 2nd block
of 16 port RTA */
uchar InUse; /* how many pre-emptive cmds */
uchar Lock; /* if params locked */
uchar Store; /* if params stored across closes */
uchar FirstOpen; /* TRUE if first time port opened */
uchar FlushCmdBodge; /* if doing a (non)flush */
uchar MagicFlags; /* require intr processing */
struct PHB *PhbP; /* pointer to PHB for port */
WORD *TxAdd; /* Add packets here */
WORD *TxStart; /* Start of add array */
WORD *TxEnd; /* End of add array */
WORD *RxRemove; /* Remove packets here */
WORD *RxStart; /* Start of remove array */
WORD *RxEnd; /* End of remove array */
uint RtaUniqueNum; /* Unique number of RTA */
ushort PortState; /* status of port */
ushort ModemState; /* status of modem lines */
ulong ModemLines; /* Modem bits sent to RTA */
uchar CookMode; /* who expands CR/LF? */
uchar ParamSem; /* Prevent write during param */
uchar Mapped; /* if port mapped onto host */
uchar SecondBlock; /* if port belongs to 2nd block
of 16 port RTA */
uchar InUse; /* how many pre-emptive cmds */
uchar Lock; /* if params locked */
uchar Store; /* if params stored across closes */
uchar FirstOpen; /* TRUE if first time port opened */
uchar FlushCmdBodge; /* if doing a (non)flush */
uchar MagicFlags; /* require intr processing */
#define MAGIC_FLUSH 0x01 /* mirror of WflushFlag */
#define MAGIC_REBOOT 0x02 /* RTA re-booted, re-open ports */
#define MORE_OUTPUT_EYGOR 0x04 /* riotproc failed to empty clists */
uchar WflushFlag; /* 1 How many WFLUSHs active */
uchar WflushFlag; /* 1 How many WFLUSHs active */
/*
** Transparent print stuff
*/
struct Xprint
{
struct Xprint {
#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
uint XpCps;
char XpOn[MAX_XP_CTRL_LEN];
char XpOff[MAX_XP_CTRL_LEN];
ushort XpLen; /* strlen(XpOn)+strlen(XpOff) */
uchar XpActive;
uchar XpLastTickOk; /* TRUE if we can process */
uint XpCps;
char XpOn[MAX_XP_CTRL_LEN];
char XpOff[MAX_XP_CTRL_LEN];
ushort XpLen; /* strlen(XpOn)+strlen(XpOff) */
uchar XpActive;
uchar XpLastTickOk; /* TRUE if we can process */
#define XP_OPEN 00001
#define XP_RUNABLE 00002
struct ttystatics *XttyP;
} Xprint;
struct ttystatics *XttyP;
} Xprint;
#ifdef VPIX
v86_t *StashP;
uint IntMask;
struct termss VpixSs;
uchar ModemStatusReg; /* Modem status register */
v86_t *StashP;
uint IntMask;
struct termss VpixSs;
uchar ModemStatusReg; /* Modem status register */
#endif
uchar RxDataStart;
uchar Cor2Copy; /* copy of COR2 */
char *Name; /* points to the Rta's name */
uchar RxDataStart;
uchar Cor2Copy; /* copy of COR2 */
char *Name; /* points to the Rta's name */
#ifdef STATS
struct RIOStats Stat; /* ports statistics */
struct RIOStats Stat; /* ports statistics */
#endif
char *TxRingBuffer;
ushort TxBufferIn; /* New data arrives here */
ushort TxBufferOut; /* Intr removes data here */
ushort OldTxBufferOut; /* Indicates if draining */
int TimeoutId; /* Timeout ID */
uint Debug;
uchar WaitUntilBooted; /* True if open should block */
uint statsGather; /* True if gathering stats */
ulong txchars; /* Chars transmitted */
ulong rxchars; /* Chars received */
ulong opens; /* port open count */
ulong closes; /* port close count */
ulong ioctls; /* ioctl count */
uchar LastRxTgl; /* Last state of rx toggle bit */
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 firstOpen; /* First time open ? */
char * p; /* save the global struc here .. */
char *TxRingBuffer;
ushort TxBufferIn; /* New data arrives here */
ushort TxBufferOut; /* Intr removes data here */
ushort OldTxBufferOut; /* Indicates if draining */
int TimeoutId; /* Timeout ID */
uint Debug;
uchar WaitUntilBooted; /* True if open should block */
uint statsGather; /* True if gathering stats */
ulong txchars; /* Chars transmitted */
ulong rxchars; /* Chars received */
ulong opens; /* port open count */
ulong closes; /* port close count */
ulong ioctls; /* ioctl count */
uchar LastRxTgl; /* Last state of rx toggle bit */
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 firstOpen; /* First time open ? */
char *p; /* save the global struc here .. */
};
struct ModuleInfo
{
char *Name;
uint Flags[4]; /* one per port on a module */
struct ModuleInfo {
char *Name;
uint Flags[4]; /* one per port on a module */
};
#endif
......@@ -238,8 +234,8 @@ struct ModuleInfo
** runs into problems with differing struct sizes between driver and config.
*/
struct PortParams {
uint Port;
ulong Config;
ulong State;
struct ttystatics *TtyP;
uint Port;
ulong Config;
ulong State;
struct ttystatics *TtyP;
};
......@@ -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,85 +160,85 @@ 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
*/
#if defined(RTA)
void rta_init(ushort RtaType);
#endif /* defined(RTA) */
#endif /* defined(RTA) */
/*
** 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 */
#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 ;
struct Q_BUF {
Q_BUF_ptr next ;
Q_BUF_ptr prev ;
PKT_ptr buf[PKTS_PER_BUFFER] ;
} ;
typedef struct Q_BUF Q_BUF;
struct Q_BUF {
Q_BUF_ptr next;
Q_BUF_ptr prev;
PKT_ptr buf[PKTS_PER_BUFFER];
};
#endif
/*********** end of file ***********/
......@@ -72,8 +72,8 @@ static char *_rio_h_sccs_ = "@(#)rio.h 1.3";
#define RIO_HOSTS 4 /* number of hosts that can be found */
#define PORTS_PER_HOST 128 /* number of ports per host */
#define LINKS_PER_UNIT 4 /* number of links from a host */
#define RIO_PORTS (PORTS_PER_HOST * RIO_HOSTS) /* max. no. of ports */
#define RTAS_PER_HOST (MAX_RUP) /* number of RTAs per host */
#define RIO_PORTS (PORTS_PER_HOST * RIO_HOSTS) /* max. no. of ports */
#define RTAS_PER_HOST (MAX_RUP) /* number of RTAs per host */
#define PORTS_PER_RTA (PORTS_PER_HOST/RTAS_PER_HOST) /* ports on a rta */
#define PORTS_PER_MODULE 4 /* number of ports on a plug-in module */
/* number of modules on an RTA */
......@@ -216,10 +216,9 @@ 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
{
uint Flag;
char Name[8];
typedef struct DbInf {
uint Flag;
char Name[8];
} DbInf;
#ifndef TRUE
......@@ -251,7 +250,7 @@ typedef struct DbInf
*((uint *)PK) = PP->PacketInfo; \
}
#define RIO_LINK_ENABLE 0x80FF /* FF is a hack, mainly for Mips, to */
#define RIO_LINK_ENABLE 0x80FF /* FF is a hack, mainly for Mips, to */
/* prevent a really stupid race condition. */
#define NOT_INITIALISED 0
......@@ -291,4 +290,4 @@ typedef struct DbInf
#define DIST_LINESW_OUTPUT 0x40
#define DIST_LINESW_MDMINT 0x80
#endif /* __rio_h__ */
#endif /* __rio_h__ */
此差异已折叠。
......@@ -37,15 +37,15 @@
struct vpd_prom {
unsigned short id;
char hwrev;
char hwass;
int uniqid;
char myear;
char mweek;
char hw_feature[5];
char oem_id;
char identifier[16];
unsigned short id;
char hwrev;
char hwass;
int uniqid;
char myear;
char mweek;
char hw_feature[5];
char oem_id;
char identifier[16];
};
......@@ -75,13 +75,13 @@ struct vpd_prom {
(L_ISIG(tty)))
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
#define RIO_BOARD_INTR_LOCK 1
#ifndef RIOCTL_MISC_MINOR
#ifndef RIOCTL_MISC_MINOR
/* Allow others to gather this into "major.h" or something like that */
#define RIOCTL_MISC_MINOR 169
#endif
......@@ -121,39 +121,39 @@ struct vpd_prom {
spin_unlock_irqrestore(sem, flags)
#define rio_spin_lock(sem) \
spin_lock(sem)
spin_lock(sem)
#define rio_spin_unlock(sem) \
spin_unlock(sem)
spin_unlock(sem)
#endif
#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;
char *dst = dest;
char *src = source;
while (n--) {
writeb (*src++, dst++);
(void) readb (dummy);
}
while (n--) {
writeb(*src++, dst++);
(void) readb(dummy);
}
return dest;
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;
char *dst = dest;
char *src = source;
while (n--)
*dst++ = readb (src++);
while (n--)
*dst++ = readb(src++);
return dest;
return dest;
}
#else
......@@ -179,9 +179,8 @@ static inline void *rio_memcpy_fromio (void *dest, void *source, int n)
#define func_exit() rio_dprintk (RIO_DEBUG_FLOW, "rio: exit %s\n", __FUNCTION__)
#define func_enter2() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s (port %d)\n",__FUNCTION__, port->line)
#else
#define rio_dprintk(f, str...) /* nothing */
#define rio_dprintk(f, str...) /* nothing */
#define func_enter()
#define func_exit()
#define func_enter2()
#endif
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册