[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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Andrew Morton
2006-01-11 12:17:49 -08:00
committed by Linus Torvalds
parent a941564458
commit 8d8706e2f8
72 changed files with 7230 additions and 7879 deletions

View File

@@ -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 ** The shape of the Host Control area, at offset 0x7C00, Write Only
*/ */
struct s_Ctrl struct s_Ctrl {
{ BYTE DpCtl; /* 7C00 */
BYTE DpCtl; /* 7C00 */ BYTE Dp_Unused2_[127];
BYTE Dp_Unused2_[127]; BYTE DpIntSet; /* 7C80 */
BYTE DpIntSet; /* 7C80 */ BYTE Dp_Unused3_[127];
BYTE Dp_Unused3_[127]; BYTE DpTpuReset; /* 7D00 */
BYTE DpTpuReset; /* 7D00 */ BYTE Dp_Unused4_[127];
BYTE Dp_Unused4_[127]; BYTE DpIntReset; /* 7D80 */
BYTE DpIntReset; /* 7D80 */ BYTE Dp_Unused5_[127];
BYTE Dp_Unused5_[127];
}; };
/* /*
** The PROM data area on the host (0x7C00), Read Only ** The PROM data area on the host (0x7C00), Read Only
*/ */
struct s_Prom struct s_Prom {
{ WORD DpSlxCode[2];
WORD DpSlxCode[2]; WORD DpRev;
WORD DpRev; WORD Dp_Unused6_;
WORD Dp_Unused6_; WORD DpUniq[4];
WORD DpUniq[4]; WORD DpJahre;
WORD DpJahre; WORD DpWoche;
WORD DpWoche; WORD DpHwFeature[5];
WORD DpHwFeature[5]; WORD DpOemId;
WORD DpOemId; WORD DpSiggy[16];
WORD DpSiggy[16];
}; };
/* /*
** Union of the Ctrl and Prom areas ** Union of the Ctrl and Prom areas
*/ */
union u_CtrlProm /* This is the control/PROM area (0x7C00) */ union u_CtrlProm { /* This is the control/PROM area (0x7C00) */
{ struct s_Ctrl DpCtrl;
struct s_Ctrl DpCtrl; struct s_Prom DpProm;
struct s_Prom DpProm;
}; };
/* /*
** The top end of memory! ** The top end of memory!
*/ */
struct s_ParmMapS /* Area containing Parm Map Pointer */ struct s_ParmMapS { /* Area containing Parm Map Pointer */
{ BYTE Dp_Unused8_[DP_PARMMAP_ADDR];
BYTE Dp_Unused8_[DP_PARMMAP_ADDR]; WORD DpParmMapAd;
WORD DpParmMapAd;
}; };
struct s_StartUpS struct s_StartUpS {
{ BYTE Dp_Unused9_[DP_STARTUP_ADDR];
BYTE Dp_Unused9_[DP_STARTUP_ADDR]; BYTE Dp_LongJump[0x4];
BYTE Dp_LongJump[0x4]; BYTE Dp_Unused10_[2];
BYTE Dp_Unused10_[2]; BYTE Dp_ShortJump[0x2];
BYTE Dp_ShortJump[0x2];
}; };
union u_Sram2ParmMap /* This is the top of memory (0x7E00-0x7FFF) */ union u_Sram2ParmMap { /* This is the top of memory (0x7E00-0x7FFF) */
{ BYTE DpSramMem[DP_SRAM2_SIZE];
BYTE DpSramMem[DP_SRAM2_SIZE];
struct s_ParmMapS DpParmMapS; struct s_ParmMapS DpParmMapS;
struct s_StartUpS DpStartUpS; 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. ** This is the DP RAM overlay.
*/ */
struct DpRam struct DpRam {
{ BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */
BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */ union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */
union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */ union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */
union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */ BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */
BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */ BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */
}; };
#define DpControl DpCtrlProm.DpCtrl.DpCtl #define DpControl DpCtrlProm.DpCtrl.DpCtl

View File

@@ -41,7 +41,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ; static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1";
#endif #endif
#endif #endif
@@ -49,14 +49,13 @@ static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ;
* Overlayed onto the Data fields of a regular * Overlayed onto the Data fields of a regular
* Packet * Packet
************************************************/ ************************************************/
typedef struct BOOT_PKT BOOT_PKT ; typedef struct BOOT_PKT BOOT_PKT;
struct BOOT_PKT { struct BOOT_PKT {
short seq_num ; short seq_num;
char data[10] ; char data[10];
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -97,11 +97,10 @@
#define MAX_RATE B2000 #define MAX_RATE B2000
struct baud_rate /* Tag for baud rates */ struct baud_rate { /* Tag for baud rates */
{ /* short host_rate, *//* As passed by the driver */
/* short host_rate,*/ /* As passed by the driver */ short divisor, /* The divisor */
short divisor, /* The divisor */ prescaler; /* The pre-scaler */
prescaler; /* The pre-scaler */
}; };
#endif #endif

View File

@@ -21,7 +21,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_chan_h_sccs = "@(#)chan.h 1.1" ; static char *_rio_chan_h_sccs = "@(#)chan.h 1.1";
#endif #endif
#endif #endif

View File

@@ -73,20 +73,20 @@
#define TIMER_TICK 0x82 #define TIMER_TICK 0x82
#define STOP_BREAK 0x83 #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 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 txack1 ((short *)0x7104)
#define rxack1 ((short *)0x7102) #define rxack1 ((short *)0x7102)
#define mdack1 ((short *)0x7106) #define mdack1 ((short *)0x7106)
#define txack2 ((short *)0x7006) #define txack2 ((short *)0x7006)
#define rxack2 ((short *)0x7004) #define rxack2 ((short *)0x7004)
#define mdack2 ((short *)0x7100) #define mdack2 ((short *)0x7100)
#define int_latch ((short *) 0x7800) #define int_latch ((short *) 0x7800)
#define int_status ((short *) 0x7c00) #define int_status ((short *) 0x7c00)
#define tx1_pending 0x20 #define tx1_pending 0x20
#define rx1_pending 0x10 #define rx1_pending 0x10
#define md1_pending 0x40 #define md1_pending 0x40
#define tx2_pending 0x02 #define tx2_pending 0x02
#define rx2_pending 0x01 #define rx2_pending 0x01
#define md2_pending 0x40 #define md2_pending 0x40
#define module1_bits 0x07 #define module1_bits 0x07
#define module1_modern 0x08 #define module1_modern 0x08
#define module2_bits 0x70 #define module2_bits 0x70
@@ -113,65 +113,65 @@
NB. These registers are relative values on 8 bit boundaries whereas NB. These registers are relative values on 8 bit boundaries whereas
on the RTA's the CIRRUS registers are on word boundaries. Use pointer on the RTA's the CIRRUS registers are on word boundaries. Use pointer
arithmetic (short *) to obtain the real addresses required */ arithmetic (short *) to obtain the real addresses required */
#define ccr 0x05 /* Channel Command Register */ #define ccr 0x05 /* Channel Command Register */
#define ier 0x06 /* Interrupt Enable Register */ #define ier 0x06 /* Interrupt Enable Register */
#define cor1 0x08 /* Channel Option Register 1 */ #define cor1 0x08 /* Channel Option Register 1 */
#define cor2 0x09 /* Channel Option Register 2 */ #define cor2 0x09 /* Channel Option Register 2 */
#define cor3 0x0a /* Channel Option Register 3 */ #define cor3 0x0a /* Channel Option Register 3 */
#define cor4 0x1e /* Channel Option Register 4 */ #define cor4 0x1e /* Channel Option Register 4 */
#define cor5 0x1f /* Channel Option Register 5 */ #define cor5 0x1f /* Channel Option Register 5 */
#define ccsr 0x0b /* Channel Control Status Register */ #define ccsr 0x0b /* Channel Control Status Register */
#define rdcr 0x0e /* Receive Data Count Register */ #define rdcr 0x0e /* Receive Data Count Register */
#define tdcr 0x12 /* Transmit Data Count Register */ #define tdcr 0x12 /* Transmit Data Count Register */
#define mcor1 0x15 /* Modem Change Option Register 1 */ #define mcor1 0x15 /* Modem Change Option Register 1 */
#define mcor2 0x16 /* Modem Change Option Regsiter 2 */ #define mcor2 0x16 /* Modem Change Option Regsiter 2 */
#define livr 0x18 /* Local Interrupt Vector Register */ #define livr 0x18 /* Local Interrupt Vector Register */
#define schr1 0x1a /* Special Character Register 1 */ #define schr1 0x1a /* Special Character Register 1 */
#define schr2 0x1b /* Special Character Register 2 */ #define schr2 0x1b /* Special Character Register 2 */
#define schr3 0x1c /* Special Character Register 3 */ #define schr3 0x1c /* Special Character Register 3 */
#define schr4 0x1d /* Special Character Register 4 */ #define schr4 0x1d /* Special Character Register 4 */
#define rtr 0x20 /* Receive Timer Register */ #define rtr 0x20 /* Receive Timer Register */
#define rtpr 0x21 /* Receive Timeout Period Register */ #define rtpr 0x21 /* Receive Timeout Period Register */
#define lnc 0x24 /* Lnext character */ #define lnc 0x24 /* Lnext character */
#define rivr 0x43 /* Receive Interrupt Vector Register */ #define rivr 0x43 /* Receive Interrupt Vector Register */
#define tivr 0x42 /* Transmit Interrupt Vector Register */ #define tivr 0x42 /* Transmit Interrupt Vector Register */
#define mivr 0x41 /* Modem Interrupt Vector Register */ #define mivr 0x41 /* Modem Interrupt Vector Register */
#define gfrcr 0x40 /* Global Firmware Revision code Reg */ #define gfrcr 0x40 /* Global Firmware Revision code Reg */
#define ricr 0x44 /* Receive Interrupting Channel Reg */ #define ricr 0x44 /* Receive Interrupting Channel Reg */
#define ticr 0x45 /* Transmit Interrupting Channel Reg */ #define ticr 0x45 /* Transmit Interrupting Channel Reg */
#define micr 0x46 /* Modem Interrupting Channel Register */ #define micr 0x46 /* Modem Interrupting Channel Register */
#define gcr 0x4b /* Global configuration register*/ #define gcr 0x4b /* Global configuration register */
#define misr 0x4c /* Modem interrupt status register */ #define misr 0x4c /* Modem interrupt status register */
#define rbusr 0x59 #define rbusr 0x59
#define tbusr 0x5a #define tbusr 0x5a
#define mbusr 0x5b #define mbusr 0x5b
#define eoir 0x60 /* End Of Interrupt Register */ #define eoir 0x60 /* End Of Interrupt Register */
#define rdsr 0x62 /* Receive Data / Status Register */ #define rdsr 0x62 /* Receive Data / Status Register */
#define tdr 0x63 /* Transmit Data Register */ #define tdr 0x63 /* Transmit Data Register */
#define svrr 0x67 /* Service Request Register */ #define svrr 0x67 /* Service Request Register */
#define car 0x68 /* Channel Access Register */ #define car 0x68 /* Channel Access Register */
#define mir 0x69 /* Modem Interrupt Register */ #define mir 0x69 /* Modem Interrupt Register */
#define tir 0x6a /* Transmit Interrupt Register */ #define tir 0x6a /* Transmit Interrupt Register */
#define rir 0x6b /* Receive Interrupt Register */ #define rir 0x6b /* Receive Interrupt Register */
#define msvr1 0x6c /* Modem Signal Value Register 1 */ #define msvr1 0x6c /* Modem Signal Value Register 1 */
#define msvr2 0x6d /* Modem Signal Value Register 2*/ #define msvr2 0x6d /* Modem Signal Value Register 2 */
#define psvr 0x6f /* Printer Signal Value Register*/ #define psvr 0x6f /* Printer Signal Value Register */
#define tbpr 0x72 /* Transmit Baud Rate Period Register */ #define tbpr 0x72 /* Transmit Baud Rate Period Register */
#define tcor 0x76 /* Transmit Clock Option Register */ #define tcor 0x76 /* Transmit Clock Option Register */
#define rbpr 0x78 /* Receive Baud Rate Period Register */ #define rbpr 0x78 /* Receive Baud Rate Period Register */
#define rber 0x7a /* Receive Baud Rate Extension Register */ #define rber 0x7a /* Receive Baud Rate Extension Register */
#define rcor 0x7c /* Receive Clock Option Register*/ #define rcor 0x7c /* Receive Clock Option Register */
#define ppr 0x7e /* Prescalar Period Register */ #define ppr 0x7e /* Prescalar Period Register */
/* Misc registers used for forcing the 1400 out of its reset woes */ /* Misc registers used for forcing the 1400 out of its reset woes */
#define airl 0x6d #define airl 0x6d
@@ -192,10 +192,10 @@
/* RDSR - when status read from FIFO */ /* RDSR - when status read from FIFO */
#define RDSR_BREAK 0x08 /* Break received */ #define RDSR_BREAK 0x08 /* Break received */
#define RDSR_TIMEOUT 0x80 /* No new data timeout */ #define RDSR_TIMEOUT 0x80 /* No new data timeout */
#define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */ #define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */
#define RDSR_SC2 0x20 /* Special char 2 (tx XOFF) 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_SC12_MASK 0x30 /* Mask for special chars 1 and 2 */
/* PPR */ /* PPR */
#define PPR_DEFAULT 0x31 /* Default value - for a 25Mhz clock gives #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_TIMEOUT 0x01 /* Timeout on no data */
#define IER_DEFAULT 0x94 /* Default values */ #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 */ #define IER_EMPTY 0x92 /* Transmitter empty rather than ready */
/* COR1 - Driver only */ /* COR1 - Driver only */
@@ -264,11 +264,11 @@
#define COR1_7BITS 0x02 /* 7 data bits */ #define COR1_7BITS 0x02 /* 7 data bits */
#define COR1_8BITS 0x03 /* 8 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 */ /* RTA only */
#define COR1_CINPCK 0x00 /* Check parity of received characters */ #define COR1_CINPCK 0x00 /* Check parity of received characters */
#define COR1_CNINPCK 0x10 /* Don't check parity */ #define COR1_CNINPCK 0x10 /* Don't check parity */
/* COR2 bits for both RTA and driver use */ /* COR2 bits for both RTA and driver use */
#define COR2_IXANY 0x80 /* IXANY - any character is XON */ #define COR2_IXANY 0x80 /* IXANY - any character is XON */
@@ -293,9 +293,9 @@
#define COR3_FCT 0x20 /* Flow control transparency */ #define COR3_FCT 0x20 /* Flow control transparency */
#define COR3_SCD12 0x10 /* Special character detect for SCHR's 1 + 2 */ #define COR3_SCD12 0x10 /* Special character detect for SCHR's 1 + 2 */
#define COR3_FIFO12 0x0c /* 12 chars for receive FIFO threshold */ #define COR3_FIFO12 0x0c /* 12 chars for receive FIFO threshold */
#define COR3_FIFO10 0x0a /* 10 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_FIFO8 0x08 /* 8 chars for receive FIFO threshold */
#define COR3_FIFO6 0x06 /* 6 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 */ #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_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 */ /* RTPR */
@@ -429,25 +429,25 @@
#define CONFIG 0x01 /* Configure a port */ #define CONFIG 0x01 /* Configure a port */
#define MOPEN 0x02 /* Modem open (block for DCD) */ #define MOPEN 0x02 /* Modem open (block for DCD) */
#define CLOSE 0x03 /* Close a port */ #define CLOSE 0x03 /* Close a port */
#define WFLUSH (0x04 | PRE_EMPTIVE) /* Write flush */ #define WFLUSH (0x04 | PRE_EMPTIVE) /* Write flush */
#define RFLUSH (0x05 | PRE_EMPTIVE) /* Read flush */ #define RFLUSH (0x05 | PRE_EMPTIVE) /* Read flush */
#define RESUME (0x06 | PRE_EMPTIVE) /* Resume if xoffed */ #define RESUME (0x06 | PRE_EMPTIVE) /* Resume if xoffed */
#define SBREAK 0x07 /* Start break */ #define SBREAK 0x07 /* Start break */
#define EBREAK 0x08 /* End break */ #define EBREAK 0x08 /* End break */
#define SUSPEND (0x09 | PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */ #define SUSPEND (0x09 | PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */
#define FCLOSE (0x0a | PRE_EMPTIVE) /* Force close */ #define FCLOSE (0x0a | PRE_EMPTIVE) /* Force close */
#define XPRINT 0x0b /* Xprint packet */ #define XPRINT 0x0b /* Xprint packet */
#define MBIS (0x0c | PRE_EMPTIVE) /* Set modem lines */ #define MBIS (0x0c | PRE_EMPTIVE) /* Set modem lines */
#define MBIC (0x0d | PRE_EMPTIVE) /* Clear modem lines */ #define MBIC (0x0d | PRE_EMPTIVE) /* Clear modem lines */
#define MSET (0x0e | PRE_EMPTIVE) /* Set modem lines */ #define MSET (0x0e | PRE_EMPTIVE) /* Set modem lines */
#define PCLOSE 0x0f /* Pseudo close - Leaves rx/tx enabled */ #define PCLOSE 0x0f /* Pseudo close - Leaves rx/tx enabled */
#define MGET (0x10 | PRE_EMPTIVE) /* Force update of modem status */ #define MGET (0x10 | PRE_EMPTIVE) /* Force update of modem status */
#define MEMDUMP (0x11 | PRE_EMPTIVE) /* Send back mem from addr supplied */ #define MEMDUMP (0x11 | PRE_EMPTIVE) /* Send back mem from addr supplied */
#define READ_REGISTER (0x12 | PRE_EMPTIVE) /* Read CD1400 register (debug) */ #define READ_REGISTER (0x12 | PRE_EMPTIVE) /* Read CD1400 register (debug) */
/* "Command" packets going from remote to host COMPLETE and MODEM_STATUS /* "Command" packets going from remote to host COMPLETE and MODEM_STATUS
use data[4] / data[3] to indicate current state and modem status respectively use data[4] / data[3] to indicate current state and modem status respectively
*/ */
#define COMPLETE (0x20 | PRE_EMPTIVE) #define COMPLETE (0x20 | PRE_EMPTIVE)
/* Command complete */ /* Command complete */

View File

@@ -42,7 +42,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ; static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1";
#endif #endif
#endif #endif
@@ -52,7 +52,7 @@ static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
#define CMD_IGNORE_PKT ( (ushort) 0) #define CMD_IGNORE_PKT ( (ushort) 0)
#define CMD_STATUS_REQ ( (ushort) 1) #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_PORT ( (ushort) 3)
#define CMD_CONF_UNIT ( (ushort) 4) #define CMD_CONF_UNIT ( (ushort) 4)
#define CMD_ROUTE_MAP_REQ ( (ushort) 5) #define CMD_ROUTE_MAP_REQ ( (ushort) 5)
@@ -81,4 +81,3 @@ static char *_rio_cmd_h_sccs = "@(#)cmd.h 1.1" ;
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -44,16 +44,15 @@ static char *_cmdblk_h_sccs_ = "@(#)cmdblk.h 1.2";
** a rup. ** a rup.
*/ */
struct CmdBlk struct CmdBlk {
{ struct CmdBlk *NextP; /* Pointer to next command block */
struct CmdBlk *NextP; /* Pointer to next command block */ struct PKT Packet; /* A packet, to copy to the rup */
struct PKT Packet; /* A packet, to copy to the rup */ /* The func to call to check if OK */
/* The func to call to check if OK */ int (*PreFuncP) (int, struct CmdBlk *);
int (*PreFuncP)(int, struct CmdBlk *); int PreArg; /* The arg for the func */
int PreArg; /* The arg for the func */ /* The func to call when completed */
/* The func to call when completed */ int (*PostFuncP) (int, struct CmdBlk *);
int (*PostFuncP)(int, struct CmdBlk *); int PostArg; /* The arg for the func */
int PostArg; /* The arg for the func */
}; };
#define NUM_RIO_CMD_BLKS (3 * (MAX_RUP * 4 + LINKS_PER_UNIT * 4)) #define NUM_RIO_CMD_BLKS (3 * (MAX_RUP * 4 + LINKS_PER_UNIT * 4))

View File

@@ -54,135 +54,112 @@ static char *_cmdpkt_h_sccs_ = "@(#)cmdpkt.h 1.2";
** This structure overlays a PktCmd->CmdData structure, and so starts ** This structure overlays a PktCmd->CmdData structure, and so starts
** at Data[2] in the actual pkt! ** at Data[2] in the actual pkt!
*/ */
struct BootSequence struct BootSequence {
{ WORD NumPackets;
WORD NumPackets; WORD LoadBase;
WORD LoadBase; WORD CodeSize;
WORD CodeSize;
}; };
#define BOOT_SEQUENCE_LEN 8 #define BOOT_SEQUENCE_LEN 8
struct SamTop struct SamTop {
{ BYTE Unit;
BYTE Unit; BYTE Link;
BYTE Link;
}; };
struct CmdHdr struct CmdHdr {
{ BYTE PcCommand;
BYTE PcCommand; union {
union BYTE PcPhbNum;
{ BYTE PcLinkNum;
BYTE PcPhbNum; BYTE PcIDNum;
BYTE PcLinkNum; } U0;
BYTE PcIDNum;
} U0;
}; };
struct PktCmd struct PktCmd {
{ union {
union struct {
{ struct CmdHdr CmdHdr;
struct struct BootSequence PcBootSequence;
{ } S1;
struct CmdHdr CmdHdr; struct {
struct BootSequence PcBootSequence; WORD PcSequence;
} S1; BYTE PcBootData[RTA_BOOT_DATA_SIZE];
struct } S2;
{ struct {
WORD PcSequence; WORD __crud__;
BYTE PcBootData[RTA_BOOT_DATA_SIZE]; BYTE PcUniqNum[4]; /* this is really a uint. */
} S2; BYTE PcModuleTypes; /* what modules are fitted */
struct } S3;
{ struct {
WORD __crud__; struct CmdHdr CmdHdr;
BYTE PcUniqNum[4]; /* this is really a uint. */ BYTE __undefined__;
BYTE PcModuleTypes; /* what modules are fitted */ BYTE PcModemStatus;
} S3; BYTE PcPortStatus;
struct BYTE PcSubCommand; /* commands like mem or register dump */
{ WORD PcSubAddr; /* Address for command */
struct CmdHdr CmdHdr; BYTE PcSubData[64]; /* Date area for command */
BYTE __undefined__; } S4;
BYTE PcModemStatus; struct {
BYTE PcPortStatus; struct CmdHdr CmdHdr;
BYTE PcSubCommand; /* commands like mem or register dump */ BYTE PcCommandText[1];
WORD PcSubAddr; /* Address for command */ BYTE __crud__[20];
BYTE PcSubData[64]; /* Date area for command */ BYTE PcIDNum2; /* It had to go somewhere! */
} S4; } S5;
struct struct {
{ struct CmdHdr CmdHdr;
struct CmdHdr CmdHdr; struct SamTop Topology[LINKS_PER_UNIT];
BYTE PcCommandText[1]; } S6;
BYTE __crud__[20]; } U1;
BYTE PcIDNum2; /* It had to go somewhere! */
} S5;
struct
{
struct CmdHdr CmdHdr;
struct SamTop Topology[LINKS_PER_UNIT];
} S6;
} U1;
}; };
struct PktCmd_M struct PktCmd_M {
{ union {
union struct {
{ struct {
struct uchar PcCommand;
{ union {
struct uchar PcPhbNum;
{ uchar PcLinkNum;
uchar PcCommand; uchar PcIDNum;
union } U0;
{ } CmdHdr;
uchar PcPhbNum; struct {
uchar PcLinkNum; ushort NumPackets;
uchar PcIDNum; ushort LoadBase;
} U0; ushort CodeSize;
} CmdHdr; } PcBootSequence;
struct } S1;
{ struct {
ushort NumPackets; ushort PcSequence;
ushort LoadBase; uchar PcBootData[RTA_BOOT_DATA_SIZE];
ushort CodeSize; } S2;
} PcBootSequence; struct {
} S1; ushort __crud__;
struct uchar PcUniqNum[4]; /* this is really a uint. */
{ uchar PcModuleTypes; /* what modules are fitted */
ushort PcSequence; } S3;
uchar PcBootData[RTA_BOOT_DATA_SIZE]; struct {
} S2; ushort __cmd_hdr__;
struct uchar __undefined__;
{ uchar PcModemStatus;
ushort __crud__; uchar PcPortStatus;
uchar PcUniqNum[4]; /* this is really a uint. */ uchar PcSubCommand;
uchar PcModuleTypes; /* what modules are fitted */ ushort PcSubAddr;
} S3; uchar PcSubData[64];
struct } S4;
{ struct {
ushort __cmd_hdr__; ushort __cmd_hdr__;
uchar __undefined__; uchar PcCommandText[1];
uchar PcModemStatus; uchar __crud__[20];
uchar PcPortStatus; uchar PcIDNum2; /* Tacked on end */
uchar PcSubCommand; } S5;
ushort PcSubAddr; struct {
uchar PcSubData[64]; ushort __cmd_hdr__;
} S4; struct Top Topology[LINKS_PER_UNIT];
struct } S6;
{ } U1;
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 #define Command U1.S1.CmdHdr.PcCommand

View File

@@ -51,12 +51,11 @@
#define UFOAD ( CONTROL + 4 ) #define UFOAD ( CONTROL + 4 )
#define IWAIT ( CONTROL + 5 ) #define IWAIT ( CONTROL + 5 )
#define IFOAD_MAGIC 0xF0AD /* of course */ #define IFOAD_MAGIC 0xF0AD /* of course */
#define ZOMBIE_MAGIC (~0xDEAD) /* not dead -> zombie */ #define ZOMBIE_MAGIC (~0xDEAD) /* not dead -> zombie */
#define UFOAD_MAGIC 0xD1E /* kill-your-neighbour */ #define UFOAD_MAGIC 0xD1E /* kill-your-neighbour */
#define IWAIT_MAGIC 0xB1DE /* Bide your time */ #define IWAIT_MAGIC 0xB1DE /* Bide your time */
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -44,18 +44,16 @@ static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3";
** structures used on /dev/rio ** structures used on /dev/rio
*/ */
struct Error struct Error {
{ uint Error;
uint Error; uint Entry;
uint Entry; uint Other;
uint Other;
}; };
struct DownLoad struct DownLoad {
{ char *DataP;
char *DataP; uint Count;
uint Count; uint ProductCode;
uint ProductCode;
}; };
/* /*
@@ -66,46 +64,41 @@ struct DownLoad
#endif #endif
#ifndef MAX_XP_CTRL_LEN #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 #endif
struct PortSetup struct PortSetup {
{ uint From; /* Set/Clear XP & IXANY Control from this port.... */
uint From; /* Set/Clear XP & IXANY Control from this port.... */ uint To; /* .... to this port */
uint To; /* .... to this port */ uint XpCps; /* at this speed */
uint XpCps; /* at this speed */ char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */
char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */ char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */
char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */ uchar IxAny; /* enable/disable IXANY */
uchar IxAny; /* enable/disable IXANY */ uchar IxOn; /* enable/disable IXON */
uchar IxOn; /* enable/disable IXON */ uchar Lock; /* lock port params */
uchar Lock; /* lock port params */ uchar Store; /* store params across closes */
uchar Store; /* store params across closes */ uchar Drain; /* close only when drained */
uchar Drain; /* close only when drained */
}; };
struct LpbReq struct LpbReq {
{ uint Host;
uint Host; uint Link;
uint Link; struct LPB *LpbP;
struct LPB *LpbP;
}; };
struct RupReq struct RupReq {
{ uint HostNum;
uint HostNum; uint RupNum;
uint RupNum; struct RUP *RupP;
struct RUP *RupP;
}; };
struct PortReq struct PortReq {
{ uint SysPort;
uint SysPort; struct Port *PortP;
struct Port *PortP;
}; };
struct StreamInfo struct StreamInfo {
{ uint SysPort;
uint SysPort;
#if 0 #if 0
queue_t RQueue; queue_t RQueue;
queue_t WQueue; queue_t WQueue;
@@ -115,68 +108,59 @@ struct StreamInfo
#endif #endif
}; };
struct HostReq struct HostReq {
{ uint HostNum;
uint HostNum; struct Host *HostP;
struct Host *HostP;
}; };
struct HostDpRam struct HostDpRam {
{ uint HostNum;
uint HostNum; struct DpRam *DpRamP;
struct DpRam *DpRamP;
}; };
struct DebugCtrl struct DebugCtrl {
{ uint SysPort;
uint SysPort; uint Debug;
uint Debug; uint Wait;
uint Wait;
}; };
struct MapInfo struct MapInfo {
{ uint FirstPort; /* 8 ports, starting from this (tty) number */
uint FirstPort; /* 8 ports, starting from this (tty) number */ uint RtaUnique; /* reside on this RTA (unique number) */
uint RtaUnique; /* reside on this RTA (unique number) */
}; };
struct MapIn struct MapIn {
{ uint NumEntries; /* How many port sets are we mapping? */
uint NumEntries; /* How many port sets are we mapping? */ struct MapInfo *MapInfoP; /* Pointer to (user space) info */
struct MapInfo *MapInfoP; /* Pointer to (user space) info */
}; };
struct SendPack struct SendPack {
{ unsigned int PortNum;
unsigned int PortNum; unsigned char Len;
unsigned char Len; unsigned char Data[PKT_MAX_DATA_LEN];
unsigned char Data[PKT_MAX_DATA_LEN];
}; };
struct SpecialRupCmd struct SpecialRupCmd {
{ struct PKT Packet;
struct PKT Packet; unsigned short Host;
unsigned short Host; unsigned short RupNum;
unsigned short RupNum;
}; };
struct IdentifyRta struct IdentifyRta {
{ ulong RtaUnique;
ulong RtaUnique; uchar ID;
uchar ID;
}; };
struct KillNeighbour struct KillNeighbour {
{ ulong UniqueNum;
ulong UniqueNum; uchar Link;
uchar Link;
}; };
struct rioVersion { struct rioVersion {
char version[MAX_VERSION_LEN]; char version[MAX_VERSION_LEN];
char relid[MAX_VERSION_LEN]; char relid[MAX_VERSION_LEN];
int buildLevel; int buildLevel;
char buildDate[MAX_VERSION_LEN]; char buildDate[MAX_VERSION_LEN];
}; };
@@ -316,16 +300,16 @@ struct rioVersion {
#define RIO_SET_XP_CPS rIOCW(155,int) #define RIO_SET_XP_CPS rIOCW(155,int)
#define RIO_GET_IXANY rIOCR(156,int) /* ixany allowed? */ #define RIO_GET_IXANY rIOCR(156,int) /* ixany allowed? */
#define RIO_SET_IXANY rIOCW(157,int) #define RIO_SET_IXANY rIOCW(157,int)
#define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */ #define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */
#define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */ #define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */
#define RIO_GET_MODEM rIOCR(160,int) /* port is modem/direct line? */ #define RIO_GET_MODEM rIOCR(160,int) /* port is modem/direct line? */
#define RIO_SET_MODEM rIOCW(161,int) #define RIO_SET_MODEM rIOCW(161,int)
#define RIO_SET_MODEM_ON rIOCN(162) /* port is a modem */ #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_OFF rIOCN(163) /* port is direct */
#define RIO_GET_IXON rIOCR(164,int) /* ixon allowed? */ #define RIO_GET_IXON rIOCR(164,int) /* ixon allowed? */
#define RIO_SET_IXON rIOCW(165,int) #define RIO_SET_IXON rIOCW(165,int)
#define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */ #define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */
#define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */ #define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */
#define RIO_GET_SIVIEW ((('s')<<8) | 106) /* backwards compatible with SI */ #define RIO_GET_SIVIEW ((('s')<<8) | 106) /* backwards compatible with SI */

View File

@@ -33,7 +33,7 @@
#define DBPACKET(pkt, opt, str, chn) debug_packet((pkt), (opt), (str), (chn)) #define DBPACKET(pkt, opt, str, chn) debug_packet((pkt), (opt), (str), (chn))
#else #else
#define DBPACKET(pkt, opt, str, c) #define DBPACKET(pkt, opt, str, c)
#endif /* DCIRRUS */ #endif /* DCIRRUS */
#endif /* _debug_h_ */ #endif /* _debug_h_ */

View File

@@ -37,13 +37,13 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1" ; static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1";
#endif #endif
#endif #endif
#define MILLISECOND (int) (1000/64) /* 15.625 low ticks */ #define MILLISECOND (int) (1000/64) /* 15.625 low ticks */
#define SECOND (int) 15625 /* Low priority ticks */ #define SECOND (int) 15625 /* Low priority ticks */
#ifdef RTA #ifdef RTA
#define RX_LIMIT (ushort) 3 #define RX_LIMIT (ushort) 3
@@ -56,4 +56,3 @@ static char *_rio_defaults_h_sccs = "@(#)defaults.h 1.1" ;
/*********** end of file ***********/ /*********** end of file ***********/

View 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_LO 0xC80 /* where RIO_EISA_IDENT is */
#define EISA_PRODUCT_IDENT_HI 0xC81 #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_REVISION_NUMBER 0xC83 /* revision (1dp) */
#define EISA_ENABLE 0xC84 /* set LSB to enable card */ #define EISA_ENABLE 0xC84 /* set LSB to enable card */
#define EISA_UNIQUE_NUM_0 0xC88 /* vomit */ #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 INBZ(z,x) inb(((z)<<12) | (x))
#define OUTBZ(z,x,y) outb((((z)<<12) | (x)), y) #define OUTBZ(z,x,y) outb((((z)<<12) | (x)), y)
#endif /* __rio_eisa_h__ */ #endif /* __rio_eisa_h__ */

View File

@@ -36,7 +36,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_enable_h_sccs = "@(#)enable.h 1.1" ; static char *_rio_enable_h_sccs = "@(#)enable.h 1.1";
#endif #endif
#endif #endif
@@ -46,5 +46,3 @@ static char *_rio_enable_h_sccs = "@(#)enable.h 1.1" ;
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -80,6 +80,3 @@
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -101,4 +101,4 @@ static char *_errors_h_sccs_ = "@(#)errors.h 1.2";
#define NOT_ENOUGH_CORE_FOR_PCI_COPY 53 #define NOT_ENOUGH_CORE_FOR_PCI_COPY 53
#endif /* __rio_errors_h__ */ #endif /* __rio_errors_h__ */

View File

@@ -41,114 +41,113 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_formpkt_h_sccs = "@(#)formpkt.h 1.1" ; static char *_rio_formpkt_h_sccs = "@(#)formpkt.h 1.1";
#endif #endif
#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 { struct FORM_BOOT_PKT_1 {
ushort pkt_number ; ushort pkt_number;
ushort pkt_total ; ushort pkt_total;
ushort boot_top ; 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 { struct FORM_BOOT_PKT_2 {
ushort pkt_number ; ushort pkt_number;
char boot_data[10] ; char boot_data[10];
} ; };
typedef struct FORM_ATTACH_RTA FORM_ATTACH_RTA ; typedef struct FORM_ATTACH_RTA FORM_ATTACH_RTA;
struct FORM_ATTACH_RTA { struct FORM_ATTACH_RTA {
char cmd_code ; char cmd_code;
char booter_serial[4] ; char booter_serial[4];
char booter_link ; char booter_link;
char bootee_serial[4] ; char bootee_serial[4];
char bootee_link ; char bootee_link;
} ; };
typedef struct FORM_BOOT_ID FORM_BOOT_ID ; typedef struct FORM_BOOT_ID FORM_BOOT_ID;
struct FORM_BOOT_ID { struct FORM_BOOT_ID {
char cmd_code ; char cmd_code;
char bootee_serial[4] ; char bootee_serial[4];
char bootee_prod_id ; char bootee_prod_id;
char bootee_link ; char bootee_link;
} ; };
typedef struct FORM_ROUTE_1 FORM_ROUTE_1 ; typedef struct FORM_ROUTE_1 FORM_ROUTE_1;
struct FORM_ROUTE_1 { struct FORM_ROUTE_1 {
char cmd_code ; char cmd_code;
char pkt_number ; char pkt_number;
char total_in_sequence ; char total_in_sequence;
char unit_id ; char unit_id;
char host_unit_id ; char host_unit_id;
} ; };
typedef struct FORM_ROUTE_2 FORM_ROUTE_2 ; typedef struct FORM_ROUTE_2 FORM_ROUTE_2;
struct FORM_ROUTE_2 { struct FORM_ROUTE_2 {
char cmd_code ; char cmd_code;
char pkt_number ; char pkt_number;
char total_in_sequence ; char total_in_sequence;
char route_data[9] ; char route_data[9];
} ; };
typedef struct FORM_ROUTE_REQ FORM_ROUTE_REQ ; typedef struct FORM_ROUTE_REQ FORM_ROUTE_REQ;
struct FORM_ROUTE_REQ { struct FORM_ROUTE_REQ {
char cmd_code ; char cmd_code;
char pkt_number ; char pkt_number;
char total_in_sequence ; char total_in_sequence;
char route_data[10] ; char route_data[10];
} ; };
typedef struct FORM_ERROR FORM_ERROR ; typedef struct FORM_ERROR FORM_ERROR;
struct FORM_ERROR { struct FORM_ERROR {
char cmd_code ; char cmd_code;
char error_code ; char error_code;
} ; };
typedef struct FORM_STATUS FORM_STATUS ; typedef struct FORM_STATUS FORM_STATUS;
struct FORM_STATUS { struct FORM_STATUS {
char cmd_code ; char cmd_code;
char status_code ; char status_code;
char last_packet_valid ; char last_packet_valid;
char tx_buffer ; char tx_buffer;
char rx_buffer ; char rx_buffer;
char port_status ; char port_status;
char phb_status ; char phb_status;
} ; };
typedef struct FORM_LINK_STATUS FORM_LINK_STATUS ; typedef struct FORM_LINK_STATUS FORM_LINK_STATUS;
struct FORM_LINK_STATUS { struct FORM_LINK_STATUS {
char cmd_code ; char cmd_code;
char status_code ; char status_code;
char link_number ; char link_number;
ushort rx_errors ; ushort rx_errors;
ushort tx_errors ; ushort tx_errors;
ushort csum_errors ; ushort csum_errors;
ushort disconnects ; ushort disconnects;
} ; };
typedef struct FORM_PARTITION FORM_PARTITION ; typedef struct FORM_PARTITION FORM_PARTITION;
struct FORM_PARTITION { struct FORM_PARTITION {
char cmd_code ; char cmd_code;
char status_code ; char status_code;
char port_number ; char port_number;
char tx_max ; char tx_max;
char rx_max ; char rx_max;
char rx_limit ; char rx_limit;
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -47,20 +47,19 @@ int RIOBootCodeHOST(struct rio_info *, register struct DownLoad *);
int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *); int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
void msec_timeout(struct Host *); void msec_timeout(struct Host *);
int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *); int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *);
int RIOBootOk(struct rio_info *,struct Host *, ulong); int RIOBootOk(struct rio_info *, struct Host *, ulong);
int RIORtaBound(struct rio_info *, uint); int RIORtaBound(struct rio_info *, uint);
void FillSlot(int, int, uint, struct Host *); void FillSlot(int, int, uint, struct Host *);
/* riocmd.c */ /* riocmd.c */
int RIOFoadRta(struct Host *, struct Map *); int RIOFoadRta(struct Host *, struct Map *);
int RIOZombieRta(struct Host *, struct Map *); int RIOZombieRta(struct Host *, struct Map *);
int RIOCommandRta(struct rio_info *, uint, int (* func)( struct Host *, int RIOCommandRta(struct rio_info *, uint, int (*func) (struct Host *, struct Map *));
struct Map *)); int RIOIdentifyRta(struct rio_info *, caddr_t);
int RIOIdentifyRta(struct rio_info *, caddr_t);
int RIOKillNeighbour(struct rio_info *, caddr_t); int RIOKillNeighbour(struct rio_info *, caddr_t);
int RIOSuspendBootRta(struct Host *, int, int); int RIOSuspendBootRta(struct Host *, int, int);
int RIOFoadWakeup(struct rio_info *); int RIOFoadWakeup(struct rio_info *);
struct CmdBlk * RIOGetCmdBlk(void); struct CmdBlk *RIOGetCmdBlk(void);
void RIOFreeCmdBlk(struct CmdBlk *); void RIOFreeCmdBlk(struct CmdBlk *);
int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *); int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *);
void RIOPollHostCommands(struct rio_info *, struct Host *); void RIOPollHostCommands(struct rio_info *, struct Host *);
@@ -71,13 +70,13 @@ void ShowPacket(uint, struct PKT *);
/* rioctrl.c */ /* rioctrl.c */
int copyin(int, caddr_t, int); int copyin(int, caddr_t, int);
int riocontrol(struct rio_info *, dev_t,int,caddr_t,int); int riocontrol(struct rio_info *, dev_t, int, caddr_t, int);
int RIOPreemptiveCmd(struct rio_info *,struct Port *,uchar); int RIOPreemptiveCmd(struct rio_info *, struct Port *, uchar);
/* rioinit.c */ /* rioinit.c */
void rioinit(struct rio_info *, struct RioHostInfo *); void rioinit(struct rio_info *, struct RioHostInfo *);
void RIOInitHosts(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); int RIODoAT(struct rio_info *, int, int);
caddr_t RIOCheckForATCard(int); caddr_t RIOCheckForATCard(int);
int RIOAssignAT(struct rio_info *, int, caddr_t, 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 RIOAllocDataStructs(struct rio_info *);
void RIOSetupDataStructs(struct rio_info *); void RIOSetupDataStructs(struct rio_info *);
int RIODefaultName(struct rio_info *, struct Host *, uint); int RIODefaultName(struct rio_info *, struct Host *, uint);
struct rioVersion * RIOVersid(void); struct rioVersion *RIOVersid(void);
int RIOMapin(paddr_t, int, caddr_t *); int RIOMapin(paddr_t, int, caddr_t *);
void RIOMapout(paddr_t, long, caddr_t); void RIOMapout(paddr_t, long, caddr_t);
void RIOHostReset(uint, volatile struct DpRam *, uint); void RIOHostReset(uint, volatile struct DpRam *, uint);
@@ -108,7 +107,7 @@ void remove_receive(struct Port *);
/* rioroute.c */ /* rioroute.c */
int RIORouteRup(struct rio_info *, uint, struct Host *, struct PKT *); 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); uint GetUnitType(uint);
int RIOSetChange(struct rio_info *); int RIOSetChange(struct rio_info *);
int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *); int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
@@ -116,9 +115,9 @@ int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
/* riotty.c */ /* riotty.c */
int riotopen(struct tty_struct * tty, struct file * filp); int riotopen(struct tty_struct *tty, struct file *filp);
int riotclose(void *ptr); int riotclose(void *ptr);
int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t); int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t);
void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg); void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
/* riotable.c */ /* riotable.c */
@@ -127,27 +126,27 @@ int RIOApel(struct rio_info *);
int RIODeleteRta(struct rio_info *, struct Map *); int RIODeleteRta(struct rio_info *, struct Map *);
int RIOAssignRta(struct rio_info *, struct Map *); int RIOAssignRta(struct rio_info *, struct Map *);
int RIOReMapPorts(struct rio_info *, struct Host *, 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 #if 0
/* riodrvr.c */ /* 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_uninstall(register struct rio_info *);
int rio_open(struct rio_info *, int, struct file *); int rio_open(struct rio_info *, int, struct file *);
int rio_close(struct rio_info *, struct file *); int rio_close(struct rio_info *, struct file *);
int rio_read(struct rio_info *, struct file *, char *, int); 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_ioctl(struct rio_info *, struct file *, int, char *);
int rio_select(struct rio_info *, struct file * f, int, struct sel *); int rio_select(struct rio_info *, struct file *f, int, struct sel *);
int rio_intr(char *); int rio_intr(char *);
int rio_isr_thread(char *); int rio_isr_thread(char *);
struct rio_info * rio_info_store( int cmd, struct rio_info * p); struct rio_info *rio_info_store(int cmd, struct rio_info *p);
#endif #endif
extern int rio_pcicopy(char *src, char *dst, int n); extern int rio_pcicopy(char *src, char *dst, int n);
extern int rio_minor (struct tty_struct *tty); extern int rio_minor(struct tty_struct *tty);
extern int rio_ismodem (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 */

View File

@@ -49,33 +49,32 @@ static char *_host_h_sccs_ = "@(#)host.h 1.2";
** Host data structure. This is used for the software equiv. of ** Host data structure. This is used for the software equiv. of
** the host. ** the host.
*/ */
struct Host struct Host {
{ uchar Type; /* RIO_EISA, RIO_MCA, ... */
uchar Type; /* RIO_EISA, RIO_MCA, ... */ uchar Ivec; /* POLLED or ivec number */
uchar Ivec; /* POLLED or ivec number */ uchar Mode; /* Control stuff */
uchar Mode; /* Control stuff */ uchar Slot; /* Slot */
uchar Slot; /* Slot */ volatile caddr_t Caddr; /* KV address of DPRAM */
volatile caddr_t Caddr; /* KV address of DPRAM */ volatile struct DpRam *CardP; /* KV address of DPRAM, with overlay */
volatile struct DpRam *CardP; /* KV address of DPRAM, with overlay */ paddr_t PaddrP; /* Phys. address of DPRAM */
paddr_t PaddrP; /* Phys. address of DPRAM */ char Name[MAX_NAME_LEN]; /* The name of the host */
char Name[MAX_NAME_LEN]; /* The name of the host */ uint UniqueNum; /* host unique number */
uint UniqueNum; /* host unique number */ spinlock_t HostLock; /* Lock structure for MPX */
spinlock_t HostLock; /* Lock structure for MPX */ /*struct pci_devinfo PciDevInfo; *//* PCI Bus/Device/Function stuff */
/*struct pci_devinfo PciDevInfo; *//* PCI Bus/Device/Function stuff */ /*struct lockb HostLock; *//* Lock structure for MPX */
/*struct lockb HostLock; *//* Lock structure for MPX */ uint WorkToBeDone; /* set to true each interrupt */
uint WorkToBeDone; /* set to true each interrupt */ uint InIntr; /* Being serviced? */
uint InIntr; /* Being serviced? */ uint IntSrvDone; /* host's interrupt has been serviced */
uint IntSrvDone;/* host's interrupt has been serviced */ int (*Copy) (caddr_t, caddr_t, int); /* copy func */
int (*Copy)( caddr_t, caddr_t, int ); /* copy func */ struct timer_list timer;
struct timer_list timer; /*
/* ** I M P O R T A N T !
** I M P O R T A N T ! **
** ** The rest of this data structure is cleared to zero after
** The rest of this data structure is cleared to zero after ** a RIO_HOST_FOAD command.
** a RIO_HOST_FOAD command. */
*/
ulong Flags; /* Whats going down */
ulong Flags; /* Whats going down */
#define RC_WAITING 0 #define RC_WAITING 0
#define RC_STARTUP 1 #define RC_STARTUP 1
#define RC_RUNNING 2 #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_OWN 0x10 /* Only boot RTAs bound to this system */
#define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */ #define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */
struct Top Topology[LINKS_PER_UNIT]; /* one per link */ struct Top Topology[LINKS_PER_UNIT]; /* one per link */
struct Map Mapping[MAX_RUP]; /* Mappings for host */ struct Map Mapping[MAX_RUP]; /* Mappings for host */
struct PHB *PhbP; /* Pointer to the PHB array */ struct PHB *PhbP; /* Pointer to the PHB array */
ushort *PhbNumP; /* Ptr to Number of PHB's */ ushort *PhbNumP; /* Ptr to Number of PHB's */
struct LPB *LinkStrP ; /* Link Structure Array */ struct LPB *LinkStrP; /* Link Structure Array */
struct RUP *RupP; /* Sixteen real rups here */ struct RUP *RupP; /* Sixteen real rups here */
struct PARM_MAP *ParmMapP; /* points to the parmmap */ struct PARM_MAP *ParmMapP; /* points to the parmmap */
uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */ uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
uint NumExtraBooted; /* how many of the above */ uint NumExtraBooted; /* how many of the above */
/* /*
** Twenty logical rups. ** Twenty logical rups.
** The first sixteen are the real Rup entries (above), the last four ** The first sixteen are the real Rup entries (above), the last four
** are the link RUPs. ** are the link RUPs.
*/ */
struct UnixRup UnixRups[MAX_RUP+LINKS_PER_UNIT]; struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
int timeout_id; /* For calling 100 ms delays */ int timeout_id; /* For calling 100 ms delays */
int timeout_sem;/* For calling 100 ms delays */ int timeout_sem; /* For calling 100 ms delays */
long locks; /* long req'd for set_bit --RR */ long locks; /* long req'd for set_bit --RR */
char ____end_marker____; char ____end_marker____;
}; };
#define Control CardP->DpControl #define Control CardP->DpControl
#define SetInt CardP->DpSetInt #define SetInt CardP->DpSetInt
@@ -129,6 +128,6 @@ struct Host
#define Year CardP->DpYear #define Year CardP->DpYear
#define Week CardP->DpWeek #define Week CardP->DpWeek
#define RIO_DUMBPARM 0x0860 /* what not to expect */ #define RIO_DUMBPARM 0x0860 /* what not to expect */
#endif #endif

View File

@@ -37,7 +37,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -53,5 +53,3 @@ static char *_rio_hosthw_h_sccs = "@(#)hosthw.h 1.2" ;
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -70,27 +70,27 @@
#define DIE_NOW (ushort) 0x0200 #define DIE_NOW (ushort) 0x0200
/* Boot request stuff */ /* Boot request stuff */
#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */ #define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
#define BOOT_ABORT ((ushort) 1) /* Abort a boot */ #define BOOT_ABORT ((ushort) 1) /* Abort a boot */
#define BOOT_SEQUENCE ((ushort) 2) /* Packet with the number of packets #define BOOT_SEQUENCE ((ushort) 2) /* Packet with the number of packets
and load address */ and load address */
#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */ #define BOOT_COMPLETED ((ushort) 3) /* Boot completed */
/* States that a link can be in */ /* States that a link can be in */
#define LINK_DISCONNECTED ((ushort) 0) /* Disconnected */ #define LINK_DISCONNECTED ((ushort) 0) /* Disconnected */
#define LINK_BOOT1 ((ushort) 1) /* Trying to send 1st stage boot */ #define LINK_BOOT1 ((ushort) 1) /* Trying to send 1st stage boot */
#define LINK_BOOT2 ((ushort) 2) /* Trying to send 2nd stage boot */ #define LINK_BOOT2 ((ushort) 2) /* Trying to send 2nd stage boot */
#define LINK_BOOT2WAIT ((ushort) 3) /* Waiting for selftest results */ #define LINK_BOOT2WAIT ((ushort) 3) /* Waiting for selftest results */
#define LINK_BOOT3 ((ushort) 4) /* Trying to send 3rd stage boots */ #define LINK_BOOT3 ((ushort) 4) /* Trying to send 3rd stage boots */
#define LINK_SYNC ((ushort) 5) /* Syncing */ #define LINK_SYNC ((ushort) 5) /* Syncing */
#define LINK_INTRO ((ushort) 10) /* Introductory packet */ #define LINK_INTRO ((ushort) 10) /* Introductory packet */
#define LINK_SUPPLYID ((ushort) 11) /* Trying to supply an ID */ #define LINK_SUPPLYID ((ushort) 11) /* Trying to supply an ID */
#define LINK_TOPOLOGY ((ushort) 12) /* Send a topology update */ #define LINK_TOPOLOGY ((ushort) 12) /* Send a topology update */
#define LINK_REQUESTID ((ushort) 13) /* Waiting for an ID */ #define LINK_REQUESTID ((ushort) 13) /* Waiting for an ID */
#define LINK_CONNECTED ((ushort) 14) /* Connected */ #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) #define LINK_SPARE ((ushort) 40)
@@ -103,12 +103,12 @@
** LED stuff ** LED stuff
*/ */
#if defined(RTA) #if defined(RTA)
#define LED_OFF ((ushort) 0) /* LED off */ #define LED_OFF ((ushort) 0) /* LED off */
#define LED_RED ((ushort) 1) /* LED Red */ #define LED_RED ((ushort) 1) /* LED Red */
#define LED_GREEN ((ushort) 2) /* LED Green */ #define LED_GREEN ((ushort) 2) /* LED Green */
#define LED_ORANGE ((ushort) 4) /* LED Orange */ #define LED_ORANGE ((ushort) 4) /* LED Orange */
#define LED_1TO8_OPEN ((ushort) 1) /* Port 1->8 LED on */ #define LED_1TO8_OPEN ((ushort) 1) /* Port 1->8 LED on */
#define LED_9TO16_OPEN ((ushort) 2) /* Port 9->16 LED on */ #define LED_9TO16_OPEN ((ushort) 2) /* Port 9->16 LED on */
#define LED_SET_COLOUR(colour) (link->led = (colour)) #define LED_SET_COLOUR(colour) (link->led = (colour))
#define LED_OR_COLOUR(colour) (link->led |= (colour)) #define LED_OR_COLOUR(colour) (link->led |= (colour))
#define LED_TIMEOUT(time) (link->led_timeout = RioTimePlus(RioTime(),(time))) #define LED_TIMEOUT(time) (link->led_timeout = RioTimePlus(RioTime(),(time)))
@@ -116,72 +116,72 @@
#define LED_SET_COLOUR(colour) #define LED_SET_COLOUR(colour)
#define LED_OR_COLOUR(colour) #define LED_OR_COLOUR(colour)
#define LED_TIMEOUT(time) #define LED_TIMEOUT(time)
#endif /* RTA */ #endif /* RTA */
struct LPB { struct LPB {
WORD link_number ; /* Link Number */ WORD link_number; /* Link Number */
Channel_ptr in_ch ; /* Link In Channel */ Channel_ptr in_ch; /* Link In Channel */
Channel_ptr out_ch ; /* Link Out Channel */ Channel_ptr out_ch; /* Link Out Channel */
#ifdef RTA #ifdef RTA
uchar stat_led ; /* Port open leds */ uchar stat_led; /* Port open leds */
uchar led ; /* True, light led! */ uchar led; /* True, light led! */
#endif #endif
BYTE attached_serial[4]; /* Attached serial number */ BYTE attached_serial[4]; /* Attached serial number */
BYTE attached_host_serial[4]; BYTE attached_host_serial[4];
/* Serial number of Host who /* Serial number of Host who
booted the other end */ booted the other end */
WORD descheduled ; /* Currently Descheduled */ WORD descheduled; /* Currently Descheduled */
WORD state; /* Current state */ WORD state; /* Current state */
WORD send_poll ; /* Send a Poll Packet */ WORD send_poll; /* Send a Poll Packet */
Process_ptr ltt_p ; /* Process Descriptor */ Process_ptr ltt_p; /* Process Descriptor */
Process_ptr lrt_p ; /* Process Descriptor */ Process_ptr lrt_p; /* Process Descriptor */
WORD lrt_status ; /* Current lrt status */ WORD lrt_status; /* Current lrt status */
WORD ltt_status ; /* Current ltt status */ WORD ltt_status; /* Current ltt status */
WORD timeout ; /* Timeout value */ WORD timeout; /* Timeout value */
WORD topology; /* Topology bits */ WORD topology; /* Topology bits */
WORD mon_ltt ; WORD mon_ltt;
WORD mon_lrt ; WORD mon_lrt;
WORD WaitNoBoot ; /* Secs to hold off booting */ WORD WaitNoBoot; /* Secs to hold off booting */
PKT_ptr add_packet_list; /* Add packets to here */ PKT_ptr add_packet_list; /* Add packets to here */
PKT_ptr remove_packet_list; /* Send packets from here */ PKT_ptr remove_packet_list; /* Send packets from here */
#ifdef RTA #ifdef RTA
#ifdef DCIRRUS #ifdef DCIRRUS
#define QBUFS_PER_REDIRECT (4 / PKTS_PER_BUFFER + 1) #define QBUFS_PER_REDIRECT (4 / PKTS_PER_BUFFER + 1)
#else #else
#define QBUFS_PER_REDIRECT (8 / PKTS_PER_BUFFER + 1) #define QBUFS_PER_REDIRECT (8 / PKTS_PER_BUFFER + 1)
#endif #endif
PKT_ptr_ptr rd_add ; /* Add a new Packet here */ PKT_ptr_ptr rd_add; /* Add a new Packet here */
Q_BUF_ptr rd_add_qb; /* Pointer to the add Q buf */ 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_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_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rd_remove ; /* Remove a Packet here */ PKT_ptr_ptr rd_remove; /* Remove a Packet here */
Q_BUF_ptr rd_remove_qb ; /* Pointer to the remove Q buf */ 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_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 */ PKT_ptr_ptr rd_remove_end_qbb; /* Pointer to the end of the Q buf */
ushort pkts_in_q ; /* Packets in queue */ ushort pkts_in_q; /* Packets in queue */
#endif #endif
Channel_ptr lrt_fail_chan ; /* Lrt's failure channel */ Channel_ptr lrt_fail_chan; /* Lrt's failure channel */
Channel_ptr ltt_fail_chan ; /* Ltt's failure channel */ Channel_ptr ltt_fail_chan; /* Ltt's failure channel */
#if defined (HOST) || defined (INKERNEL) #if defined (HOST) || defined (INKERNEL)
/* RUP structure for HOST to driver communications */ /* RUP structure for HOST to driver communications */
struct RUP rup ; struct RUP rup;
#endif #endif
struct RUP link_rup; /* RUP for the link (POLL, struct RUP link_rup; /* RUP for the link (POLL,
topology etc.) */ topology etc.) */
WORD attached_link ; /* Number of attached link */ WORD attached_link; /* Number of attached link */
WORD csum_errors ; /* csum errors */ WORD csum_errors; /* csum errors */
WORD num_disconnects ; /* number of disconnects */ WORD num_disconnects; /* number of disconnects */
WORD num_sync_rcvd ; /* # sync's received */ WORD num_sync_rcvd; /* # sync's received */
WORD num_sync_rqst ; /* # sync requests */ WORD num_sync_rqst; /* # sync requests */
WORD num_tx ; /* Num pkts sent */ WORD num_tx; /* Num pkts sent */
WORD num_rx ; /* Num pkts received */ WORD num_rx; /* Num pkts received */
WORD module_attached; /* Module tpyes of attached */ WORD module_attached; /* Module tpyes of attached */
WORD led_timeout; /* LED timeout */ WORD led_timeout; /* LED timeout */
WORD first_port; /* First port to service */ WORD first_port; /* First port to service */
WORD last_port; /* Last port to service */ WORD last_port; /* Last port to service */
} ; };
#endif #endif

View File

@@ -41,7 +41,7 @@
#endif #endif
struct ttystatics { struct ttystatics {
struct termios tm; struct termios tm;
}; };
#define bzero(d, n) memset((d), 0, (n)) #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... */ the definitions from Linux, and is incompatible... */
/* RxBaud and TxBaud definitions... */ /* RxBaud and TxBaud definitions... */
#define RIO_B0 0x00 /* RTS / DTR signals dropped */ #define RIO_B0 0x00 /* RTS / DTR signals dropped */
#define RIO_B50 0x01 /* 50 baud */ #define RIO_B50 0x01 /* 50 baud */
#define RIO_B75 0x02 /* 75 baud */ #define RIO_B75 0x02 /* 75 baud */
#define RIO_B110 0x03 /* 110 baud */ #define RIO_B110 0x03 /* 110 baud */
#define RIO_B134 0x04 /* 134.5 baud */ #define RIO_B134 0x04 /* 134.5 baud */
#define RIO_B150 0x05 /* 150 baud */ #define RIO_B150 0x05 /* 150 baud */
#define RIO_B200 0x06 /* 200 baud */ #define RIO_B200 0x06 /* 200 baud */
#define RIO_B300 0x07 /* 300 baud */ #define RIO_B300 0x07 /* 300 baud */
#define RIO_B600 0x08 /* 600 baud */ #define RIO_B600 0x08 /* 600 baud */
#define RIO_B1200 0x09 /* 1200 baud */ #define RIO_B1200 0x09 /* 1200 baud */
#define RIO_B1800 0x0A /* 1800 baud */ #define RIO_B1800 0x0A /* 1800 baud */
#define RIO_B2400 0x0B /* 2400 baud */ #define RIO_B2400 0x0B /* 2400 baud */
#define RIO_B4800 0x0C /* 4800 baud */ #define RIO_B4800 0x0C /* 4800 baud */
#define RIO_B9600 0x0D /* 9600 baud */ #define RIO_B9600 0x0D /* 9600 baud */
#define RIO_B19200 0x0E /* 19200 baud */ #define RIO_B19200 0x0E /* 19200 baud */
#define RIO_B38400 0x0F /* 38400 baud */ #define RIO_B38400 0x0F /* 38400 baud */
#define RIO_B56000 0x10 /* 56000 baud */ #define RIO_B56000 0x10 /* 56000 baud */
#define RIO_B57600 0x11 /* 57600 baud */ #define RIO_B57600 0x11 /* 57600 baud */
#define RIO_B64000 0x12 /* 64000 baud */ #define RIO_B64000 0x12 /* 64000 baud */
#define RIO_B115200 0x13 /* 115200 baud */ #define RIO_B115200 0x13 /* 115200 baud */
#define RIO_B2000 0x14 /* 2000 baud */ #define RIO_B2000 0x14 /* 2000 baud */

View File

@@ -38,7 +38,7 @@
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
#ifndef lint #ifndef lint
static char *_rio_list_h_sccs = "@(#)list.h 1.9" ; static char *_rio_list_h_sccs = "@(#)list.h 1.9";
#endif #endif
#endif #endif
@@ -166,7 +166,7 @@ static char *_rio_list_h_sccs = "@(#)list.h 1.9" ;
#endif #endif
#else /* !IN_KERNEL */ #else /* !IN_KERNEL */
#define ZERO_PTR NULL #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() #define splx(oldspl) if ((oldspl) == 0) spl0()
#endif #endif
#endif /* ifndef _list.h */ #endif /* ifndef _list.h */
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -36,7 +36,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -50,6 +50,3 @@ static char *_rio_lrt_h_sccs = "@(#)lrt.h 1.1" ;
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -36,7 +36,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -45,11 +45,8 @@ static char *_rio_ltt_h_sccs = "@(#)ltt.h 1.1" ;
#else #else
#define LTT_STACK (ushort) 200 #define LTT_STACK (ushort) 200
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -39,7 +39,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -48,6 +48,3 @@ static char *_rio_lttwake_h_sccs = "@(#)lttwake.h 1.1" ;
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -46,21 +46,20 @@ static char *_map_h_sccs_ = "@(#)map.h 1.2";
#define TOTAL_MAP_ENTRIES (MAX_MAP_ENTRY*RIO_SLOTS) #define TOTAL_MAP_ENTRIES (MAX_MAP_ENTRY*RIO_SLOTS)
#define MAX_NAME_LEN 32 #define MAX_NAME_LEN 32
struct Map struct Map {
{ uint HostUniqueNum; /* Supporting hosts unique number */
uint HostUniqueNum; /* Supporting hosts unique number */ uint RtaUniqueNum; /* Unique number */
uint RtaUniqueNum; /* Unique number */
/* /*
** The next two IDs must be swapped on big-endian architectures ** 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 ** when using a v2.04 /etc/rio/config with a v3.00 driver (when
** upgrading for example). ** upgrading for example).
*/ */
ushort ID; /* ID used in the subnet */ ushort ID; /* ID used in the subnet */
ushort ID2; /* ID of 2nd block of 8 for 16 port */ ushort ID2; /* ID of 2nd block of 8 for 16 port */
ulong Flags; /* Booted, ID Given, Disconnected */ ulong Flags; /* Booted, ID Given, Disconnected */
ulong SysPort; /* First tty mapped to this port */ ulong SysPort; /* First tty mapped to this port */
struct Top Topology[LINKS_PER_UNIT]; /* ID connected to each link */ struct Top Topology[LINKS_PER_UNIT]; /* ID connected to each link */
char Name[MAX_NAME_LEN]; /* Cute name by which RTA is known */ char Name[MAX_NAME_LEN]; /* Cute name by which RTA is known */
}; };
/* /*

View File

@@ -70,4 +70,4 @@ static char *_mca_h_sccs_ = "@(#)mca.h 1.2";
#define RIO_MCA_DEFAULT_MODE SLOW_LINKS #define RIO_MCA_DEFAULT_MODE SLOW_LINKS
#endif /* __rio_mca_h__ */ #endif /* __rio_mca_h__ */

View File

@@ -38,4 +38,4 @@ static char *_mesg_h_sccs_ = "@(#)mesg.h 1.2";
#endif #endif
#endif /* __rio_mesg_h__ */ #endif /* __rio_mesg_h__ */

View File

@@ -42,20 +42,19 @@ static char *_param_h_sccs_ = "@(#)param.h 1.2";
** the param command block, as used in OPEN and PARAM calls. ** the param command block, as used in OPEN and PARAM calls.
*/ */
struct phb_param struct phb_param {
{ BYTE Cmd; /* It is very important that these line up */
BYTE Cmd; /* It is very important that these line up */ BYTE Cor1; /* with what is expected at the other end. */
BYTE Cor1; /* with what is expected at the other end. */ BYTE Cor2; /* to confirm that you've got it right, */
BYTE Cor2; /* to confirm that you've got it right, */ BYTE Cor4; /* check with cirrus/cirrus.h */
BYTE Cor4; /* check with cirrus/cirrus.h */ BYTE Cor5;
BYTE Cor5; BYTE TxXon; /* Transmit X-On character */
BYTE TxXon; /* Transmit X-On character */ BYTE TxXoff; /* Transmit X-Off character */
BYTE TxXoff; /* Transmit X-Off character */ BYTE RxXon; /* Receive X-On character */
BYTE RxXon; /* Receive X-On character */ BYTE RxXoff; /* Receive X-Off character */
BYTE RxXoff; /* Receive X-Off character */ BYTE LNext; /* Literal-next character */
BYTE LNext; /* Literal-next character */ BYTE TxBaud; /* Transmit baudrate */
BYTE TxBaud; /* Transmit baudrate */ BYTE RxBaud; /* Receive baudrate */
BYTE RxBaud; /* Receive baudrate */
}; };
#endif #endif

View File

@@ -44,53 +44,50 @@
#endif #endif
#endif #endif
typedef struct PARM_MAP PARM_MAP ; typedef struct PARM_MAP PARM_MAP;
struct PARM_MAP struct PARM_MAP {
{ PHB_ptr phb_ptr; /* Pointer to the PHB array */
PHB_ptr phb_ptr ; /* Pointer to the PHB array */ WORD_ptr phb_num_ptr; /* Ptr to Number of PHB's */
WORD_ptr phb_num_ptr ; /* Ptr to Number of PHB's */ FREE_LIST_ptr free_list; /* Free List pointer */
FREE_LIST_ptr free_list; /* Free List pointer */ FREE_LIST_ptr free_list_end; /* Free List End pointer */
FREE_LIST_ptr free_list_end; /* Free List End pointer */ Q_BUF_ptr_ptr q_free_list_ptr; /* Ptr to Q_BUF variable */
Q_BUF_ptr_ptr q_free_list_ptr ; /* Ptr to Q_BUF variable */ BYTE_ptr unit_id_ptr; /* Unit Id */
BYTE_ptr unit_id_ptr ; /* Unit Id */ LPB_ptr link_str_ptr; /* Link Structure Array */
LPB_ptr link_str_ptr ; /* Link Structure Array */ BYTE_ptr bootloader_1; /* 1st Stage Boot Loader */
BYTE_ptr bootloader_1 ; /* 1st Stage Boot Loader */ BYTE_ptr bootloader_2; /* 2nd Stage Boot Loader */
BYTE_ptr bootloader_2 ; /* 2nd Stage Boot Loader */ WORD_ptr port_route_map_ptr; /* Port Route Map */
WORD_ptr port_route_map_ptr ; /* Port Route Map */ ROUTE_STR_ptr route_ptr; /* Unit Route Map */
ROUTE_STR_ptr route_ptr ; /* Unit Route Map */ NUMBER_ptr map_present; /* Route Map present */
NUMBER_ptr map_present ; /* Route Map present */ NUMBER pkt_num; /* Total number of packets */
NUMBER pkt_num ; /* Total number of packets */ NUMBER q_num; /* Total number of Q packets */
NUMBER q_num ; /* Total number of Q packets */ WORD buffers_per_port; /* Number of buffers per port */
WORD buffers_per_port ; /* Number of buffers per port */ WORD heap_size; /* Initial size of heap */
WORD heap_size ; /* Initial size of heap */ WORD heap_left; /* Current Heap left */
WORD heap_left ; /* Current Heap left */ WORD error; /* Error code */
WORD error ; /* Error code */ WORD tx_max; /* Max number of tx pkts per phb */
WORD tx_max; /* Max number of tx pkts per phb */ WORD rx_max; /* Max number of rx pkts per phb */
WORD rx_max; /* Max number of rx pkts per phb */ WORD rx_limit; /* For high / low watermarks */
WORD rx_limit; /* For high / low watermarks */ NUMBER links; /* Links to use */
NUMBER links ; /* Links to use */ NUMBER timer; /* Interrupts per second */
NUMBER timer ; /* Interrupts per second */ RUP_ptr rups; /* Pointer to the RUPs */
RUP_ptr rups ; /* Pointer to the RUPs */ WORD max_phb; /* Mostly for debugging */
WORD max_phb ; /* Mostly for debugging */ WORD living; /* Just increments!! */
WORD living ; /* Just increments!! */ WORD init_done; /* Initialisation over */
WORD init_done ; /* Initialisation over */ WORD booting_link;
WORD booting_link ; WORD idle_count; /* Idle time counter */
WORD idle_count ; /* Idle time counter */ WORD busy_count; /* Busy counter */
WORD busy_count ; /* Busy counter */ WORD idle_control; /* Control Idle Process */
WORD idle_control ; /* Control Idle Process */
#if defined(HOST) || defined(INKERNEL) #if defined(HOST) || defined(INKERNEL)
WORD tx_intr; /* TX interrupt pending */ WORD tx_intr; /* TX interrupt pending */
WORD rx_intr; /* RX interrupt pending */ WORD rx_intr; /* RX interrupt pending */
WORD rup_intr; /* RUP interrupt pending */ WORD rup_intr; /* RUP interrupt pending */
#endif #endif
#if defined(RTA) #if defined(RTA)
WORD dying_count; /* Count of processes dead */ WORD dying_count; /* Count of processes dead */
#endif #endif
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -73,4 +73,4 @@ static char *_pci_h_sccs_ = "@(#)pci.h 1.2";
#define RIO_PCI_DEFAULT_MODE 0x05 #define RIO_PCI_DEFAULT_MODE 0x05
#endif /* __rio_pci_h__ */ #endif /* __rio_pci_h__ */

View File

@@ -58,37 +58,37 @@
/************************************************* /*************************************************
* Handshake asserted. Deasserted by the LTT(s) * 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) #define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET | PHB_HANDSHAKE_SET)
/* Reset by ltt */ /* Reset by ltt */
/************************************************* /*************************************************
* Maximum number of PHB's * Maximum number of PHB's
************************************************/ ************************************************/
#if defined (HOST) || defined (INKERNEL) #if defined (HOST) || defined (INKERNEL)
#define MAX_PHB ((ushort) 128) /* range 0-127 */ #define MAX_PHB ((ushort) 128) /* range 0-127 */
#else #else
#define MAX_PHB ((ushort) 8) /* range 0-7 */ #define MAX_PHB ((ushort) 8) /* range 0-7 */
#endif #endif
/************************************************* /*************************************************
* Defines for the mode fields * Defines for the mode fields
************************************************/ ************************************************/
#define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */ #define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */
#define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */ #define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */
#define TX_TAB3 0x0004 /* TAB3 mode */ #define TX_TAB3 0x0004 /* TAB3 mode */
#define TX_OCRNL 0x0008 /* OCRNL mode */ #define TX_OCRNL 0x0008 /* OCRNL mode */
#define TX_ONLCR 0x0010 /* ONLCR mode */ #define TX_ONLCR 0x0010 /* ONLCR mode */
#define TX_SENDSPACES 0x0020 /* Send n spaces command needs #define TX_SENDSPACES 0x0020 /* Send n spaces command needs
completing */ completing */
#define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */ #define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */
#define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */ #define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */
#define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel #define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */ port */
#define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL) #define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL)
#define TX_DTRFLOW 0x0200 /* DTR tx flow control */ #define TX_DTRFLOW 0x0200 /* DTR tx flow control */
#define TX_DTRFLOWED 0x0400 /* DTR is low - don't allow more data #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_DATAINFIFO 0x0800 /* There is data in the FIFO */
#define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */ #define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */
#define RX_SPARE 0x0001 /* SPARE */ #define RX_SPARE 0x0001 /* SPARE */
#define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */ #define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */
#define RX_ICRNL 0x0008 /* ICRNL mode */ #define RX_ICRNL 0x0008 /* ICRNL mode */
#define RX_INLCR 0x0010 /* INLCR mode */ #define RX_INLCR 0x0010 /* INLCR mode */
#define RX_IGNCR 0x0020 /* IGNCR mode */ #define RX_IGNCR 0x0020 /* IGNCR mode */
#define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */ #define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */
#define RX_IXOFF 0x0080 /* IXOFF enabled */ #define RX_IXOFF 0x0080 /* IXOFF enabled */
#define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */ #define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */
#define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */ #define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */
#define RX_BUFFERED 0x0400 /* Try and pass on complete packets */ #define RX_BUFFERED 0x0400 /* Try and pass on complete packets */
#define PORT_ISOPEN 0x0001 /* Port open? */ #define PORT_ISOPEN 0x0001 /* Port open? */
#define PORT_HUPCL 0x0002 /* Hangup on close? */ #define PORT_HUPCL 0x0002 /* Hangup on close? */
#define PORT_MOPENPEND 0x0004 /* Modem open pending */ #define PORT_MOPENPEND 0x0004 /* Modem open pending */
#define PORT_ISPARALLEL 0x0008 /* Parallel port */ #define PORT_ISPARALLEL 0x0008 /* Parallel port */
#define PORT_BREAK 0x0010 /* Port on break */ #define PORT_BREAK 0x0010 /* Port on break */
#define PORT_STATUSPEND 0x0020 /* Status packet pending */ #define PORT_STATUSPEND 0x0020 /* Status packet pending */
#define PORT_BREAKPEND 0x0040 /* Break packet pending */ #define PORT_BREAKPEND 0x0040 /* Break packet pending */
#define PORT_MODEMPEND 0x0080 /* Modem status packet pending */ #define PORT_MODEMPEND 0x0080 /* Modem status packet pending */
#define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel #define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel
port */ port */
#define PORT_FULLMODEM 0x0200 /* Full modem signals */ #define PORT_FULLMODEM 0x0200 /* Full modem signals */
#define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */ #define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */
#define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */ #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_HANDSHAKEFIX 0x1000 /* Port has H/W flow control fix */
#define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */ #define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */
#define DUMPMODE 0x4000 /* Dump RTA mem */ #define DUMPMODE 0x4000 /* Dump RTA mem */
@@ -155,139 +155,128 @@
#define rx_end u4.s1.rx_end_ptr_ptr #define rx_end u4.s1.rx_end_ptr_ptr
#define rx_remove u4.s1.rx_remove_ptr_ptr #define rx_remove u4.s1.rx_remove_ptr_ptr
#endif #endif
typedef struct PHB PHB ; typedef struct PHB PHB;
struct PHB { struct PHB {
#ifdef RTA #ifdef RTA
ushort port; ushort port;
#endif #endif
#ifdef INKERNEL #ifdef INKERNEL
WORD source; WORD source;
#else #else
union union {
{ ushort source; /* Complete source */
ushort source; /* Complete source */ struct {
struct unsigned char unit; /* Source unit */
{ unsigned char port; /* Source port */
unsigned char unit; /* Source unit */ } s2;
unsigned char port; /* Source port */ } u2;
} s2;
} u2;
#endif #endif
WORD handshake ; WORD handshake;
WORD status ; WORD status;
NUMBER timeout ; /* Maximum of 1.9 seconds */ NUMBER timeout; /* Maximum of 1.9 seconds */
WORD link ; /* Send down this link */ WORD link; /* Send down this link */
#ifdef INKERNEL #ifdef INKERNEL
WORD destination; WORD destination;
#else #else
union union {
{ ushort destination; /* Complete destination */
ushort destination; /* Complete destination */ struct {
struct unsigned char unit; /* Destination unit */
{ unsigned char port; /* Destination port */
unsigned char unit; /* Destination unit */ } s1;
unsigned char port; /* Destination port */ } u1;
} s1;
} u1;
#endif #endif
#ifdef RTA #ifdef RTA
ushort tx_pkts_added; ushort tx_pkts_added;
ushort tx_pkts_removed; ushort tx_pkts_removed;
Q_BUF_ptr tx_q_start ; /* Start of the Q list chain */ Q_BUF_ptr tx_q_start; /* Start of the Q list chain */
short num_tx_q_bufs ; /* Number of Q buffers in the chain */ short num_tx_q_bufs; /* Number of Q buffers in the chain */
PKT_ptr_ptr tx_add ; /* Add a new Packet here */ PKT_ptr_ptr tx_add; /* Add a new Packet here */
Q_BUF_ptr tx_add_qb; /* Pointer to the add Q buf */ 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_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_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr tx_remove ; /* Remove a Packet here */ PKT_ptr_ptr tx_remove; /* Remove a Packet here */
Q_BUF_ptr tx_remove_qb ; /* Pointer to the remove Q buf */ 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_st_qbb; /* Pointer to the start of the Q buf */
PKT_ptr_ptr tx_remove_end_qbb ; /* Pointer to the end of the Q buf */ PKT_ptr_ptr tx_remove_end_qbb; /* Pointer to the end of the Q buf */
#endif #endif
#ifdef INKERNEL #ifdef INKERNEL
PKT_ptr_ptr tx_start ; PKT_ptr_ptr tx_start;
PKT_ptr_ptr tx_end ; PKT_ptr_ptr tx_end;
PKT_ptr_ptr tx_add ; PKT_ptr_ptr tx_add;
PKT_ptr_ptr tx_remove ; PKT_ptr_ptr tx_remove;
#endif #endif
#ifdef HOST #ifdef HOST
union union {
{ struct {
struct PKT_ptr_ptr tx_start_ptr_ptr;
{ PKT_ptr_ptr tx_end_ptr_ptr;
PKT_ptr_ptr tx_start_ptr_ptr; PKT_ptr_ptr tx_add_ptr_ptr;
PKT_ptr_ptr tx_end_ptr_ptr; PKT_ptr_ptr tx_remove_ptr_ptr;
PKT_ptr_ptr tx_add_ptr_ptr; } s1;
PKT_ptr_ptr tx_remove_ptr_ptr; struct {
} s1; ushort *tx_start_ptr;
struct ushort *tx_end_ptr;
{ ushort *tx_add_ptr;
ushort * tx_start_ptr; ushort *tx_remove_ptr;
ushort * tx_end_ptr; } s2;
ushort * tx_add_ptr; } u3;
ushort * tx_remove_ptr;
} s2;
} u3;
#endif #endif
#ifdef RTA #ifdef RTA
ushort rx_pkts_added; ushort rx_pkts_added;
ushort rx_pkts_removed; ushort rx_pkts_removed;
Q_BUF_ptr rx_q_start ; /* Start of the Q list chain */ Q_BUF_ptr rx_q_start; /* Start of the Q list chain */
short num_rx_q_bufs ; /* Number of Q buffers in the chain */ short num_rx_q_bufs; /* Number of Q buffers in the chain */
PKT_ptr_ptr rx_add ; /* Add a new Packet here */ PKT_ptr_ptr rx_add; /* Add a new Packet here */
Q_BUF_ptr rx_add_qb ; /* Pointer to the add Q buf */ 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_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_add_end_qbb; /* Pointer to the end of the Q's buf */
PKT_ptr_ptr rx_remove ; /* Remove a Packet here */ PKT_ptr_ptr rx_remove; /* Remove a Packet here */
Q_BUF_ptr rx_remove_qb ; /* Pointer to the remove Q buf */ 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_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 */ PKT_ptr_ptr rx_remove_end_qbb; /* Pointer to the end of the Q buf */
#endif #endif
#ifdef INKERNEL #ifdef INKERNEL
PKT_ptr_ptr rx_start ; PKT_ptr_ptr rx_start;
PKT_ptr_ptr rx_end ; PKT_ptr_ptr rx_end;
PKT_ptr_ptr rx_add ; PKT_ptr_ptr rx_add;
PKT_ptr_ptr rx_remove ; PKT_ptr_ptr rx_remove;
#endif #endif
#ifdef HOST #ifdef HOST
union union {
{ struct {
struct PKT_ptr_ptr rx_start_ptr_ptr;
{ PKT_ptr_ptr rx_end_ptr_ptr;
PKT_ptr_ptr rx_start_ptr_ptr; PKT_ptr_ptr rx_add_ptr_ptr;
PKT_ptr_ptr rx_end_ptr_ptr; PKT_ptr_ptr rx_remove_ptr_ptr;
PKT_ptr_ptr rx_add_ptr_ptr; } s1;
PKT_ptr_ptr rx_remove_ptr_ptr; struct {
} s1; ushort *rx_start_ptr;
struct ushort *rx_end_ptr;
{ ushort *rx_add_ptr;
ushort * rx_start_ptr; ushort *rx_remove_ptr;
ushort * rx_end_ptr; } s2;
ushort * rx_add_ptr; } u4;
ushort * rx_remove_ptr;
} s2;
} u4;
#endif #endif
#ifdef RTA /* some fields for the remotes */ #ifdef RTA /* some fields for the remotes */
ushort flush_count; /* Count of write flushes */ ushort flush_count; /* Count of write flushes */
ushort txmode; /* Modes for tx */ ushort txmode; /* Modes for tx */
ushort rxmode; /* Modes for rx */ ushort rxmode; /* Modes for rx */
ushort portmode; /* Generic modes */ ushort portmode; /* Generic modes */
ushort column; /* TAB3 column count */ ushort column; /* TAB3 column count */
ushort tx_subscript; /* (TX) Subscript into data field */ ushort tx_subscript; /* (TX) Subscript into data field */
ushort rx_subscript; /* (RX) Subscript into data field */ ushort rx_subscript; /* (RX) Subscript into data field */
PKT_ptr rx_incomplete; /* Hold an incomplete packet here */ PKT_ptr rx_incomplete; /* Hold an incomplete packet here */
ushort modem_bits; /* Modem bits to mask */ ushort modem_bits; /* Modem bits to mask */
ushort lastModem; /* Modem control lines. */ ushort lastModem; /* Modem control lines. */
ushort addr; /* Address for sub commands */ ushort addr; /* Address for sub commands */
ushort MonitorTstate; /* TRUE if monitoring tstop */ ushort MonitorTstate; /* TRUE if monitoring tstop */
#endif #endif
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -69,52 +69,44 @@
#define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8) #define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8)
#define CONTROL_DATA_WNDW (DATA_WNDW << 8) #define CONTROL_DATA_WNDW (DATA_WNDW << 8)
struct PKT { struct PKT {
#ifdef INKERNEL #ifdef INKERNEL
BYTE dest_unit ; /* Destination Unit Id */ BYTE dest_unit; /* Destination Unit Id */
BYTE dest_port ; /* Destination POrt */ BYTE dest_port; /* Destination POrt */
BYTE src_unit ; /* Source Unit Id */ BYTE src_unit; /* Source Unit Id */
BYTE src_port ; /* Source POrt */ BYTE src_port; /* Source POrt */
#else #else
union union {
{ ushort destination; /* Complete destination */
ushort destination; /* Complete destination */ struct {
struct unsigned char unit; /* Destination unit */
{ unsigned char port; /* Destination port */
unsigned char unit; /* Destination unit */ } s1;
unsigned char port; /* Destination port */ } u1;
} s1; union {
} u1; ushort source; /* Complete source */
union struct {
{ unsigned char unit; /* Source unit */
ushort source; /* Complete source */ unsigned char port; /* Source port */
struct } s2;
{ } u2;
unsigned char unit; /* Source unit */
unsigned char port; /* Source port */
} s2;
} u2;
#endif #endif
#ifdef INKERNEL #ifdef INKERNEL
BYTE len ; BYTE len;
BYTE control; BYTE control;
#else #else
union union {
{ ushort control;
ushort control; struct {
struct unsigned char len;
{ unsigned char control;
unsigned char len; } s3;
unsigned char control; } u3;
} s3;
} u3;
#endif #endif
BYTE data[PKT_MAX_DATA_LEN] ; BYTE data[PKT_MAX_DATA_LEN];
/* Actual data :-) */ /* Actual data :-) */
WORD csum ; /* C-SUM */ WORD csum; /* C-SUM */
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -39,7 +39,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -54,23 +54,20 @@ static char *_rio_poll_h_sccs = "@(#)poll.h 1.2" ;
#define POLL_PERIOD (int) SECOND #define POLL_PERIOD (int) SECOND
/* The various poll commands */ /* The various poll commands */
#define POLL_POLL 0 /* We are connected and happy.. */ #define POLL_POLL 0 /* We are connected and happy.. */
#define POLL_INTRO 1 /* Introduction packet */ #define POLL_INTRO 1 /* Introduction packet */
#define POLL_TOPOLOGY 2 /* Topology update */ #define POLL_TOPOLOGY 2 /* Topology update */
#define POLL_ASSIGN 3 /* ID assign */ #define POLL_ASSIGN 3 /* ID assign */
#define POLL_FOAD 4 /* F*** Off And Die */ #define POLL_FOAD 4 /* F*** Off And Die */
#define POLL_LMD 5 /* Let Me Die */ #define POLL_LMD 5 /* Let Me Die */
#define POLL_DYB 6 /* Die You Ba***** */ #define POLL_DYB 6 /* Die You Ba***** */
/* The way data fields are split up for POLL packets */ /* The way data fields are split up for POLL packets */
#define POLL_HOST_SERIAL 2 /* Host who booted me */ #define POLL_HOST_SERIAL 2 /* Host who booted me */
#define POLL_MY_SERIAL 6 /* My serial number */ #define POLL_MY_SERIAL 6 /* My serial number */
#define POLL_YOUR_ID 1 /* Your ID number */ #define POLL_YOUR_ID 1 /* Your ID number */
#define POLL_TOPOLOGY_FIELDS 2 /* Topology maps */ #define POLL_TOPOLOGY_FIELDS 2 /* Topology maps */
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -46,96 +46,94 @@ static char *_port_h_sccs_ = "@(#)port.h 1.3";
*/ */
#ifdef STATS #ifdef STATS
struct RIOStats struct RIOStats {
{
/* /*
** interrupt statistics ** interrupt statistics
*/ */
uint BreakIntCnt; uint BreakIntCnt;
uint ModemOffCnt; uint ModemOffCnt;
uint ModemOnCnt; uint ModemOnCnt;
uint RxIntCnt; uint RxIntCnt;
uint TxIntCnt; uint TxIntCnt;
/* /*
** throughput statistics ** throughput statistics
*/ */
uint RxCharCnt; uint RxCharCnt;
uint RxPktCnt; uint RxPktCnt;
uint RxSaveCnt; uint RxSaveCnt;
uint TxCharCnt; uint TxCharCnt;
uint TxPktCnt; uint TxPktCnt;
/* /*
** driver entry statistics ** driver entry statistics
*/ */
uint CloseCnt; uint CloseCnt;
uint IoctlCnt; uint IoctlCnt;
uint OpenCnt; uint OpenCnt;
uint ReadCnt; uint ReadCnt;
uint WriteCnt; uint WriteCnt;
/* /*
** proc statistics ** proc statistics
*/ */
uint BlockCnt; uint BlockCnt;
uint OutputCnt; uint OutputCnt;
uint ResumeCnt; uint ResumeCnt;
uint RflushCnt; uint RflushCnt;
uint SuspendCnt; uint SuspendCnt;
uint TbreakCnt; uint TbreakCnt;
uint TimeoutCnt; uint TimeoutCnt;
uint UnblockCnt; uint UnblockCnt;
uint WflushCnt; uint WflushCnt;
uint WFBodgeCnt; uint WFBodgeCnt;
}; };
#endif #endif
/* /*
** Port data structure ** Port data structure
*/ */
struct Port struct Port {
{ struct gs_port gs;
struct gs_port gs; int PortNum; /* RIO port no., 0-511 */
int PortNum; /* RIO port no., 0-511 */ struct Host *HostP;
struct Host *HostP; volatile caddr_t Caddr;
volatile caddr_t Caddr; ushort HostPort; /* Port number on host card */
ushort HostPort; /* Port number on host card */ uchar RupNum; /* Number of RUP for port */
uchar RupNum; /* Number of RUP for port */ uchar ID2; /* Second ID of RTA for port */
uchar ID2; /* Second ID of RTA for port */ ulong State; /* FLAGS for open & xopen */
ulong State; /* FLAGS for open & xopen */ #define RIO_LOPEN 0x00001 /* Local open */
#define RIO_LOPEN 0x00001 /* Local open */ #define RIO_MOPEN 0x00002 /* Modem open */
#define RIO_MOPEN 0x00002 /* Modem open */ #define RIO_WOPEN 0x00004 /* Waiting for open */
#define RIO_WOPEN 0x00004 /* Waiting for open */ #define RIO_CLOSING 0x00008 /* The port is being close */
#define RIO_CLOSING 0x00008 /* The port is being close */ #define RIO_XPBUSY 0x00010 /* Transparent printer busy */
#define RIO_XPBUSY 0x00010 /* Transparent printer busy */ #define RIO_BREAKING 0x00020 /* Break in progress */
#define RIO_BREAKING 0x00020 /* Break in progress */ #define RIO_DIRECT 0x00040 /* Doing Direct output */
#define RIO_DIRECT 0x00040 /* Doing Direct output */ #define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */
#define RIO_EXCLUSIVE 0x00080 /* Stream open for exclusive use */ #define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */
#define RIO_NDELAY 0x00100 /* Stream is open FNDELAY */ #define RIO_CARR_ON 0x00200 /* Stream has carrier present */
#define RIO_CARR_ON 0x00200 /* Stream has carrier present */ #define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */
#define RIO_XPWANTR 0x00400 /* Stream wanted by Xprint */ #define RIO_RBLK 0x00800 /* Stream is read-blocked */
#define RIO_RBLK 0x00800 /* Stream is read-blocked */ #define RIO_BUSY 0x01000 /* Stream is BUSY for write */
#define RIO_BUSY 0x01000 /* Stream is BUSY for write */ #define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */
#define RIO_TIMEOUT 0x02000 /* Stream timeout in progress */ #define RIO_TXSTOP 0x04000 /* Stream output is stopped */
#define RIO_TXSTOP 0x04000 /* Stream output is stopped */ #define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */
#define RIO_WAITFLUSH 0x08000 /* Stream waiting for flush */ #define RIO_DYNOROD 0x10000 /* Drain failed */
#define RIO_DYNOROD 0x10000 /* Drain failed */ #define RIO_DELETED 0x20000 /* RTA has been deleted */
#define RIO_DELETED 0x20000 /* RTA has been deleted */ #define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
#define RIO_ISSCANCODE 0x40000 /* This line is in scancode mode */
#define RIO_USING_EUC 0x100000 /* Using extended Unix chars */ #define RIO_USING_EUC 0x100000 /* Using extended Unix chars */
#define RIO_CAN_COOK 0x200000 /* This line can do cooking */ #define RIO_CAN_COOK 0x200000 /* This line can do cooking */
#define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */ #define RIO_TRIAD_MODE 0x400000 /* Enable TRIAD special ops. */
#define RIO_TRIAD_BLOCK 0x800000 /* Next read will block */ #define RIO_TRIAD_BLOCK 0x800000 /* Next read will block */
#define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */ #define RIO_TRIAD_FUNC 0x1000000 /* Seen a function key coming in */
#define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */ #define RIO_THROTTLE_RX 0x2000000 /* RX needs to be throttled. */
ulong Config; /* FLAGS for NOREAD.... */ ulong Config; /* FLAGS for NOREAD.... */
#define RIO_NOREAD 0x0001 /* Are not allowed to read port */ #define RIO_NOREAD 0x0001 /* Are not allowed to read port */
#define RIO_NOWRITE 0x0002 /* Are not allowed to write port */ #define RIO_NOWRITE 0x0002 /* Are not allowed to write port */
#define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */ #define RIO_NOXPRINT 0x0004 /* Are not allowed to xprint port */
#define RIO_NOMASK 0x0007 /* All not allowed things */ #define RIO_NOMASK 0x0007 /* All not allowed things */
#define RIO_IXANY 0x0008 /* Port is allowed ixany */ #define RIO_IXANY 0x0008 /* Port is allowed ixany */
#define RIO_MODEM 0x0010 /* Stream is a modem device */ #define RIO_MODEM 0x0010 /* Stream is a modem device */
#define RIO_IXON 0x0020 /* Port is allowed ixon */ #define RIO_IXON 0x0020 /* Port is allowed ixon */
#define RIO_WAITDRAIN 0x0040 /* Wait for port to completely drain */ #define RIO_WAITDRAIN 0x0040 /* Wait for port to completely drain */
#define RIO_MAP_50_TO_50 0x0080 /* Map 50 baud to 50 baud */ #define RIO_MAP_50_TO_50 0x0080 /* Map 50 baud to 50 baud */
#define RIO_MAP_110_TO_110 0x0100 /* Map 110 baud to 110 baud */ #define RIO_MAP_110_TO_110 0x0100 /* Map 110 baud to 110 baud */
@@ -144,92 +142,90 @@ struct Port
** As LynxOS does not appear to support Hardware Flow Control ..... ** As LynxOS does not appear to support Hardware Flow Control .....
** Define our own flow control flags in 'Config'. ** Define our own flow control flags in 'Config'.
*/ */
#define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */ #define RIO_CTSFLOW 0x0200 /* RIO's own CTSFLOW flag */
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */ #define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
struct PHB *PhbP; /* pointer to PHB for port */ struct PHB *PhbP; /* pointer to PHB for port */
WORD *TxAdd; /* Add packets here */ WORD *TxAdd; /* Add packets here */
WORD *TxStart; /* Start of add array */ WORD *TxStart; /* Start of add array */
WORD *TxEnd; /* End of add array */ WORD *TxEnd; /* End of add array */
WORD *RxRemove; /* Remove packets here */ WORD *RxRemove; /* Remove packets here */
WORD *RxStart; /* Start of remove array */ WORD *RxStart; /* Start of remove array */
WORD *RxEnd; /* End of remove array */ WORD *RxEnd; /* End of remove array */
uint RtaUniqueNum; /* Unique number of RTA */ uint RtaUniqueNum; /* Unique number of RTA */
ushort PortState; /* status of port */ ushort PortState; /* status of port */
ushort ModemState; /* status of modem lines */ ushort ModemState; /* status of modem lines */
ulong ModemLines; /* Modem bits sent to RTA */ ulong ModemLines; /* Modem bits sent to RTA */
uchar CookMode; /* who expands CR/LF? */ uchar CookMode; /* who expands CR/LF? */
uchar ParamSem; /* Prevent write during param */ uchar ParamSem; /* Prevent write during param */
uchar Mapped; /* if port mapped onto host */ uchar Mapped; /* if port mapped onto host */
uchar SecondBlock; /* if port belongs to 2nd block uchar SecondBlock; /* if port belongs to 2nd block
of 16 port RTA */ of 16 port RTA */
uchar InUse; /* how many pre-emptive cmds */ uchar InUse; /* how many pre-emptive cmds */
uchar Lock; /* if params locked */ uchar Lock; /* if params locked */
uchar Store; /* if params stored across closes */ uchar Store; /* if params stored across closes */
uchar FirstOpen; /* TRUE if first time port opened */ uchar FirstOpen; /* TRUE if first time port opened */
uchar FlushCmdBodge; /* if doing a (non)flush */ uchar FlushCmdBodge; /* if doing a (non)flush */
uchar MagicFlags; /* require intr processing */ uchar MagicFlags; /* require intr processing */
#define MAGIC_FLUSH 0x01 /* mirror of WflushFlag */ #define MAGIC_FLUSH 0x01 /* mirror of WflushFlag */
#define MAGIC_REBOOT 0x02 /* RTA re-booted, re-open ports */ #define MAGIC_REBOOT 0x02 /* RTA re-booted, re-open ports */
#define MORE_OUTPUT_EYGOR 0x04 /* riotproc failed to empty clists */ #define MORE_OUTPUT_EYGOR 0x04 /* riotproc failed to empty clists */
uchar WflushFlag; /* 1 How many WFLUSHs active */ uchar WflushFlag; /* 1 How many WFLUSHs active */
/* /*
** Transparent print stuff ** Transparent print stuff
*/ */
struct Xprint struct Xprint {
{
#ifndef MAX_XP_CTRL_LEN #ifndef MAX_XP_CTRL_LEN
#define MAX_XP_CTRL_LEN 16 /* ALSO IN DAEMON.H */ #define MAX_XP_CTRL_LEN 16 /* ALSO IN DAEMON.H */
#endif #endif
uint XpCps; uint XpCps;
char XpOn[MAX_XP_CTRL_LEN]; char XpOn[MAX_XP_CTRL_LEN];
char XpOff[MAX_XP_CTRL_LEN]; char XpOff[MAX_XP_CTRL_LEN];
ushort XpLen; /* strlen(XpOn)+strlen(XpOff) */ ushort XpLen; /* strlen(XpOn)+strlen(XpOff) */
uchar XpActive; uchar XpActive;
uchar XpLastTickOk; /* TRUE if we can process */ uchar XpLastTickOk; /* TRUE if we can process */
#define XP_OPEN 00001 #define XP_OPEN 00001
#define XP_RUNABLE 00002 #define XP_RUNABLE 00002
struct ttystatics *XttyP; struct ttystatics *XttyP;
} Xprint; } Xprint;
#ifdef VPIX #ifdef VPIX
v86_t *StashP; v86_t *StashP;
uint IntMask; uint IntMask;
struct termss VpixSs; struct termss VpixSs;
uchar ModemStatusReg; /* Modem status register */ uchar ModemStatusReg; /* Modem status register */
#endif #endif
uchar RxDataStart; uchar RxDataStart;
uchar Cor2Copy; /* copy of COR2 */ uchar Cor2Copy; /* copy of COR2 */
char *Name; /* points to the Rta's name */ char *Name; /* points to the Rta's name */
#ifdef STATS #ifdef STATS
struct RIOStats Stat; /* ports statistics */ struct RIOStats Stat; /* ports statistics */
#endif #endif
char *TxRingBuffer; char *TxRingBuffer;
ushort TxBufferIn; /* New data arrives here */ ushort TxBufferIn; /* New data arrives here */
ushort TxBufferOut; /* Intr removes data here */ ushort TxBufferOut; /* Intr removes data here */
ushort OldTxBufferOut; /* Indicates if draining */ ushort OldTxBufferOut; /* Indicates if draining */
int TimeoutId; /* Timeout ID */ int TimeoutId; /* Timeout ID */
uint Debug; uint Debug;
uchar WaitUntilBooted; /* True if open should block */ uchar WaitUntilBooted; /* True if open should block */
uint statsGather; /* True if gathering stats */ uint statsGather; /* True if gathering stats */
ulong txchars; /* Chars transmitted */ ulong txchars; /* Chars transmitted */
ulong rxchars; /* Chars received */ ulong rxchars; /* Chars received */
ulong opens; /* port open count */ ulong opens; /* port open count */
ulong closes; /* port close count */ ulong closes; /* port close count */
ulong ioctls; /* ioctl count */ ulong ioctls; /* ioctl count */
uchar LastRxTgl; /* Last state of rx toggle bit */ uchar LastRxTgl; /* Last state of rx toggle bit */
spinlock_t portSem; /* Lock using this sem */ spinlock_t portSem; /* Lock using this sem */
int MonitorTstate; /* Monitoring ? */ int MonitorTstate; /* Monitoring ? */
int timeout_id; /* For calling 100 ms delays */ int timeout_id; /* For calling 100 ms delays */
int timeout_sem;/* For calling 100 ms delays */ int timeout_sem; /* For calling 100 ms delays */
int firstOpen; /* First time open ? */ int firstOpen; /* First time open ? */
char * p; /* save the global struc here .. */ char *p; /* save the global struc here .. */
}; };
struct ModuleInfo struct ModuleInfo {
{ char *Name;
char *Name; uint Flags[4]; /* one per port on a module */
uint Flags[4]; /* one per port on a module */
}; };
#endif #endif
@@ -238,8 +234,8 @@ struct ModuleInfo
** runs into problems with differing struct sizes between driver and config. ** runs into problems with differing struct sizes between driver and config.
*/ */
struct PortParams { struct PortParams {
uint Port; uint Port;
ulong Config; ulong Config;
ulong State; ulong State;
struct ttystatics *TtyP; struct ttystatics *TtyP;
}; };

View File

@@ -23,15 +23,15 @@
/* /*
** boot.c ** boot.c
*/ */
void init_boot( char *p, short stage); void init_boot(char *p, short stage);
/* /*
** disconct.c ** disconct.c
*/ */
void kill_boot ( LPB *link ); void kill_boot(LPB * link);
void disconnected( LPB *link ); void disconnected(LPB * link);
short boot_3( LPB *link, PKT *pkt ); short boot_3(LPB * link, PKT * pkt);
short send_3_pkt( LPB *link, PKT *pkt); short send_3_pkt(LPB * link, PKT * pkt);
/* /*
** error.c ** error.c
@@ -41,116 +41,116 @@ void du_error(void);
/* /*
** formpkt.c ** formpkt.c
*/ */
ushort sum_it( PKT *pkt ) ; ushort sum_it(PKT * pkt);
void form_rup_pkt( RUP *form_rup, PKT *pkt ); void form_rup_pkt(RUP * form_rup, PKT * pkt);
void form_poll_pkt ( int type, LPB *link, int node ); void form_poll_pkt(int type, LPB * link, int node);
void form_route_pkt ( int type, PKT *pkt, LPB *link ); void form_route_pkt(int type, PKT * pkt, LPB * link);
/* /*
** idle.c ** idle.c
*/ */
void idle( Process *idle_p ); void idle(Process * idle_p);
/* /*
** init.c ** init.c
*/ */
void general_init(void); void general_init(void);
void mem_halt( int error); void mem_halt(int error);
/* /*
** linkinit.c ** linkinit.c
*/ */
void initlink( u_short number, LPB *link); void initlink(u_short number, LPB * link);
void runlink( LPB *link); void runlink(LPB * link);
/* /*
** list.c ** list.c
*/ */
PKT *get_free_start(void); PKT *get_free_start(void);
void put_free_start( PKT *pkt); void put_free_start(PKT * pkt);
#ifdef HOST #ifdef HOST
int can_remove_transmit ( PKT **pkt, PKT *pointer ); int can_remove_transmit(PKT ** pkt, PKT * pointer);
#endif #endif
#ifdef RTA #ifdef RTA
int spl7 ( void ); int spl7(void);
int spl0 ( void ); int spl0(void);
Q_BUF *get_free_q( void ); Q_BUF *get_free_q(void);
PKT *get_free_end(void); PKT *get_free_end(void);
int add_end( PKT *pkt, PHB *phb, int type); int add_end(PKT * pkt, PHB * phb, int type);
unsigned short free_packets( PHB *phb, int type); unsigned short free_packets(PHB * phb, int type);
int can_remove_start( PKT **pkt, 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_start(PHB * phb, int type);
int can_add_end( PHB *phb, int type); int can_add_end(PHB * phb, int type);
void put_free_end( PKT *pkt); void put_free_end(PKT * pkt);
int remove_start( PKT **pkt, PHB *phb, int type); int remove_start(PKT ** pkt, PHB * phb, int type);
#endif #endif
/* /*
** Lrt.c ** Lrt.c
*/ */
void lrt( Process *lrt_p, LPB *link ); void lrt(Process * lrt_p, LPB * link);
#ifdef RTA #ifdef RTA
void set_led_red ( LPB *link ); void set_led_red(LPB * link);
#endif #endif
/* /*
** ltt.c ** ltt.c
*/ */
void ltt( Process *ltt_p, LPB *link, PHB *phb_ptr[] ); void ltt(Process * ltt_p, LPB * link, PHB * phb_ptr[]);
void send_poll ( LPB *link ); void send_poll(LPB * link);
void request_id ( LPB *link ); void request_id(LPB * link);
void send_topology_update ( LPB *link ); void send_topology_update(LPB * link);
void send_topology ( LPB *link ); void send_topology(LPB * link);
void supply_id ( LPB *link ); void supply_id(LPB * link);
#ifdef RTA #ifdef RTA
void redirect_queue ( LPB *link, ushort flush ); void redirect_queue(LPB * link, ushort flush);
int obtain_rup ( int rup_number, PKT **pkt_address, LPB *link ); int obtain_rup(int rup_number, PKT ** pkt_address, LPB * link);
#endif #endif
#ifdef TESTING_PERF #ifdef TESTING_PERF
int consume_cpu( void ); int consume_cpu(void);
#endif #endif
/* /*
** lttwake.c ** lttwake.c
*/ */
#ifdef HOST #ifdef HOST
void ltt_wakeup( Process *ltt_wakeup_p ); void ltt_wakeup(Process * ltt_wakeup_p);
#endif #endif
/* /*
** mapgen.c ** mapgen.c
*/ */
void generate_id_map( short mapping, ROUTE_STR route[] ); 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 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 adjust_ttl(int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl);
void init_sys_map(void); void init_sys_map(void);
/* /*
** mmu.c ** mmu.c
*/ */
char *rio_malloc( unsigned int amount); char *rio_malloc(unsigned int amount);
char *rio_calloc( unsigned int num, unsigned int size); char *rio_calloc(unsigned int num, unsigned int size);
ERROR rio_mmu_init( uint total_mem ); ERROR rio_mmu_init(uint total_mem);
/* /*
** partn.c ** 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 ** poll.c
*/ */
void tx_poll( Process *tx_poll_p); void tx_poll(Process * tx_poll_p);
/* /*
** process.c ** process.c
*/ */
int get_proc_space( Process **pd, int **pws, int wssize); int get_proc_space(Process ** pd, int **pws, int wssize);
/* /*
** readrom.c ** readrom.c
@@ -160,85 +160,85 @@ void read_serial_number(char *buf);
/* /*
** rio.c ** rio.c
*/ */
int main( void ); int main(void);
/* /*
** route.c ** route.c
*/ */
void route_update ( PKT *pkt, LPB *link); void route_update(PKT * pkt, LPB * link);
/* /*
** rtainit.c ** rtainit.c
*/ */
#if defined(RTA) #if defined(RTA)
void rta_init(ushort RtaType); void rta_init(ushort RtaType);
#endif /* defined(RTA) */ #endif /* defined(RTA) */
/* /*
** rupboot.c ** rupboot.c
*/ */
void rup_boot( PKT *pkt, RUP *this_rup, LPB *link); void rup_boot(PKT * pkt, RUP * this_rup, LPB * link);
#ifdef RTA #ifdef RTA
void kill_your_neighbour( int link_to_kill ); void kill_your_neighbour(int link_to_kill);
#endif #endif
/* /*
** rupcmd.c ** 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 ** ruperr.c
*/ */
void rup_error( PKT *pkt, RUP *this_rup, LPB *link ); void rup_error(PKT * pkt, RUP * this_rup, LPB * link);
void illegal_cmd( PKT *src_pkt ); void illegal_cmd(PKT * src_pkt);
/* /*
** ruppoll.c ** ruppoll.c
*/ */
void rup_poll( PKT *pkt, RUP *this_rup, LPB *link ); void rup_poll(PKT * pkt, RUP * this_rup, LPB * link);
/* /*
** ruppower.c ** ruppower.c
*/ */
void rup_power( PKT *pkt, RUP *this_rup, LPB *link ); void rup_power(PKT * pkt, RUP * this_rup, LPB * link);
/* /*
** ruprm.c ** 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 ** rupstat.c
*/ */
void rup_status( PKT *pkt, RUP *this_rup, LPB *link); void rup_status(PKT * pkt, RUP * this_rup, LPB * link);
/* /*
** rupsync.c ** rupsync.c
*/ */
void rup_sync( PKT *pkt); void rup_sync(PKT * pkt);
/* /*
** rxpkt.c ** rxpkt.c
*/ */
ERROR rx_pkt( PKT_ptr_ptr pkt_address, LPB *link); ERROR rx_pkt(PKT_ptr_ptr pkt_address, LPB * link);
/* /*
** sendsts.c ** sendsts.c
*/ */
void send_status( PKT *requesting_pkt, RUP *this_rup); void send_status(PKT * requesting_pkt, RUP * this_rup);
/* /*
** serial.c ** serial.c
*/ */
void assign_serial ( char *ser_in, char *ser_out); void assign_serial(char *ser_in, char *ser_out);
int cmp_serial ( char *ser_1, char *ser_2); int cmp_serial(char *ser_1, char *ser_2);
/* /*
** txpkt.c ** txpkt.c
*/ */
ERROR tx_pkt( PKT *pkt, LPB *link); ERROR tx_pkt(PKT * pkt, LPB * link);
short send_sync( LPB *link); short send_sync(LPB * link);
#endif /* _prototypes_h */ #endif /* _prototypes_h */

View File

@@ -115,5 +115,3 @@
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -40,7 +40,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #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
#endif #endif
@@ -52,16 +52,15 @@ static char *_rio_qbuf_h_sccs = "@(#)qbuf.h 1.1" ;
#define PKTS_PER_BUFFER (220 / PKT_LENGTH) #define PKTS_PER_BUFFER (220 / PKT_LENGTH)
#endif #endif
typedef struct Q_BUF Q_BUF ; typedef struct Q_BUF Q_BUF;
struct Q_BUF { struct Q_BUF {
Q_BUF_ptr next ; Q_BUF_ptr next;
Q_BUF_ptr prev ; Q_BUF_ptr prev;
PKT_ptr buf[PKTS_PER_BUFFER] ; PKT_ptr buf[PKTS_PER_BUFFER];
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View 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 RIO_HOSTS 4 /* number of hosts that can be found */
#define PORTS_PER_HOST 128 /* number of ports per host */ #define PORTS_PER_HOST 128 /* number of ports per host */
#define LINKS_PER_UNIT 4 /* number of links from a 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 RIO_PORTS (PORTS_PER_HOST * RIO_HOSTS) /* max. no. of ports */
#define RTAS_PER_HOST (MAX_RUP) /* number of RTAs per host */ #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_RTA (PORTS_PER_HOST/RTAS_PER_HOST) /* ports on a rta */
#define PORTS_PER_MODULE 4 /* number of ports on a plug-in module */ #define PORTS_PER_MODULE 4 /* number of ports on a plug-in module */
/* number of modules on an RTA */ /* 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_PRI (PZERO+10)
#define RIO_CLOSE_PRI PZERO-1 /* uninterruptible sleeps for close */ #define RIO_CLOSE_PRI PZERO-1 /* uninterruptible sleeps for close */
typedef struct DbInf typedef struct DbInf {
{ uint Flag;
uint Flag; char Name[8];
char Name[8];
} DbInf; } DbInf;
#ifndef TRUE #ifndef TRUE
@@ -251,7 +250,7 @@ typedef struct DbInf
*((uint *)PK) = PP->PacketInfo; \ *((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. */ /* prevent a really stupid race condition. */
#define NOT_INITIALISED 0 #define NOT_INITIALISED 0
@@ -291,4 +290,4 @@ typedef struct DbInf
#define DIST_LINESW_OUTPUT 0x40 #define DIST_LINESW_OUTPUT 0x40
#define DIST_LINESW_MDMINT 0x80 #define DIST_LINESW_MDMINT 0x80
#endif /* __rio_h__ */ #endif /* __rio_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -37,15 +37,15 @@
struct vpd_prom { struct vpd_prom {
unsigned short id; unsigned short id;
char hwrev; char hwrev;
char hwass; char hwass;
int uniqid; int uniqid;
char myear; char myear;
char mweek; char mweek;
char hw_feature[5]; char hw_feature[5];
char oem_id; char oem_id;
char identifier[16]; char identifier[16];
}; };
@@ -75,13 +75,13 @@ struct vpd_prom {
(L_ISIG(tty))) (L_ISIG(tty)))
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#define RIO_BOARD_INTR_LOCK 1 #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 */ /* Allow others to gather this into "major.h" or something like that */
#define RIOCTL_MISC_MINOR 169 #define RIOCTL_MISC_MINOR 169
#endif #endif
@@ -121,39 +121,39 @@ struct vpd_prom {
spin_unlock_irqrestore(sem, flags) spin_unlock_irqrestore(sem, flags)
#define rio_spin_lock(sem) \ #define rio_spin_lock(sem) \
spin_lock(sem) spin_lock(sem)
#define rio_spin_unlock(sem) \ #define rio_spin_unlock(sem) \
spin_unlock(sem) spin_unlock(sem)
#endif #endif
#ifdef CONFIG_RIO_OLDPCI #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 *dst = dest;
char *src = source; char *src = source;
while (n--) { while (n--) {
writeb (*src++, dst++); writeb(*src++, dst++);
(void) readb (dummy); (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 *dst = dest;
char *src = source; char *src = source;
while (n--) while (n--)
*dst++ = readb (src++); *dst++ = readb(src++);
return dest; return dest;
} }
#else #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_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) #define func_enter2() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter %s (port %d)\n",__FUNCTION__, port->line)
#else #else
#define rio_dprintk(f, str...) /* nothing */ #define rio_dprintk(f, str...) /* nothing */
#define func_enter() #define func_enter()
#define func_exit() #define func_exit()
#define func_enter2() #define func_enter2()
#endif #endif

View File

@@ -35,7 +35,7 @@
*/ */
#ifndef _rioboard_h /* If RIOBOARD.H not already defined */ #ifndef _rioboard_h /* If RIOBOARD.H not already defined */
#define _rioboard_h 1 #define _rioboard_h 1
/***************************************************************************** /*****************************************************************************
@@ -46,7 +46,7 @@
/* Hardware Registers... */ /* Hardware Registers... */
#define RIO_REG_BASE 0x7C00 /* Base of control registers */ #define RIO_REG_BASE 0x7C00 /* Base of control registers */
#define RIO_CONFIG RIO_REG_BASE + 0x0000 /* WRITE: Configuration Register */ #define RIO_CONFIG RIO_REG_BASE + 0x0000 /* WRITE: Configuration Register */
#define RIO_INTSET RIO_REG_BASE + 0x0080 /* WRITE: Interrupt Set */ #define RIO_INTSET RIO_REG_BASE + 0x0080 /* WRITE: Interrupt Set */
@@ -58,30 +58,30 @@
#define RIO_RESETSTAT RIO_REG_BASE + 0x0100 /* READ: Reset Status (Jet boards only) */ #define RIO_RESETSTAT RIO_REG_BASE + 0x0100 /* READ: Reset Status (Jet boards only) */
/* RIO_VPD_ROM definitions... */ /* RIO_VPD_ROM definitions... */
#define VPD_SLX_ID1 0x00 /* READ: Specialix Identifier #1 */ #define VPD_SLX_ID1 0x00 /* READ: Specialix Identifier #1 */
#define VPD_SLX_ID2 0x01 /* READ: Specialix Identifier #2 */ #define VPD_SLX_ID2 0x01 /* READ: Specialix Identifier #2 */
#define VPD_HW_REV 0x02 /* READ: Hardware Revision */ #define VPD_HW_REV 0x02 /* READ: Hardware Revision */
#define VPD_HW_ASSEM 0x03 /* READ: Hardware Assembly Level */ #define VPD_HW_ASSEM 0x03 /* READ: Hardware Assembly Level */
#define VPD_UNIQUEID4 0x04 /* READ: Unique Identifier #4 */ #define VPD_UNIQUEID4 0x04 /* READ: Unique Identifier #4 */
#define VPD_UNIQUEID3 0x05 /* READ: Unique Identifier #3 */ #define VPD_UNIQUEID3 0x05 /* READ: Unique Identifier #3 */
#define VPD_UNIQUEID2 0x06 /* READ: Unique Identifier #2 */ #define VPD_UNIQUEID2 0x06 /* READ: Unique Identifier #2 */
#define VPD_UNIQUEID1 0x07 /* READ: Unique Identifier #1 */ #define VPD_UNIQUEID1 0x07 /* READ: Unique Identifier #1 */
#define VPD_MANU_YEAR 0x08 /* READ: Year Of Manufacture (0 = 1970) */ #define VPD_MANU_YEAR 0x08 /* READ: Year Of Manufacture (0 = 1970) */
#define VPD_MANU_WEEK 0x09 /* READ: Week Of Manufacture (0 = week 1 Jan) */ #define VPD_MANU_WEEK 0x09 /* READ: Week Of Manufacture (0 = week 1 Jan) */
#define VPD_HWFEATURE1 0x0A /* READ: Hardware Feature Byte 1 */ #define VPD_HWFEATURE1 0x0A /* READ: Hardware Feature Byte 1 */
#define VPD_HWFEATURE2 0x0B /* READ: Hardware Feature Byte 2 */ #define VPD_HWFEATURE2 0x0B /* READ: Hardware Feature Byte 2 */
#define VPD_HWFEATURE3 0x0C /* READ: Hardware Feature Byte 3 */ #define VPD_HWFEATURE3 0x0C /* READ: Hardware Feature Byte 3 */
#define VPD_HWFEATURE4 0x0D /* READ: Hardware Feature Byte 4 */ #define VPD_HWFEATURE4 0x0D /* READ: Hardware Feature Byte 4 */
#define VPD_HWFEATURE5 0x0E /* READ: Hardware Feature Byte 5 */ #define VPD_HWFEATURE5 0x0E /* READ: Hardware Feature Byte 5 */
#define VPD_OEMID 0x0F /* READ: OEM Identifier */ #define VPD_OEMID 0x0F /* READ: OEM Identifier */
#define VPD_IDENT 0x10 /* READ: Identifier string (16 bytes) */ #define VPD_IDENT 0x10 /* READ: Identifier string (16 bytes) */
#define VPD_IDENT_LEN 0x10 #define VPD_IDENT_LEN 0x10
/* VPD ROM Definitions... */ /* VPD ROM Definitions... */
#define SLX_ID1 0x4D #define SLX_ID1 0x4D
#define SLX_ID2 0x98 #define SLX_ID2 0x98
#define PRODUCT_ID(a) ((a>>4)&0xF) /* Use to obtain Product ID from VPD_UNIQUEID1 */ #define PRODUCT_ID(a) ((a>>4)&0xF) /* Use to obtain Product ID from VPD_UNIQUEID1 */
#define ID_SX_ISA 0x2 #define ID_SX_ISA 0x2
#define ID_RIO_EISA 0x3 #define ID_RIO_EISA 0x3
@@ -101,7 +101,7 @@
/* Firmware load position... */ /* Firmware load position... */
#define FIRMWARELOADADDR 0x7C00 /* Firmware is loaded _before_ this address */ #define FIRMWARELOADADDR 0x7C00 /* Firmware is loaded _before_ this address */
/***************************************************************************** /*****************************************************************************
***************************** ***************************** ***************************** *****************************
@@ -112,14 +112,14 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_ISA_IDENT "JBJGPGGHINSMJPJR" #define RIO_ISA_IDENT "JBJGPGGHINSMJPJR"
#define RIO_ISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_ISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_ISA_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_ISA_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_ISA_CFG_IRQMASK 0x30 /* Interrupt mask */ #define RIO_ISA_CFG_IRQMASK 0x30 /* Interrupt mask */
#define RIO_ISA_CFG_IRQ12 0x10 /* Interrupt Level 12 */ #define RIO_ISA_CFG_IRQ12 0x10 /* Interrupt Level 12 */
#define RIO_ISA_CFG_IRQ11 0x20 /* Interrupt Level 11 */ #define RIO_ISA_CFG_IRQ11 0x20 /* Interrupt Level 11 */
#define RIO_ISA_CFG_IRQ9 0x30 /* Interrupt Level 9 */ #define RIO_ISA_CFG_IRQ9 0x30 /* Interrupt Level 9 */
#define RIO_ISA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */ #define RIO_ISA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
#define RIO_ISA_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */ #define RIO_ISA_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */
/***************************************************************************** /*****************************************************************************
***************************** ***************************** ***************************** *****************************
@@ -130,17 +130,17 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_ISA2_IDENT "JBJGPGGHINSMJPJR" #define RIO_ISA2_IDENT "JBJGPGGHINSMJPJR"
#define RIO_ISA2_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_ISA2_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_ISA2_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_ISA2_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_ISA2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */ #define RIO_ISA2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
#define RIO_ISA2_CFG_16BIT 0x08 /* 16bit mode, else 8bit */ #define RIO_ISA2_CFG_16BIT 0x08 /* 16bit mode, else 8bit */
#define RIO_ISA2_CFG_IRQMASK 0x30 /* Interrupt mask */ #define RIO_ISA2_CFG_IRQMASK 0x30 /* Interrupt mask */
#define RIO_ISA2_CFG_IRQ15 0x00 /* Interrupt Level 15 */ #define RIO_ISA2_CFG_IRQ15 0x00 /* Interrupt Level 15 */
#define RIO_ISA2_CFG_IRQ12 0x10 /* Interrupt Level 12 */ #define RIO_ISA2_CFG_IRQ12 0x10 /* Interrupt Level 12 */
#define RIO_ISA2_CFG_IRQ11 0x20 /* Interrupt Level 11 */ #define RIO_ISA2_CFG_IRQ11 0x20 /* Interrupt Level 11 */
#define RIO_ISA2_CFG_IRQ9 0x30 /* Interrupt Level 9 */ #define RIO_ISA2_CFG_IRQ9 0x30 /* Interrupt Level 9 */
#define RIO_ISA2_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */ #define RIO_ISA2_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
#define RIO_ISA2_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */ #define RIO_ISA2_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */
/***************************************************************************** /*****************************************************************************
***************************** ****************************** ***************************** ******************************
@@ -151,14 +151,14 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_ISA3_IDENT "JET HOST BY KEV#" #define RIO_ISA3_IDENT "JET HOST BY KEV#"
#define RIO_ISA3_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_ISA3_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_ISA3_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */ #define RIO_ISA3_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
#define RIO_ISA32_CFG_IRQMASK 0xF30 /* Interrupt mask */ #define RIO_ISA32_CFG_IRQMASK 0xF30 /* Interrupt mask */
#define RIO_ISA3_CFG_IRQ15 0xF0 /* Interrupt Level 15 */ #define RIO_ISA3_CFG_IRQ15 0xF0 /* Interrupt Level 15 */
#define RIO_ISA3_CFG_IRQ12 0xC0 /* Interrupt Level 12 */ #define RIO_ISA3_CFG_IRQ12 0xC0 /* Interrupt Level 12 */
#define RIO_ISA3_CFG_IRQ11 0xB0 /* Interrupt Level 11 */ #define RIO_ISA3_CFG_IRQ11 0xB0 /* Interrupt Level 11 */
#define RIO_ISA3_CFG_IRQ10 0xA0 /* Interrupt Level 10 */ #define RIO_ISA3_CFG_IRQ10 0xA0 /* Interrupt Level 10 */
#define RIO_ISA3_CFG_IRQ9 0x90 /* Interrupt Level 9 */ #define RIO_ISA3_CFG_IRQ9 0x90 /* Interrupt Level 9 */
/***************************************************************************** /*****************************************************************************
********************************* ******************************** ********************************* ********************************
@@ -169,9 +169,9 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_MCA_IDENT "JBJGPGGHINSMJPJR" #define RIO_MCA_IDENT "JBJGPGGHINSMJPJR"
#define RIO_MCA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_MCA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_MCA_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_MCA_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_MCA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */ #define RIO_MCA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
/***************************************************************************** /*****************************************************************************
******************************** ******************************** ******************************** ********************************
@@ -185,35 +185,35 @@
#define EISA_PRODUCT_NUMBER 0xC82 #define EISA_PRODUCT_NUMBER 0xC82
#define EISA_REVISION_NUMBER 0xC83 #define EISA_REVISION_NUMBER 0xC83
#define EISA_CARD_ENABLE 0xC84 #define EISA_CARD_ENABLE 0xC84
#define EISA_VPD_UNIQUEID4 0xC88 /* READ: Unique Identifier #4 */ #define EISA_VPD_UNIQUEID4 0xC88 /* READ: Unique Identifier #4 */
#define EISA_VPD_UNIQUEID3 0xC8A /* READ: Unique Identifier #3 */ #define EISA_VPD_UNIQUEID3 0xC8A /* READ: Unique Identifier #3 */
#define EISA_VPD_UNIQUEID2 0xC90 /* READ: Unique Identifier #2 */ #define EISA_VPD_UNIQUEID2 0xC90 /* READ: Unique Identifier #2 */
#define EISA_VPD_UNIQUEID1 0xC92 /* READ: Unique Identifier #1 */ #define EISA_VPD_UNIQUEID1 0xC92 /* READ: Unique Identifier #1 */
#define EISA_VPD_MANU_YEAR 0xC98 /* READ: Year Of Manufacture (0 = 1970) */ #define EISA_VPD_MANU_YEAR 0xC98 /* READ: Year Of Manufacture (0 = 1970) */
#define EISA_VPD_MANU_WEEK 0xC9A /* READ: Week Of Manufacture (0 = week 1 Jan) */ #define EISA_VPD_MANU_WEEK 0xC9A /* READ: Week Of Manufacture (0 = week 1 Jan) */
#define EISA_MEM_ADDR_23_16 0xC00 #define EISA_MEM_ADDR_23_16 0xC00
#define EISA_MEM_ADDR_31_24 0xC01 #define EISA_MEM_ADDR_31_24 0xC01
#define EISA_RIO_CONFIG 0xC02 /* WRITE: Configuration Register */ #define EISA_RIO_CONFIG 0xC02 /* WRITE: Configuration Register */
#define EISA_RIO_INTSET 0xC03 /* WRITE: Interrupt Set */ #define EISA_RIO_INTSET 0xC03 /* WRITE: Interrupt Set */
#define EISA_RIO_INTRESET 0xC03 /* READ: Interrupt Reset */ #define EISA_RIO_INTRESET 0xC03 /* READ: Interrupt Reset */
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_EISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_EISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_EISA_CFG_LINK20 0x02 /* 20Mbps link, else 10Mbps */ #define RIO_EISA_CFG_LINK20 0x02 /* 20Mbps link, else 10Mbps */
#define RIO_EISA_CFG_BUSENABLE 0x04 /* Enable processor bus */ #define RIO_EISA_CFG_BUSENABLE 0x04 /* Enable processor bus */
#define RIO_EISA_CFG_PROCRUN 0x08 /* Processor running, else reset */ #define RIO_EISA_CFG_PROCRUN 0x08 /* Processor running, else reset */
#define RIO_EISA_CFG_IRQMASK 0xF0 /* Interrupt mask */ #define RIO_EISA_CFG_IRQMASK 0xF0 /* Interrupt mask */
#define RIO_EISA_CFG_IRQ15 0xF0 /* Interrupt Level 15 */ #define RIO_EISA_CFG_IRQ15 0xF0 /* Interrupt Level 15 */
#define RIO_EISA_CFG_IRQ14 0xE0 /* Interrupt Level 14 */ #define RIO_EISA_CFG_IRQ14 0xE0 /* Interrupt Level 14 */
#define RIO_EISA_CFG_IRQ12 0xC0 /* Interrupt Level 12 */ #define RIO_EISA_CFG_IRQ12 0xC0 /* Interrupt Level 12 */
#define RIO_EISA_CFG_IRQ11 0xB0 /* Interrupt Level 11 */ #define RIO_EISA_CFG_IRQ11 0xB0 /* Interrupt Level 11 */
#define RIO_EISA_CFG_IRQ10 0xA0 /* Interrupt Level 10 */ #define RIO_EISA_CFG_IRQ10 0xA0 /* Interrupt Level 10 */
#define RIO_EISA_CFG_IRQ9 0x90 /* Interrupt Level 9 */ #define RIO_EISA_CFG_IRQ9 0x90 /* Interrupt Level 9 */
#define RIO_EISA_CFG_IRQ7 0x70 /* Interrupt Level 7 */ #define RIO_EISA_CFG_IRQ7 0x70 /* Interrupt Level 7 */
#define RIO_EISA_CFG_IRQ6 0x60 /* Interrupt Level 6 */ #define RIO_EISA_CFG_IRQ6 0x60 /* Interrupt Level 6 */
#define RIO_EISA_CFG_IRQ5 0x50 /* Interrupt Level 5 */ #define RIO_EISA_CFG_IRQ5 0x50 /* Interrupt Level 5 */
#define RIO_EISA_CFG_IRQ4 0x40 /* Interrupt Level 4 */ #define RIO_EISA_CFG_IRQ4 0x40 /* Interrupt Level 4 */
#define RIO_EISA_CFG_IRQ3 0x30 /* Interrupt Level 3 */ #define RIO_EISA_CFG_IRQ3 0x30 /* Interrupt Level 3 */
/***************************************************************************** /*****************************************************************************
******************************** ******************************** ******************************** ********************************
@@ -224,20 +224,20 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_SBUS_IDENT "JBPGK#\0\0\0\0\0\0\0\0\0\0" #define RIO_SBUS_IDENT "JBPGK#\0\0\0\0\0\0\0\0\0\0"
#define RIO_SBUS_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_SBUS_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_SBUS_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_SBUS_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_SBUS_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */ #define RIO_SBUS_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
#define RIO_SBUS_CFG_IRQMASK 0x38 /* Interrupt mask */ #define RIO_SBUS_CFG_IRQMASK 0x38 /* Interrupt mask */
#define RIO_SBUS_CFG_IRQNONE 0x00 /* No Interrupt */ #define RIO_SBUS_CFG_IRQNONE 0x00 /* No Interrupt */
#define RIO_SBUS_CFG_IRQ7 0x38 /* Interrupt Level 7 */ #define RIO_SBUS_CFG_IRQ7 0x38 /* Interrupt Level 7 */
#define RIO_SBUS_CFG_IRQ6 0x30 /* Interrupt Level 6 */ #define RIO_SBUS_CFG_IRQ6 0x30 /* Interrupt Level 6 */
#define RIO_SBUS_CFG_IRQ5 0x28 /* Interrupt Level 5 */ #define RIO_SBUS_CFG_IRQ5 0x28 /* Interrupt Level 5 */
#define RIO_SBUS_CFG_IRQ4 0x20 /* Interrupt Level 4 */ #define RIO_SBUS_CFG_IRQ4 0x20 /* Interrupt Level 4 */
#define RIO_SBUS_CFG_IRQ3 0x18 /* Interrupt Level 3 */ #define RIO_SBUS_CFG_IRQ3 0x18 /* Interrupt Level 3 */
#define RIO_SBUS_CFG_IRQ2 0x10 /* Interrupt Level 2 */ #define RIO_SBUS_CFG_IRQ2 0x10 /* Interrupt Level 2 */
#define RIO_SBUS_CFG_IRQ1 0x08 /* Interrupt Level 1 */ #define RIO_SBUS_CFG_IRQ1 0x08 /* Interrupt Level 1 */
#define RIO_SBUS_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */ #define RIO_SBUS_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
#define RIO_SBUS_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */ #define RIO_SBUS_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */
/***************************************************************************** /*****************************************************************************
********************************* ******************************** ********************************* ********************************
@@ -248,18 +248,18 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_PCI_IDENT "ECDDPGJGJHJRGSK#" #define RIO_PCI_IDENT "ECDDPGJGJHJRGSK#"
#define RIO_PCI_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */ #define RIO_PCI_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
#define RIO_PCI_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_PCI_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_PCI_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */ #define RIO_PCI_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
#define RIO_PCI_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */ #define RIO_PCI_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
#define RIO_PCI_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */ #define RIO_PCI_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */
/* PCI Definitions... */ /* PCI Definitions... */
#define SPX_VENDOR_ID 0x11CB /* Assigned by the PCI SIG */ #define SPX_VENDOR_ID 0x11CB /* Assigned by the PCI SIG */
#define SPX_DEVICE_ID 0x8000 /* RIO bridge boards */ #define SPX_DEVICE_ID 0x8000 /* RIO bridge boards */
#define SPX_PLXDEVICE_ID 0x2000 /* PLX bridge boards */ #define SPX_PLXDEVICE_ID 0x2000 /* PLX bridge boards */
#define SPX_SUB_VENDOR_ID SPX_VENDOR_ID /* Same as vendor id */ #define SPX_SUB_VENDOR_ID SPX_VENDOR_ID /* Same as vendor id */
#define RIO_SUB_SYS_ID 0x0800 /* RIO PCI board */ #define RIO_SUB_SYS_ID 0x0800 /* RIO PCI board */
/***************************************************************************** /*****************************************************************************
***************************** ****************************** ***************************** ******************************
@@ -270,11 +270,11 @@
/* Control Register Definitions... */ /* Control Register Definitions... */
#define RIO_PCI2_IDENT "JET HOST BY KEV#" #define RIO_PCI2_IDENT "JET HOST BY KEV#"
#define RIO_PCI2_CFG_BUSENABLE 0x02 /* Enable processor bus */ #define RIO_PCI2_CFG_BUSENABLE 0x02 /* Enable processor bus */
#define RIO_PCI2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */ #define RIO_PCI2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
/* PCI Definitions... */ /* PCI Definitions... */
#define RIO2_SUB_SYS_ID 0x0100 /* RIO (Jet) PCI board */ #define RIO2_SUB_SYS_ID 0x0100 /* RIO (Jet) PCI board */
#endif /*_rioboard_h */ #endif /*_rioboard_h */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,7 @@
#ifndef __riodrvr_h #ifndef __riodrvr_h
#define __riodrvr_h #define __riodrvr_h
#include <asm/param.h> /* for HZ */ #include <asm/param.h> /* for HZ */
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3"; static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
@@ -44,15 +44,15 @@ static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
struct rio_info { struct rio_info {
int mode; /* Intr or polled, word/byte */ int mode; /* Intr or polled, word/byte */
spinlock_t RIOIntrSem; /* Interrupt thread sem */ spinlock_t RIOIntrSem; /* Interrupt thread sem */
int current_chan; /* current channel */ int current_chan; /* current channel */
int RIOFailed; /* Not initialised ? */ int RIOFailed; /* Not initialised ? */
int RIOInstallAttempts; /* no. of rio-install() calls */ int RIOInstallAttempts; /* no. of rio-install() calls */
int RIOLastPCISearch; /* status of last search */ int RIOLastPCISearch; /* status of last search */
int RIONumHosts; /* Number of RIO Hosts */ int RIONumHosts; /* Number of RIO Hosts */
struct Host * RIOHosts; /* RIO Host values */ struct Host *RIOHosts; /* RIO Host values */
struct Port **RIOPortp; /* RIO port values */ struct Port **RIOPortp; /* RIO port values */
/* /*
** 02.03.1999 ARG - ESIL 0820 fix ** 02.03.1999 ARG - ESIL 0820 fix
** We no longer use RIOBootMode ** We no longer use RIOBootMode
@@ -60,9 +60,9 @@ struct rio_info {
int RIOBootMode; * RIO boot mode * int RIOBootMode; * RIO boot mode *
** **
*/ */
int RIOPrintDisabled; /* RIO printing disabled ? */ int RIOPrintDisabled; /* RIO printing disabled ? */
int RIOPrintLogState; /* RIO printing state ? */ int RIOPrintLogState; /* RIO printing state ? */
int RIOPolling; /* Polling ? */ int RIOPolling; /* Polling ? */
/* /*
** 09.12.1998 ARG - ESIL 0776 part fix ** 09.12.1998 ARG - ESIL 0776 part fix
** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted. ** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted.
@@ -70,61 +70,61 @@ struct rio_info {
** updated in RIOConCon() - to keep track of RTA connections/disconnections. ** updated in RIOConCon() - to keep track of RTA connections/disconnections.
** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons. ** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons.
*/ */
int RIOHalted; /* halted ? */ int RIOHalted; /* halted ? */
int RIORtaDisCons; /* RTA connections/disconnections */ int RIORtaDisCons; /* RTA connections/disconnections */
uint RIOReadCheck; /* Rio read check */ uint RIOReadCheck; /* Rio read check */
uint RIONoMessage; /* To display message or not */ uint RIONoMessage; /* To display message or not */
uint RIONumBootPkts; /* how many packets for an RTA */ uint RIONumBootPkts; /* how many packets for an RTA */
uint RIOBootCount; /* size of RTA code */ uint RIOBootCount; /* size of RTA code */
uint RIOBooting; /* count of outstanding boots */ uint RIOBooting; /* count of outstanding boots */
uint RIOSystemUp; /* Booted ?? */ uint RIOSystemUp; /* Booted ?? */
uint RIOCounting; /* for counting interrupts */ uint RIOCounting; /* for counting interrupts */
uint RIOIntCount; /* # of intr since last check */ uint RIOIntCount; /* # of intr since last check */
uint RIOTxCount; /* number of xmit intrs */ uint RIOTxCount; /* number of xmit intrs */
uint RIORxCount; /* number of rx intrs */ uint RIORxCount; /* number of rx intrs */
uint RIORupCount; /* number of rup intrs */ uint RIORupCount; /* number of rup intrs */
int RIXTimer; int RIXTimer;
int RIOBufferSize; /* Buffersize */ int RIOBufferSize; /* Buffersize */
int RIOBufferMask; /* Buffersize */ int RIOBufferMask; /* Buffersize */
int RIOFirstMajor; /* First host card's major no */ int RIOFirstMajor; /* First host card's major no */
uint RIOLastPortsMapped; /* highest port number known */ uint RIOLastPortsMapped; /* highest port number known */
uint RIOFirstPortsMapped; /* lowest port number known */ uint RIOFirstPortsMapped; /* lowest port number known */
uint RIOLastPortsBooted; /* highest port number running */ uint RIOLastPortsBooted; /* highest port number running */
uint RIOFirstPortsBooted; /* lowest port number running */ uint RIOFirstPortsBooted; /* lowest port number running */
uint RIOLastPortsOpened; /* highest port number running */ uint RIOLastPortsOpened; /* highest port number running */
uint RIOFirstPortsOpened; /* lowest port number running */ uint RIOFirstPortsOpened; /* lowest port number running */
/* Flag to say that the topology information has been changed. */ /* Flag to say that the topology information has been changed. */
uint RIOQuickCheck; uint RIOQuickCheck;
uint CdRegister; /* ??? */ uint CdRegister; /* ??? */
int RIOSignalProcess; /* Signalling process */ int RIOSignalProcess; /* Signalling process */
int rio_debug; /* To debug ... */ int rio_debug; /* To debug ... */
int RIODebugWait; /* For what ??? */ int RIODebugWait; /* For what ??? */
int tpri; /* Thread prio */ int tpri; /* Thread prio */
int tid; /* Thread id */ int tid; /* Thread id */
uint _RIO_Polled; /* Counter for polling */ uint _RIO_Polled; /* Counter for polling */
uint _RIO_Interrupted; /* Counter for interrupt */ uint _RIO_Interrupted; /* Counter for interrupt */
int intr_tid; /* iointset return value */ int intr_tid; /* iointset return value */
int TxEnSem; /* TxEnable Semaphore */ int TxEnSem; /* TxEnable Semaphore */
struct Error RIOError; /* to Identify what went wrong */ struct Error RIOError; /* to Identify what went wrong */
struct Conf RIOConf; /* Configuration ??? */ struct Conf RIOConf; /* Configuration ??? */
struct ttystatics channel[RIO_PORTS]; /* channel information */ struct ttystatics channel[RIO_PORTS]; /* channel information */
char RIOBootPackets[1+(SIXTY_FOUR_K/RTA_BOOT_DATA_SIZE)] char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
[RTA_BOOT_DATA_SIZE]; [RTA_BOOT_DATA_SIZE];
struct Map RIOConnectTable[TOTAL_MAP_ENTRIES]; struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
struct Map RIOSavedTable[TOTAL_MAP_ENTRIES]; struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
/* RTA to host binding table for master/slave operation */ /* RTA to host binding table for master/slave operation */
ulong RIOBindTab[MAX_RTA_BINDINGS]; ulong RIOBindTab[MAX_RTA_BINDINGS];
/* RTA memory dump variable */ /* RTA memory dump variable */
uchar RIOMemDump[MEMDUMP_SIZE]; uchar RIOMemDump[MEMDUMP_SIZE];
struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES]; struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
}; };
@@ -141,4 +141,4 @@ struct rio_info {
#define WRBYTE(x,y) *(volatile unsigned char *)((x)) = \ #define WRBYTE(x,y) *(volatile unsigned char *)((x)) = \
(unsigned char)(y) (unsigned char)(y)
#endif /* __riodrvr.h */ #endif /* __riodrvr.h */

View File

@@ -41,29 +41,29 @@ static char *_rioinfo_h_sccs_ = "@(#)rioinfo.h 1.2";
** Host card data structure ** Host card data structure
*/ */
struct RioHostInfo { struct RioHostInfo {
long location; /* RIO Card Base I/O address */ long location; /* RIO Card Base I/O address */
long vector; /* RIO Card IRQ vector */ long vector; /* RIO Card IRQ vector */
int bus; /* ISA/EISA/MCA/PCI */ int bus; /* ISA/EISA/MCA/PCI */
int mode; /* pointer to host mode - INTERRUPT / POLLED */ int mode; /* pointer to host mode - INTERRUPT / POLLED */
struct old_sgttyb struct old_sgttyb
* Sg; /* pointer to default term characteristics */ *Sg; /* pointer to default term characteristics */
}; };
/* Mode in rio device info */ /* Mode in rio device info */
#define INTERRUPTED_MODE 0x01 /* Interrupt is generated */ #define INTERRUPTED_MODE 0x01 /* Interrupt is generated */
#define POLLED_MODE 0x02 /* No interrupt */ #define POLLED_MODE 0x02 /* No interrupt */
#define AUTO_MODE 0x03 /* Auto mode */ #define AUTO_MODE 0x03 /* Auto mode */
#define WORD_ACCESS_MODE 0x10 /* Word Access Mode */ #define WORD_ACCESS_MODE 0x10 /* Word Access Mode */
#define BYTE_ACCESS_MODE 0x20 /* Byte Access Mode */ #define BYTE_ACCESS_MODE 0x20 /* Byte Access Mode */
/* Bus type that RIO supports */ /* Bus type that RIO supports */
#define ISA_BUS 0x01 /* The card is ISA */ #define ISA_BUS 0x01 /* The card is ISA */
#define EISA_BUS 0x02 /* The card is EISA */ #define EISA_BUS 0x02 /* The card is EISA */
#define MCA_BUS 0x04 /* The card is MCA */ #define MCA_BUS 0x04 /* The card is MCA */
#define PCI_BUS 0x08 /* The card is PCI */ #define PCI_BUS 0x08 /* The card is PCI */
/* /*
** 11.11.1998 ARG - ESIL ???? part fix ** 11.11.1998 ARG - ESIL ???? part fix
@@ -93,4 +93,4 @@ struct RioHostInfo {
'V' - '@' /* literal next char */ \ 'V' - '@' /* literal next char */ \
} }
#endif /* __rioinfo_h */ #endif /* __rioinfo_h */

File diff suppressed because it is too large Load Diff

View File

@@ -42,14 +42,14 @@ static char *_rioioctl_h_sccs_ = "@(#)rioioctl.h 1.2";
*/ */
struct portStats { struct portStats {
int port; int port;
int gather; int gather;
ulong txchars; ulong txchars;
ulong rxchars; ulong rxchars;
ulong opens; ulong opens;
ulong closes; ulong closes;
ulong ioctls; ulong ioctls;
}; };
#define rIOC ('r'<<8) #define rIOC ('r'<<8)
@@ -100,4 +100,4 @@ struct portStats {
#define RIO_RESET_PORT_STATS (RIOC | 194) #define RIO_RESET_PORT_STATS (RIOC | 194)
#define RIO_GET_PORT_STATS (RIOC | 195) #define RIO_GET_PORT_STATS (RIOC | 195)
#endif /* __rioioctl_h__ */ #endif /* __rioioctl_h__ */

View File

@@ -157,46 +157,44 @@ static char *_rioparam_c_sccs_ = "@(#)rioparam.c 1.3";
** NB. for MPX ** NB. for MPX
** tty lock must NOT have been previously acquired. ** tty lock must NOT have been previously acquired.
*/ */
int int RIOParam(PortP, cmd, Modem, SleepFlag)
RIOParam(PortP, cmd, Modem, SleepFlag)
struct Port *PortP; struct Port *PortP;
int cmd; int cmd;
int Modem; int Modem;
int SleepFlag; int SleepFlag;
{ {
register struct tty_struct *TtyP; register struct tty_struct *TtyP;
int retval; int retval;
register struct phb_param *phb_param_ptr; register struct phb_param *phb_param_ptr;
PKT *PacketP; PKT *PacketP;
int res; int res;
uchar Cor1=0, Cor2=0, Cor4=0, Cor5=0; uchar Cor1 = 0, Cor2 = 0, Cor4 = 0, Cor5 = 0;
uchar TxXon=0, TxXoff=0, RxXon=0, RxXoff=0; uchar TxXon = 0, TxXoff = 0, RxXon = 0, RxXoff = 0;
uchar LNext=0, TxBaud=0, RxBaud=0; uchar LNext = 0, TxBaud = 0, RxBaud = 0;
int retries = 0xff; int retries = 0xff;
unsigned long flags; unsigned long flags;
func_enter (); func_enter();
TtyP = PortP->gs.tty; TtyP = PortP->gs.tty;
rio_dprintk (RIO_DEBUG_PARAM, "RIOParam: Port:%d cmd:%d Modem:%d SleepFlag:%d Mapped: %d, tty=%p\n", rio_dprintk(RIO_DEBUG_PARAM, "RIOParam: Port:%d cmd:%d Modem:%d SleepFlag:%d Mapped: %d, tty=%p\n", PortP->PortNum, cmd, Modem, SleepFlag, PortP->Mapped, TtyP);
PortP->PortNum, cmd, Modem, SleepFlag, PortP->Mapped, TtyP);
if (!TtyP) { if (!TtyP) {
rio_dprintk (RIO_DEBUG_PARAM, "Can't call rioparam with null tty.\n"); rio_dprintk(RIO_DEBUG_PARAM, "Can't call rioparam with null tty.\n");
func_exit (); func_exit();
return RIO_FAIL; return RIO_FAIL;
} }
rio_spin_lock_irqsave(&PortP->portSem, flags ); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (cmd == OPEN) { if (cmd == OPEN) {
/* /*
** If the port is set to store or lock the parameters, and it is ** If the port is set to store or lock the parameters, and it is
** paramed with OPEN, we want to restore the saved port termio, but ** paramed with OPEN, we want to restore the saved port termio, but
** only if StoredTermio has been saved, i.e. NOT 1st open after reboot. ** only if StoredTermio has been saved, i.e. NOT 1st open after reboot.
*/ */
#if 0 #if 0
if (PortP->FirstOpen) { if (PortP->FirstOpen) {
PortP->StoredTty.iflag = TtyP->tm.c_iflag; PortP->StoredTty.iflag = TtyP->tm.c_iflag;
@@ -207,9 +205,8 @@ int SleepFlag;
for (i = 0; i < NCC + 5; i++) for (i = 0; i < NCC + 5; i++)
PortP->StoredTty.cc[i] = TtyP->tm.c_cc[i]; PortP->StoredTty.cc[i] = TtyP->tm.c_cc[i];
PortP->FirstOpen = 0; PortP->FirstOpen = 0;
} } else if (PortP->Store || PortP->Lock) {
else if (PortP->Store || PortP->Lock) { rio_dprintk(RIO_DEBUG_PARAM, "OPEN: Restoring stored/locked params\n");
rio_dprintk (RIO_DEBUG_PARAM, "OPEN: Restoring stored/locked params\n");
TtyP->tm.c_iflag = PortP->StoredTty.iflag; TtyP->tm.c_iflag = PortP->StoredTty.iflag;
TtyP->tm.c_oflag = PortP->StoredTty.oflag; TtyP->tm.c_oflag = PortP->StoredTty.oflag;
TtyP->tm.c_cflag = PortP->StoredTty.cflag; TtyP->tm.c_cflag = PortP->StoredTty.cflag;
@@ -222,230 +219,222 @@ int SleepFlag;
} }
/* /*
** wait for space ** wait for space
*/ */
while ( !(res=can_add_transmit(&PacketP,PortP)) || while (!(res = can_add_transmit(&PacketP, PortP)) || (PortP->InUse != NOT_INUSE)) {
(PortP->InUse != NOT_INUSE) ) { if (retries-- <= 0) {
if (retries -- <= 0) {
break; break;
} }
if ( PortP->InUse != NOT_INUSE ) { if (PortP->InUse != NOT_INUSE) {
rio_dprintk (RIO_DEBUG_PARAM, "Port IN_USE for pre-emptive command\n"); rio_dprintk(RIO_DEBUG_PARAM, "Port IN_USE for pre-emptive command\n");
} }
if ( !res ) { if (!res) {
rio_dprintk (RIO_DEBUG_PARAM, "Port has no space on transmit queue\n"); rio_dprintk(RIO_DEBUG_PARAM, "Port has no space on transmit queue\n");
} }
if ( SleepFlag != OK_TO_SLEEP ) { if (SleepFlag != OK_TO_SLEEP) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
func_exit(); func_exit();
return RIO_FAIL; return RIO_FAIL;
} }
rio_dprintk (RIO_DEBUG_PARAM, "wait for can_add_transmit\n"); rio_dprintk(RIO_DEBUG_PARAM, "wait for can_add_transmit\n");
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
retval = RIODelay(PortP, HUNDRED_MS); retval = RIODelay(PortP, HUNDRED_MS);
rio_spin_lock_irqsave( &PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (retval == RIO_FAIL) { if (retval == RIO_FAIL) {
rio_dprintk (RIO_DEBUG_PARAM, "wait for can_add_transmit broken by signal\n"); rio_dprintk(RIO_DEBUG_PARAM, "wait for can_add_transmit broken by signal\n");
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
pseterr(EINTR); pseterr(EINTR);
func_exit(); func_exit();
return RIO_FAIL; return RIO_FAIL;
} }
if ( PortP->State & RIO_DELETED ) { if (PortP->State & RIO_DELETED) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
func_exit (); func_exit();
return RIO_SUCCESS; return RIO_SUCCESS;
} }
} }
if (!res) { if (!res) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
func_exit (); func_exit();
return RIO_FAIL; return RIO_FAIL;
} }
rio_dprintk (RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n",res); rio_dprintk(RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n", res);
rio_dprintk (RIO_DEBUG_PARAM, "Packet is 0x%x\n",(int) PacketP); rio_dprintk(RIO_DEBUG_PARAM, "Packet is 0x%x\n", (int) PacketP);
phb_param_ptr = (struct phb_param *)PacketP->data; phb_param_ptr = (struct phb_param *) PacketP->data;
#if 0 #if 0
/* /*
** COR 1 ** COR 1
*/ */
if ( TtyP->tm.c_iflag & INPCK ) { if (TtyP->tm.c_iflag & INPCK) {
rio_dprintk (RIO_DEBUG_PARAM, "Parity checking on input enabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Parity checking on input enabled\n");
Cor1 |= COR1_INPCK; Cor1 |= COR1_INPCK;
} }
#endif #endif
switch ( TtyP->termios->c_cflag & CSIZE ) { switch (TtyP->termios->c_cflag & CSIZE) {
case CS5: case CS5:
{ {
rio_dprintk (RIO_DEBUG_PARAM, "5 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "5 bit data\n");
Cor1 |= COR1_5BITS; Cor1 |= COR1_5BITS;
break; break;
} }
case CS6: case CS6:
{ {
rio_dprintk (RIO_DEBUG_PARAM, "6 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "6 bit data\n");
Cor1 |= COR1_6BITS; Cor1 |= COR1_6BITS;
break; break;
} }
case CS7: case CS7:
{ {
rio_dprintk (RIO_DEBUG_PARAM, "7 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "7 bit data\n");
Cor1 |= COR1_7BITS; Cor1 |= COR1_7BITS;
break; break;
} }
case CS8: case CS8:
{ {
rio_dprintk (RIO_DEBUG_PARAM, "8 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "8 bit data\n");
Cor1 |= COR1_8BITS; Cor1 |= COR1_8BITS;
break; break;
} }
} }
if ( TtyP->termios->c_cflag & CSTOPB ) { if (TtyP->termios->c_cflag & CSTOPB) {
rio_dprintk (RIO_DEBUG_PARAM, "2 stop bits\n"); rio_dprintk(RIO_DEBUG_PARAM, "2 stop bits\n");
Cor1 |= COR1_2STOP; Cor1 |= COR1_2STOP;
} } else {
else { rio_dprintk(RIO_DEBUG_PARAM, "1 stop bit\n");
rio_dprintk (RIO_DEBUG_PARAM, "1 stop bit\n");
Cor1 |= COR1_1STOP; Cor1 |= COR1_1STOP;
} }
if ( TtyP->termios->c_cflag & PARENB ) { if (TtyP->termios->c_cflag & PARENB) {
rio_dprintk (RIO_DEBUG_PARAM, "Enable parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable parity\n");
Cor1 |= COR1_NORMAL; Cor1 |= COR1_NORMAL;
} } else {
else { rio_dprintk(RIO_DEBUG_PARAM, "Disable parity\n");
rio_dprintk (RIO_DEBUG_PARAM, "Disable parity\n");
Cor1 |= COR1_NOP; Cor1 |= COR1_NOP;
} }
if ( TtyP->termios->c_cflag & PARODD ) { if (TtyP->termios->c_cflag & PARODD) {
rio_dprintk (RIO_DEBUG_PARAM, "Odd parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Odd parity\n");
Cor1 |= COR1_ODD; Cor1 |= COR1_ODD;
} } else {
else { rio_dprintk(RIO_DEBUG_PARAM, "Even parity\n");
rio_dprintk (RIO_DEBUG_PARAM, "Even parity\n"); Cor1 |= COR1_EVEN;
Cor1 |= COR1_EVEN;
} }
/* /*
** COR 2 ** COR 2
*/ */
if ( TtyP->termios->c_iflag & IXON ) { if (TtyP->termios->c_iflag & IXON) {
rio_dprintk (RIO_DEBUG_PARAM, "Enable start/stop output control\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop output control\n");
Cor2 |= COR2_IXON; Cor2 |= COR2_IXON;
} } else {
else { if (PortP->Config & RIO_IXON) {
if ( PortP->Config & RIO_IXON ) { rio_dprintk(RIO_DEBUG_PARAM, "Force enable start/stop output control\n");
rio_dprintk (RIO_DEBUG_PARAM, "Force enable start/stop output control\n");
Cor2 |= COR2_IXON; Cor2 |= COR2_IXON;
} } else
else rio_dprintk(RIO_DEBUG_PARAM, "IXON has been disabled.\n");
rio_dprintk (RIO_DEBUG_PARAM, "IXON has been disabled.\n");
} }
if (TtyP->termios->c_iflag & IXANY) { if (TtyP->termios->c_iflag & IXANY) {
if ( PortP->Config & RIO_IXANY ) { if (PortP->Config & RIO_IXANY) {
rio_dprintk (RIO_DEBUG_PARAM, "Enable any key to restart output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable any key to restart output\n");
Cor2 |= COR2_IXANY; Cor2 |= COR2_IXANY;
} } else
else rio_dprintk(RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n");
rio_dprintk (RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n");
} }
if ( TtyP->termios->c_iflag & IXOFF ) { if (TtyP->termios->c_iflag & IXOFF) {
rio_dprintk (RIO_DEBUG_PARAM, "Enable start/stop input control 2\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop input control 2\n");
Cor2 |= COR2_IXOFF; Cor2 |= COR2_IXOFF;
} }
if ( TtyP->termios->c_cflag & HUPCL ) { if (TtyP->termios->c_cflag & HUPCL) {
rio_dprintk (RIO_DEBUG_PARAM, "Hangup on last close\n"); rio_dprintk(RIO_DEBUG_PARAM, "Hangup on last close\n");
Cor2 |= COR2_HUPCL; Cor2 |= COR2_HUPCL;
} }
if ( C_CRTSCTS (TtyP)) { if (C_CRTSCTS(TtyP)) {
rio_dprintk (RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n");
Cor2 |= COR2_CTSFLOW; Cor2 |= COR2_CTSFLOW;
Cor2 |= COR2_RTSFLOW; Cor2 |= COR2_RTSFLOW;
} else { } else {
rio_dprintk (RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n");
Cor2 &= ~COR2_CTSFLOW; Cor2 &= ~COR2_CTSFLOW;
Cor2 &= ~COR2_RTSFLOW; Cor2 &= ~COR2_RTSFLOW;
} }
if ( TtyP->termios->c_cflag & CLOCAL ) { if (TtyP->termios->c_cflag & CLOCAL) {
rio_dprintk (RIO_DEBUG_PARAM, "Local line\n"); rio_dprintk(RIO_DEBUG_PARAM, "Local line\n");
} } else {
else { rio_dprintk(RIO_DEBUG_PARAM, "Possible Modem line\n");
rio_dprintk (RIO_DEBUG_PARAM, "Possible Modem line\n");
} }
/* /*
** COR 4 (there is no COR 3) ** COR 4 (there is no COR 3)
*/ */
if ( TtyP->termios->c_iflag & IGNBRK ) { if (TtyP->termios->c_iflag & IGNBRK) {
rio_dprintk (RIO_DEBUG_PARAM, "Ignore break condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore break condition\n");
Cor4 |= COR4_IGNBRK; Cor4 |= COR4_IGNBRK;
} }
if ( !(TtyP->termios->c_iflag & BRKINT) ) { if (!(TtyP->termios->c_iflag & BRKINT)) {
rio_dprintk (RIO_DEBUG_PARAM, "Break generates NULL condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Break generates NULL condition\n");
Cor4 |= COR4_NBRKINT; Cor4 |= COR4_NBRKINT;
} else { } else {
rio_dprintk (RIO_DEBUG_PARAM, "Interrupt on break condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Interrupt on break condition\n");
} }
if ( TtyP->termios->c_iflag & INLCR ) { if (TtyP->termios->c_iflag & INLCR) {
rio_dprintk (RIO_DEBUG_PARAM, "Map newline to carriage return on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage return on input\n");
Cor4 |= COR4_INLCR; Cor4 |= COR4_INLCR;
} }
if ( TtyP->termios->c_iflag & IGNCR ) { if (TtyP->termios->c_iflag & IGNCR) {
rio_dprintk (RIO_DEBUG_PARAM, "Ignore carriage return on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore carriage return on input\n");
Cor4 |= COR4_IGNCR; Cor4 |= COR4_IGNCR;
} }
if ( TtyP->termios->c_iflag & ICRNL ) { if (TtyP->termios->c_iflag & ICRNL) {
rio_dprintk (RIO_DEBUG_PARAM, "Map carriage return to newline on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on input\n");
Cor4 |= COR4_ICRNL; Cor4 |= COR4_ICRNL;
} }
if ( TtyP->termios->c_iflag & IGNPAR ) { if (TtyP->termios->c_iflag & IGNPAR) {
rio_dprintk (RIO_DEBUG_PARAM, "Ignore characters with parity errors\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore characters with parity errors\n");
Cor4 |= COR4_IGNPAR; Cor4 |= COR4_IGNPAR;
} }
if ( TtyP->termios->c_iflag & PARMRK ) { if (TtyP->termios->c_iflag & PARMRK) {
rio_dprintk (RIO_DEBUG_PARAM, "Mark parity errors\n"); rio_dprintk(RIO_DEBUG_PARAM, "Mark parity errors\n");
Cor4 |= COR4_PARMRK; Cor4 |= COR4_PARMRK;
} }
/* /*
** Set the RAISEMOD flag to ensure that the modem lines are raised ** Set the RAISEMOD flag to ensure that the modem lines are raised
** on reception of a config packet. ** on reception of a config packet.
** The download code handles the zero baud condition. ** The download code handles the zero baud condition.
*/ */
Cor4 |= COR4_RAISEMOD; Cor4 |= COR4_RAISEMOD;
/* /*
** COR 5 ** COR 5
*/ */
Cor5 = COR5_CMOE; Cor5 = COR5_CMOE;
/* /*
** Set to monitor tbusy/tstop (or not). ** Set to monitor tbusy/tstop (or not).
*/ */
if (PortP->MonitorTstate) if (PortP->MonitorTstate)
Cor5 |= COR5_TSTATE_ON; Cor5 |= COR5_TSTATE_ON;
@@ -453,182 +442,195 @@ int SleepFlag;
Cor5 |= COR5_TSTATE_OFF; Cor5 |= COR5_TSTATE_OFF;
/* /*
** Could set LNE here if you wanted LNext processing. SVR4 will use it. ** Could set LNE here if you wanted LNext processing. SVR4 will use it.
*/ */
if ( TtyP->termios->c_iflag & ISTRIP ) { if (TtyP->termios->c_iflag & ISTRIP) {
rio_dprintk (RIO_DEBUG_PARAM, "Strip input characters\n"); rio_dprintk(RIO_DEBUG_PARAM, "Strip input characters\n");
if (! (PortP->State & RIO_TRIAD_MODE)) { if (!(PortP->State & RIO_TRIAD_MODE)) {
Cor5 |= COR5_ISTRIP; Cor5 |= COR5_ISTRIP;
} }
} }
if ( TtyP->termios->c_oflag & ONLCR ) { if (TtyP->termios->c_oflag & ONLCR) {
rio_dprintk (RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n");
if ( PortP->CookMode == COOK_MEDIUM ) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_ONLCR; Cor5 |= COR5_ONLCR;
} }
if ( TtyP->termios->c_oflag & OCRNL ) { if (TtyP->termios->c_oflag & OCRNL) {
rio_dprintk (RIO_DEBUG_PARAM, "Map carriage return to newline on output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on output\n");
if ( PortP->CookMode == COOK_MEDIUM ) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_OCRNL; Cor5 |= COR5_OCRNL;
} }
if ( ( TtyP->termios->c_oflag & TABDLY) == TAB3 ) { if ((TtyP->termios->c_oflag & TABDLY) == TAB3) {
rio_dprintk (RIO_DEBUG_PARAM, "Tab delay 3 set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Tab delay 3 set\n");
if ( PortP->CookMode == COOK_MEDIUM ) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_TAB3; Cor5 |= COR5_TAB3;
} }
/* /*
** Flow control bytes. ** Flow control bytes.
*/ */
TxXon = TtyP->termios->c_cc[VSTART]; TxXon = TtyP->termios->c_cc[VSTART];
TxXoff = TtyP->termios->c_cc[VSTOP]; TxXoff = TtyP->termios->c_cc[VSTOP];
RxXon = TtyP->termios->c_cc[VSTART]; RxXon = TtyP->termios->c_cc[VSTART];
RxXoff = TtyP->termios->c_cc[VSTOP]; RxXoff = TtyP->termios->c_cc[VSTOP];
/* /*
** LNEXT byte ** LNEXT byte
*/ */
LNext = 0; LNext = 0;
/* /*
** Baud rate bytes ** Baud rate bytes
*/ */
rio_dprintk (RIO_DEBUG_PARAM, "Mapping of rx/tx baud %x (%x)\n", rio_dprintk(RIO_DEBUG_PARAM, "Mapping of rx/tx baud %x (%x)\n", TtyP->termios->c_cflag, CBAUD);
TtyP->termios->c_cflag, CBAUD);
switch (TtyP->termios->c_cflag & CBAUD) { switch (TtyP->termios->c_cflag & CBAUD) {
#define e(b) case B ## b : RxBaud = TxBaud = RIO_B ## b ;break #define e(b) case B ## b : RxBaud = TxBaud = RIO_B ## b ;break
e(50);e(75);e(110);e(134);e(150);e(200);e(300);e(600);e(1200); e(50);
e(1800);e(2400);e(4800);e(9600);e(19200);e(38400);e(57600); e(75);
e(115200); /* e(230400);e(460800); e(921600); */ e(110);
e(134);
e(150);
e(200);
e(300);
e(600);
e(1200);
e(1800);
e(2400);
e(4800);
e(9600);
e(19200);
e(38400);
e(57600);
e(115200); /* e(230400);e(460800); e(921600); */
} }
/* XXX MIssing conversion table. XXX */ /* XXX MIssing conversion table. XXX */
/* (TtyP->termios->c_cflag & V_CBAUD); */ /* (TtyP->termios->c_cflag & V_CBAUD); */
rio_dprintk (RIO_DEBUG_PARAM, "tx baud 0x%x, rx baud 0x%x\n", TxBaud, RxBaud); rio_dprintk(RIO_DEBUG_PARAM, "tx baud 0x%x, rx baud 0x%x\n", TxBaud, RxBaud);
/* /*
** Leftovers ** Leftovers
*/ */
if ( TtyP->termios->c_cflag & CREAD ) if (TtyP->termios->c_cflag & CREAD)
rio_dprintk (RIO_DEBUG_PARAM, "Enable receiver\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable receiver\n");
#ifdef RCV1EN #ifdef RCV1EN
if ( TtyP->termios->c_cflag & RCV1EN ) if (TtyP->termios->c_cflag & RCV1EN)
rio_dprintk (RIO_DEBUG_PARAM, "RCV1EN (?)\n"); rio_dprintk(RIO_DEBUG_PARAM, "RCV1EN (?)\n");
#endif #endif
#ifdef XMT1EN #ifdef XMT1EN
if ( TtyP->termios->c_cflag & XMT1EN ) if (TtyP->termios->c_cflag & XMT1EN)
rio_dprintk (RIO_DEBUG_PARAM, "XMT1EN (?)\n"); rio_dprintk(RIO_DEBUG_PARAM, "XMT1EN (?)\n");
#endif #endif
#if 0 #if 0
if ( TtyP->termios->c_cflag & LOBLK ) if (TtyP->termios->c_cflag & LOBLK)
rio_dprintk (RIO_DEBUG_PARAM, "LOBLK - JCL output blocks when not current\n"); rio_dprintk(RIO_DEBUG_PARAM, "LOBLK - JCL output blocks when not current\n");
#endif #endif
if ( TtyP->termios->c_lflag & ISIG ) if (TtyP->termios->c_lflag & ISIG)
rio_dprintk (RIO_DEBUG_PARAM, "Input character signal generating enabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Input character signal generating enabled\n");
if ( TtyP->termios->c_lflag & ICANON ) if (TtyP->termios->c_lflag & ICANON)
rio_dprintk (RIO_DEBUG_PARAM, "Canonical input: erase and kill enabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Canonical input: erase and kill enabled\n");
if ( TtyP->termios->c_lflag & XCASE ) if (TtyP->termios->c_lflag & XCASE)
rio_dprintk (RIO_DEBUG_PARAM, "Canonical upper/lower presentation\n"); rio_dprintk(RIO_DEBUG_PARAM, "Canonical upper/lower presentation\n");
if ( TtyP->termios->c_lflag & ECHO ) if (TtyP->termios->c_lflag & ECHO)
rio_dprintk (RIO_DEBUG_PARAM, "Enable input echo\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable input echo\n");
if ( TtyP->termios->c_lflag & ECHOE ) if (TtyP->termios->c_lflag & ECHOE)
rio_dprintk (RIO_DEBUG_PARAM, "Enable echo erase\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable echo erase\n");
if ( TtyP->termios->c_lflag & ECHOK ) if (TtyP->termios->c_lflag & ECHOK)
rio_dprintk (RIO_DEBUG_PARAM, "Enable echo kill\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable echo kill\n");
if ( TtyP->termios->c_lflag & ECHONL ) if (TtyP->termios->c_lflag & ECHONL)
rio_dprintk (RIO_DEBUG_PARAM, "Enable echo newline\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable echo newline\n");
if ( TtyP->termios->c_lflag & NOFLSH ) if (TtyP->termios->c_lflag & NOFLSH)
rio_dprintk (RIO_DEBUG_PARAM, "Disable flush after interrupt or quit\n"); rio_dprintk(RIO_DEBUG_PARAM, "Disable flush after interrupt or quit\n");
#ifdef TOSTOP #ifdef TOSTOP
if ( TtyP->termios->c_lflag & TOSTOP ) if (TtyP->termios->c_lflag & TOSTOP)
rio_dprintk (RIO_DEBUG_PARAM, "Send SIGTTOU for background output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Send SIGTTOU for background output\n");
#endif #endif
#ifdef XCLUDE #ifdef XCLUDE
if ( TtyP->termios->c_lflag & XCLUDE ) if (TtyP->termios->c_lflag & XCLUDE)
rio_dprintk (RIO_DEBUG_PARAM, "Exclusive use of this line\n"); rio_dprintk(RIO_DEBUG_PARAM, "Exclusive use of this line\n");
#endif #endif
if ( TtyP->termios->c_iflag & IUCLC ) if (TtyP->termios->c_iflag & IUCLC)
rio_dprintk (RIO_DEBUG_PARAM, "Map uppercase to lowercase on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map uppercase to lowercase on input\n");
if ( TtyP->termios->c_oflag & OPOST ) if (TtyP->termios->c_oflag & OPOST)
rio_dprintk (RIO_DEBUG_PARAM, "Enable output post-processing\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable output post-processing\n");
if ( TtyP->termios->c_oflag & OLCUC ) if (TtyP->termios->c_oflag & OLCUC)
rio_dprintk (RIO_DEBUG_PARAM, "Map lowercase to uppercase on output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map lowercase to uppercase on output\n");
if ( TtyP->termios->c_oflag & ONOCR ) if (TtyP->termios->c_oflag & ONOCR)
rio_dprintk (RIO_DEBUG_PARAM, "No carriage return output at column 0\n"); rio_dprintk(RIO_DEBUG_PARAM, "No carriage return output at column 0\n");
if ( TtyP->termios->c_oflag & ONLRET ) if (TtyP->termios->c_oflag & ONLRET)
rio_dprintk (RIO_DEBUG_PARAM, "Newline performs carriage return function\n"); rio_dprintk(RIO_DEBUG_PARAM, "Newline performs carriage return function\n");
if ( TtyP->termios->c_oflag & OFILL ) if (TtyP->termios->c_oflag & OFILL)
rio_dprintk (RIO_DEBUG_PARAM, "Use fill characters for delay\n"); rio_dprintk(RIO_DEBUG_PARAM, "Use fill characters for delay\n");
if ( TtyP->termios->c_oflag & OFDEL ) if (TtyP->termios->c_oflag & OFDEL)
rio_dprintk (RIO_DEBUG_PARAM, "Fill character is DEL\n"); rio_dprintk(RIO_DEBUG_PARAM, "Fill character is DEL\n");
if ( TtyP->termios->c_oflag & NLDLY ) if (TtyP->termios->c_oflag & NLDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Newline delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Newline delay set\n");
if ( TtyP->termios->c_oflag & CRDLY ) if (TtyP->termios->c_oflag & CRDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Carriage return delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Carriage return delay set\n");
if ( TtyP->termios->c_oflag & TABDLY ) if (TtyP->termios->c_oflag & TABDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Tab delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Tab delay set\n");
#if 0 #if 0
if ( TtyP->termios->c_oflag & BSDLY ) if (TtyP->termios->c_oflag & BSDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Back-space delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Back-space delay set\n");
if ( TtyP->termios->c_oflag & VTDLY ) if (TtyP->termios->c_oflag & VTDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Vertical tab delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Vertical tab delay set\n");
if ( TtyP->termios->c_oflag & FFDLY ) if (TtyP->termios->c_oflag & FFDLY)
rio_dprintk (RIO_DEBUG_PARAM, "Form-feed delay set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Form-feed delay set\n");
#endif #endif
/* /*
** These things are kind of useful in a later life! ** These things are kind of useful in a later life!
*/ */
PortP->Cor2Copy = Cor2; PortP->Cor2Copy = Cor2;
if ( PortP->State & RIO_DELETED ) { if (PortP->State & RIO_DELETED) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
func_exit (); func_exit();
return RIO_FAIL; return RIO_FAIL;
} }
/* /*
** Actually write the info into the packet to be sent ** Actually write the info into the packet to be sent
*/ */
WBYTE(phb_param_ptr->Cmd, cmd); WBYTE(phb_param_ptr->Cmd, cmd);
WBYTE(phb_param_ptr->Cor1, Cor1); WBYTE(phb_param_ptr->Cor1, Cor1);
WBYTE(phb_param_ptr->Cor2, Cor2); WBYTE(phb_param_ptr->Cor2, Cor2);
WBYTE(phb_param_ptr->Cor4, Cor4); WBYTE(phb_param_ptr->Cor4, Cor4);
WBYTE(phb_param_ptr->Cor5, Cor5); WBYTE(phb_param_ptr->Cor5, Cor5);
WBYTE(phb_param_ptr->TxXon, TxXon); WBYTE(phb_param_ptr->TxXon, TxXon);
WBYTE(phb_param_ptr->RxXon, RxXon); WBYTE(phb_param_ptr->RxXon, RxXon);
WBYTE(phb_param_ptr->TxXoff, TxXoff); WBYTE(phb_param_ptr->TxXoff, TxXoff);
WBYTE(phb_param_ptr->RxXoff, RxXoff); WBYTE(phb_param_ptr->RxXoff, RxXoff);
WBYTE(phb_param_ptr->LNext, LNext); WBYTE(phb_param_ptr->LNext, LNext);
WBYTE(phb_param_ptr->TxBaud, TxBaud); WBYTE(phb_param_ptr->TxBaud, TxBaud);
WBYTE(phb_param_ptr->RxBaud, RxBaud); WBYTE(phb_param_ptr->RxBaud, RxBaud);
/* /*
** Set the length/command field ** Set the length/command field
*/ */
WBYTE(PacketP->len , 12 | PKT_CMD_BIT); WBYTE(PacketP->len, 12 | PKT_CMD_BIT);
/* /*
** The packet is formed - now, whack it off ** The packet is formed - now, whack it off
** to its final destination: ** to its final destination:
*/ */
add_transmit(PortP); add_transmit(PortP);
/* /*
** Count characters transmitted for port statistics reporting ** Count characters transmitted for port statistics reporting
*/ */
if (PortP->statsGather) if (PortP->statsGather)
PortP->txchars += 12; PortP->txchars += 12;
rio_spin_unlock_irqrestore( &PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
rio_dprintk (RIO_DEBUG_PARAM, "add_transmit returned.\n"); rio_dprintk(RIO_DEBUG_PARAM, "add_transmit returned.\n");
/* /*
** job done. ** job done.
*/ */
func_exit (); func_exit();
return RIO_SUCCESS; return RIO_SUCCESS;
} }
@@ -638,16 +640,15 @@ int SleepFlag;
** We can add another packet to a transmit queue if the packet pointer pointed ** We can add another packet to a transmit queue if the packet pointer pointed
** to by the TxAdd pointer has PKT_IN_USE clear in its address. ** to by the TxAdd pointer has PKT_IN_USE clear in its address.
*/ */
int int can_add_transmit(PktP, PortP)
can_add_transmit(PktP, PortP)
PKT **PktP; PKT **PktP;
struct Port *PortP; struct Port *PortP;
{ {
register PKT *tp; register PKT *tp;
*PktP = tp = (PKT *)RIO_PTR(PortP->Caddr,RWORD(*PortP->TxAdd)); *PktP = tp = (PKT *) RIO_PTR(PortP->Caddr, RWORD(*PortP->TxAdd));
return !((uint)tp & PKT_IN_USE); return !((uint) tp & PKT_IN_USE);
} }
/* /*
@@ -655,25 +656,22 @@ struct Port *PortP;
** and then move the TxAdd pointer along one position to point to the next ** and then move the TxAdd pointer along one position to point to the next
** packet pointer. You must wrap the pointer from the end back to the start. ** packet pointer. You must wrap the pointer from the end back to the start.
*/ */
void void add_transmit(PortP)
add_transmit(PortP) struct Port *PortP;
struct Port *PortP;
{ {
if (RWORD(*PortP->TxAdd) & PKT_IN_USE) { if (RWORD(*PortP->TxAdd) & PKT_IN_USE) {
rio_dprintk (RIO_DEBUG_PARAM, "add_transmit: Packet has been stolen!"); rio_dprintk(RIO_DEBUG_PARAM, "add_transmit: Packet has been stolen!");
} }
WWORD( *(ushort *)PortP->TxAdd, RWORD(*PortP->TxAdd) | PKT_IN_USE); WWORD(*(ushort *) PortP->TxAdd, RWORD(*PortP->TxAdd) | PKT_IN_USE);
PortP->TxAdd = (PortP->TxAdd == PortP->TxEnd) ? PortP->TxStart : PortP->TxAdd = (PortP->TxAdd == PortP->TxEnd) ? PortP->TxStart : PortP->TxAdd + 1;
PortP->TxAdd + 1; WWORD(PortP->PhbP->tx_add, RIO_OFF(PortP->Caddr, PortP->TxAdd));
WWORD( PortP->PhbP->tx_add , RIO_OFF(PortP->Caddr,PortP->TxAdd) );
} }
/**************************************** /****************************************
* Put a packet onto the end of the * Put a packet onto the end of the
* free list * free list
****************************************/ ****************************************/
void void put_free_end(HostP, PktP)
put_free_end(HostP, PktP)
struct Host *HostP; struct Host *HostP;
PKT *PktP; PKT *PktP;
{ {
@@ -688,24 +686,23 @@ PKT *PktP;
* *
************************************************/ ************************************************/
rio_dprintk (RIO_DEBUG_PFE, "put_free_end(PktP=%x)\n",(int)PktP); rio_dprintk(RIO_DEBUG_PFE, "put_free_end(PktP=%x)\n", (int) PktP);
if ((old_end=RWORD(HostP->ParmMapP->free_list_end)) != TPNULL) { if ((old_end = RWORD(HostP->ParmMapP->free_list_end)) != TPNULL) {
new_end = RIO_OFF(HostP->Caddr,PktP); new_end = RIO_OFF(HostP->Caddr, PktP);
tmp_pointer = (FREE_LIST *)RIO_PTR(HostP->Caddr,old_end); tmp_pointer = (FREE_LIST *) RIO_PTR(HostP->Caddr, old_end);
WWORD(tmp_pointer->next , new_end ); WWORD(tmp_pointer->next, new_end);
WWORD(((FREE_LIST *)PktP)->prev , old_end); WWORD(((FREE_LIST *) PktP)->prev, old_end);
WWORD(((FREE_LIST *)PktP)->next , TPNULL); WWORD(((FREE_LIST *) PktP)->next, TPNULL);
WWORD(HostP->ParmMapP->free_list_end, new_end); WWORD(HostP->ParmMapP->free_list_end, new_end);
} else { /* First packet on the free list this should never happen! */
rio_dprintk(RIO_DEBUG_PFE, "put_free_end(): This should never happen\n");
WWORD(HostP->ParmMapP->free_list_end, RIO_OFF(HostP->Caddr, PktP));
tmp_pointer = (FREE_LIST *) PktP;
WWORD(tmp_pointer->prev, TPNULL);
WWORD(tmp_pointer->next, TPNULL);
} }
else { /* First packet on the free list this should never happen! */ rio_dprintk(RIO_DEBUG_CMD, "Before unlock: %p\n", &HostP->HostLock);
rio_dprintk (RIO_DEBUG_PFE, "put_free_end(): This should never happen\n");
WWORD(HostP->ParmMapP->free_list_end , RIO_OFF(HostP->Caddr,PktP));
tmp_pointer = (FREE_LIST *)PktP;
WWORD(tmp_pointer->prev , TPNULL);
WWORD(tmp_pointer->next , TPNULL);
}
rio_dprintk (RIO_DEBUG_CMD, "Before unlock: %p\n", &HostP->HostLock);
rio_spin_unlock_irqrestore(&HostP->HostLock, flags); rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
} }
@@ -715,14 +712,12 @@ PKT *PktP;
** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear, ** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear,
** then can_remove_receive() returns 0. ** then can_remove_receive() returns 0.
*/ */
int int can_remove_receive(PktP, PortP)
can_remove_receive(PktP, PortP)
PKT **PktP; PKT **PktP;
struct Port *PortP; struct Port *PortP;
{ {
if ( RWORD(*PortP->RxRemove) & PKT_IN_USE) { if (RWORD(*PortP->RxRemove) & PKT_IN_USE) {
*PktP = (PKT *)RIO_PTR(PortP->Caddr, *PktP = (PKT *) RIO_PTR(PortP->Caddr, RWORD(*PortP->RxRemove) & ~PKT_IN_USE);
RWORD(*PortP->RxRemove) & ~PKT_IN_USE);
return 1; return 1;
} }
return 0; return 0;
@@ -733,12 +728,10 @@ struct Port *PortP;
** and then bump the pointers. Once the pointers get to the end, they must ** and then bump the pointers. Once the pointers get to the end, they must
** be wrapped back to the start. ** be wrapped back to the start.
*/ */
void void remove_receive(PortP)
remove_receive(PortP) struct Port *PortP;
struct Port *PortP;
{ {
WWORD( *PortP->RxRemove, RWORD(*PortP->RxRemove) & ~PKT_IN_USE ); WWORD(*PortP->RxRemove, RWORD(*PortP->RxRemove) & ~PKT_IN_USE);
PortP->RxRemove = (PortP->RxRemove == PortP->RxEnd) ? PortP->RxStart : PortP->RxRemove = (PortP->RxRemove == PortP->RxEnd) ? PortP->RxStart : PortP->RxRemove + 1;
PortP->RxRemove + 1; WWORD(PortP->PhbP->rx_remove, RIO_OFF(PortP->Caddr, PortP->RxRemove));
WWORD( PortP->PhbP->rx_remove , RIO_OFF(PortP->Caddr, PortP->RxRemove) );
} }

View File

@@ -1,8 +1,8 @@
/* Yeah. We have copyright on this one. Sure. */ /* Yeah. We have copyright on this one. Sure. */
void rio_pcicopy( char *from, char *to, int amount) void rio_pcicopy(char *from, char *to, int amount)
{ {
while ( amount-- ) while (amount--)
*to++ = *from++; *to++ = *from++;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -47,9 +47,8 @@ static char *_riospace_h_sccs_ = "@(#)riospace.h 1.2";
** In particular, it won't be able to see changes to RIO_SLOTS ** In particular, it won't be able to see changes to RIO_SLOTS
*/ */
struct Conf struct Conf {
{ char Locator[24];
char Locator[24];
unsigned int StartupTime; unsigned int StartupTime;
unsigned int SlowCook; unsigned int SlowCook;
unsigned int IntrPollTime; unsigned int IntrPollTime;
@@ -59,8 +58,8 @@ struct Conf
unsigned int HostLoadBase; unsigned int HostLoadBase;
unsigned int XpHz; unsigned int XpHz;
unsigned int XpCps; unsigned int XpCps;
char *XpOn; char *XpOn;
char *XpOff; char *XpOff;
unsigned int MaxXpCps; unsigned int MaxXpCps;
unsigned int MinXpCps; unsigned int MinXpCps;
unsigned int SpinCmds; unsigned int SpinCmds;
@@ -74,7 +73,7 @@ struct Conf
/* /*
** Board types - these MUST correspond to product codes! ** Board types - these MUST correspond to product codes!
*/ */
#define RIO_EMPTY 0x0 #define RIO_EMPTY 0x0
#define RIO_EISA 0x3 #define RIO_EISA 0x3
#define RIO_RTA_16 0x9 #define RIO_RTA_16 0x9
@@ -86,18 +85,16 @@ struct Conf
/* /*
** Board data structure. This is used for configuration info ** Board data structure. This is used for configuration info
*/ */
struct Brd struct Brd {
{ unsigned char Type; /* RIO_EISA, RIO_MCA, RIO_AT, RIO_EMPTY... */
unsigned char Type; /* RIO_EISA, RIO_MCA, RIO_AT, RIO_EMPTY... */ unsigned char Ivec; /* POLLED or ivec number */
unsigned char Ivec; /* POLLED or ivec number */ unsigned char Mode; /* Control stuff, see below */
unsigned char Mode; /* Control stuff, see below */
}; };
struct Board struct Board {
{ char Locator[RIO_LOCATOR_LEN];
char Locator[RIO_LOCATOR_LEN]; int NumSlots;
int NumSlots; struct Brd Boards[MAX_RIO_BOARDS];
struct Brd Boards[MAX_RIO_BOARDS];
}; };
#define BOOT_FROM_LINK 0x00 #define BOOT_FROM_LINK 0x00
@@ -158,4 +155,4 @@ struct Board
#define DBG_ALWAYS 0x80000000 #define DBG_ALWAYS 0x80000000
#endif /* __rio_riospace_h__ */ #endif /* __rio_riospace_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -40,7 +40,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_riotime_h_sccs = "@(#)riotime.h 1.1" ; static char *_rio_riotime_h_sccs = "@(#)riotime.h 1.1";
#endif #endif
#endif #endif
@@ -52,7 +52,7 @@ static char *_rio_riotime_h_sccs = "@(#)riotime.h 1.1" ;
/************************************** /**************************************
* Convert a RIO tick (1/10th second) * Convert a RIO tick (1/10th second)
* into transputer low priority ticks * into transputer low priority ticks
*************************************/ *************************************/
#define RioTimeToLow(time) (time*(100000 / 64)) #define RioTimeToLow(time) (time*(100000 / 64))
#define RioLowToTime(time) ((time*64)/100000) #define RioLowToTime(time) ((time*64)/100000)

File diff suppressed because it is too large Load Diff

View File

@@ -89,47 +89,46 @@ typedef RIO_POINTER u_short_ptr;
typedef RIO_POINTER ushort_ptr; typedef RIO_POINTER ushort_ptr;
#endif #endif
#else /* not INKERNEL */ #else /* not INKERNEL */
typedef unsigned char BYTE; typedef unsigned char BYTE;
typedef unsigned short WORD; typedef unsigned short WORD;
typedef unsigned long DWORD; typedef unsigned long DWORD;
typedef short NUMBER; typedef short NUMBER;
typedef short *NUMBER_ptr; typedef short *NUMBER_ptr;
typedef unsigned short *WORD_ptr; typedef unsigned short *WORD_ptr;
typedef unsigned char *BYTE_ptr; typedef unsigned char *BYTE_ptr;
typedef unsigned char uchar ; typedef unsigned char uchar;
typedef unsigned short ushort ; typedef unsigned short ushort;
typedef unsigned int uint ; typedef unsigned int uint;
typedef unsigned long ulong ; typedef unsigned long ulong;
typedef unsigned char u_char ; typedef unsigned char u_char;
typedef unsigned short u_short ; typedef unsigned short u_short;
typedef unsigned int u_int ; typedef unsigned int u_int;
typedef unsigned long u_long ; typedef unsigned long u_long;
typedef unsigned short ERROR ; typedef unsigned short ERROR;
typedef unsigned long ID ; typedef unsigned long ID;
typedef char *char_ptr; typedef char *char_ptr;
typedef Channel *Channel_ptr; typedef Channel *Channel_ptr;
typedef struct FREE_LIST *FREE_LIST_ptr; typedef struct FREE_LIST *FREE_LIST_ptr;
typedef struct FREE_LIST **FREE_LIST_ptr_ptr; typedef struct FREE_LIST **FREE_LIST_ptr_ptr;
typedef struct LPB *LPB_ptr; typedef struct LPB *LPB_ptr;
typedef struct Process *Process_ptr; typedef struct Process *Process_ptr;
typedef struct PHB *PHB_ptr; typedef struct PHB *PHB_ptr;
typedef struct PKT *PKT_ptr; typedef struct PKT *PKT_ptr;
typedef struct PKT **PKT_ptr_ptr; typedef struct PKT **PKT_ptr_ptr;
typedef struct Q_BUF *Q_BUF_ptr; typedef struct Q_BUF *Q_BUF_ptr;
typedef struct Q_BUF **Q_BUF_ptr_ptr; typedef struct Q_BUF **Q_BUF_ptr_ptr;
typedef struct ROUTE_STR *ROUTE_STR_ptr; typedef struct ROUTE_STR *ROUTE_STR_ptr;
typedef struct RUP *RUP_ptr; typedef struct RUP *RUP_ptr;
typedef short *short_ptr; typedef short *short_ptr;
typedef u_short *u_short_ptr; typedef u_short *u_short_ptr;
typedef ushort *ushort_ptr; typedef ushort *ushort_ptr;
typedef struct PKT PKT; typedef struct PKT PKT;
typedef struct LPB LPB; typedef struct LPB LPB;
typedef struct RUP RUP; typedef struct RUP RUP;
#endif #endif
#endif /* __riotypes__ */ #endif /* __riotypes__ */
/*********** end of file ***********/ /*********** end of file ***********/

File diff suppressed because it is too large Load Diff

View File

@@ -60,4 +60,4 @@ static char *_riscos_h_sccs_ = "@(#)riscos.h 1.2";
#define RINDW(A) (*(ushort *)(A)) #define RINDW(A) (*(ushort *)(A))
#define WINDW(A,V) (*(ushort *)(A)=(ushort)(V)) #define WINDW(A,V) (*(ushort *)(A)=(ushort)(V))
#endif /* __rio_riscos_h__ */ #endif /* __rio_riscos_h__ */

View File

@@ -39,19 +39,19 @@
#ifndef lint #ifndef lint
#ifdef SCCS #ifdef SCCS
static char *_rio_rom_h_sccs = "@(#)rom.h 1.1" ; static char *_rio_rom_h_sccs = "@(#)rom.h 1.1";
#endif #endif
#endif #endif
typedef struct ROM ROM ; typedef struct ROM ROM;
struct ROM { struct ROM {
u_short slx ; u_short slx;
char pcb_letter_rev ; char pcb_letter_rev;
char pcb_number_rev ; char pcb_number_rev;
char serial[4] ; char serial[4];
char year ; char year;
char week ; char week;
} ; };
#endif #endif
@@ -60,5 +60,3 @@ struct ROM {
#define ROM_LENGTH 0x20 #define ROM_LENGTH 0x20
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -44,26 +44,26 @@
#endif #endif
#define MAX_LINKS 4 #define MAX_LINKS 4
#define MAX_NODES 17 /* Maximum nodes in a subnet */ #define MAX_NODES 17 /* Maximum nodes in a subnet */
#define NODE_BYTES ((MAX_NODES / 8) + 1) /* Number of bytes needed for #define NODE_BYTES ((MAX_NODES / 8) + 1) /* Number of bytes needed for
1 bit per node */ 1 bit per node */
#define ROUTE_DATA_SIZE (NODE_BYTES + 2) /* Number of bytes for complete #define ROUTE_DATA_SIZE (NODE_BYTES + 2) /* Number of bytes for complete
info about cost etc. */ info about cost etc. */
#define ROUTES_PER_PACKET ((PKT_MAX_DATA_LEN -2)/ ROUTE_DATA_SIZE) #define ROUTES_PER_PACKET ((PKT_MAX_DATA_LEN -2)/ ROUTE_DATA_SIZE)
/* Number of nodes we can squeeze /* Number of nodes we can squeeze
into one packet */ into one packet */
#define MAX_TOPOLOGY_PACKETS (MAX_NODES / ROUTES_PER_PACKET + 1) #define MAX_TOPOLOGY_PACKETS (MAX_NODES / ROUTES_PER_PACKET + 1)
/************************************************ /************************************************
* Define the types of command for the ROUTE RUP. * Define the types of command for the ROUTE RUP.
************************************************/ ************************************************/
#define ROUTE_REQUEST 0 /* Request an ID */ #define ROUTE_REQUEST 0 /* Request an ID */
#define ROUTE_FOAD 1 /* Kill the RTA */ #define ROUTE_FOAD 1 /* Kill the RTA */
#define ROUTE_ALREADY 2 /* ID given already */ #define ROUTE_ALREADY 2 /* ID given already */
#define ROUTE_USED 3 /* All ID's used */ #define ROUTE_USED 3 /* All ID's used */
#define ROUTE_ALLOCATE 4 /* Here it is */ #define ROUTE_ALLOCATE 4 /* Here it is */
#define ROUTE_REQ_TOP 5 /* I bet you didn't expect.... #define ROUTE_REQ_TOP 5 /* I bet you didn't expect....
the Topological Inquisition */ the Topological Inquisition */
#define ROUTE_TOPOLOGY 6 /* Topology request answered FD */ #define ROUTE_TOPOLOGY 6 /* Topology request answered FD */
/******************************************************************* /*******************************************************************
* Define the Route Map Structure * Define the Route Map Structure
* *
@@ -72,22 +72,22 @@
******************************************************************/ ******************************************************************/
typedef struct COST_ROUTE COST_ROUTE; typedef struct COST_ROUTE COST_ROUTE;
struct COST_ROUTE { struct COST_ROUTE {
unsigned char cost; /* Cost down this link */ unsigned char cost; /* Cost down this link */
unsigned char route[NODE_BYTES]; /* Nodes thorough this route */ unsigned char route[NODE_BYTES]; /* Nodes thorough this route */
} ; };
typedef struct ROUTE_STR ROUTE_STR ; typedef struct ROUTE_STR ROUTE_STR;
struct ROUTE_STR { struct ROUTE_STR {
COST_ROUTE cost_route[MAX_LINKS]; COST_ROUTE cost_route[MAX_LINKS];
/* cost / route for this link */ /* cost / route for this link */
ushort favoured; /* favoured link */ ushort favoured; /* favoured link */
} ; };
#define NO_LINK (short) 5 /* Link unattached */ #define NO_LINK (short) 5 /* Link unattached */
#define ROUTE_NO_ID (short) 100 /* No Id */ #define ROUTE_NO_ID (short) 100 /* No Id */
#define ROUTE_DISCONNECT (ushort) 0xff /* Not connected */ #define ROUTE_DISCONNECT (ushort) 0xff /* Not connected */
#define ROUTE_INTERCONNECT (ushort) 0x40 /* Sub-net interconnect */ #define ROUTE_INTERCONNECT (ushort) 0x40 /* Sub-net interconnect */
#define SYNC_RUP (ushort) 255 #define SYNC_RUP (ushort) 255
@@ -99,10 +99,9 @@ struct ROUTE_STR {
#define STATUS_RUP (ushort) 249 #define STATUS_RUP (ushort) 249
#define POWER_RUP (ushort) 248 #define POWER_RUP (ushort) 248
#define HIGHEST_RUP (ushort) 255 /* Set to Top one */ #define HIGHEST_RUP (ushort) 255 /* Set to Top one */
#define LOWEST_RUP (ushort) 248 /* Set to bottom one */ #define LOWEST_RUP (ushort) 248 /* Set to bottom one */
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -37,7 +37,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
static char *_rio_rtahw_h_sccs = "@(#)rtahw.h 1.5" ; static char *_rio_rtahw_h_sccs = "@(#)rtahw.h 1.5";
#endif #endif
#endif #endif
@@ -58,12 +58,12 @@ static char *_rio_rtahw_h_sccs = "@(#)rtahw.h 1.5" ;
** Define the different types of modules we can have ** Define the different types of modules we can have
*/ */
enum module { enum module {
MOD_BLANK = 0x0f, /* Blank plate attached */ MOD_BLANK = 0x0f, /* Blank plate attached */
MOD_RS232DB25 = 0x00, /* RS232 DB25 connector */ MOD_RS232DB25 = 0x00, /* RS232 DB25 connector */
MOD_RS232RJ45 = 0x01, /* RS232 RJ45 connector */ MOD_RS232RJ45 = 0x01, /* RS232 RJ45 connector */
MOD_RS422DB25 = 0x02, /* RS422 DB25 connector */ MOD_RS422DB25 = 0x02, /* RS422 DB25 connector */
MOD_RS485DB25 = 0x03, /* RS485 DB25 connector */ MOD_RS485DB25 = 0x03, /* RS485 DB25 connector */
MOD_PARALLEL = 0x04 /* Centronics parallel */ MOD_PARALLEL = 0x04 /* Centronics parallel */
}; };
#define TYPE_HOST 0 #define TYPE_HOST 0

View File

@@ -44,39 +44,38 @@
#endif #endif
#if defined( HOST ) || defined( INKERNEL ) #if defined( HOST ) || defined( INKERNEL )
#define MAX_RUP ((short) 16) #define MAX_RUP ((short) 16)
#endif #endif
#ifdef RTA #ifdef RTA
#define MAX_RUP ((short) 1) #define MAX_RUP ((short) 1)
#endif #endif
#define PKTS_PER_RUP ((short) 2) /* They are always used in pairs */ #define PKTS_PER_RUP ((short) 2) /* They are always used in pairs */
/************************************************* /*************************************************
* Define all the packet request stuff * Define all the packet request stuff
************************************************/ ************************************************/
#define TX_RUP_INACTIVE 0 /* Nothing to transmit */ #define TX_RUP_INACTIVE 0 /* Nothing to transmit */
#define TX_PACKET_READY 1 /* Transmit packet ready */ #define TX_PACKET_READY 1 /* Transmit packet ready */
#define TX_LOCK_RUP 2 /* Transmit side locked */ #define TX_LOCK_RUP 2 /* Transmit side locked */
#define RX_RUP_INACTIVE 0 /* Nothing received */ #define RX_RUP_INACTIVE 0 /* Nothing received */
#define RX_PACKET_READY 1 /* Packet received */ #define RX_PACKET_READY 1 /* Packet received */
#define RUP_NO_OWNER 0xff /* RUP not owned by any process */ #define RUP_NO_OWNER 0xff /* RUP not owned by any process */
struct RUP { struct RUP {
PKT_ptr txpkt; /* Outgoing packet */ PKT_ptr txpkt; /* Outgoing packet */
PKT_ptr rxpkt; /* Incoming packet */ PKT_ptr rxpkt; /* Incoming packet */
WORD link; /* Which link to send down? */ WORD link; /* Which link to send down? */
BYTE rup_dest_unit[2]; /* Destination unit */ BYTE rup_dest_unit[2]; /* Destination unit */
WORD handshake; /* For handshaking */ WORD handshake; /* For handshaking */
WORD timeout; /* Timeout */ WORD timeout; /* Timeout */
WORD status; /* Status */ WORD status; /* Status */
WORD txcontrol; /* Transmit control */ WORD txcontrol; /* Transmit control */
WORD rxcontrol; /* Receive control */ WORD rxcontrol; /* Receive control */
}; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -39,7 +39,7 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1" ; static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1";
#endif #endif
#endif #endif
@@ -48,4 +48,3 @@ static char *_rio_rupstat_h_sccs = "@(#)rupstat.h 1.1" ;
#define STATUS_TOPOLOGY 2 #define STATUS_TOPOLOGY 2
#endif #endif

View File

@@ -60,15 +60,12 @@
#define RX FALSE #define RX FALSE
typedef struct FREE_LIST FREE_LIST ; typedef struct FREE_LIST FREE_LIST;
struct FREE_LIST { struct FREE_LIST {
FREE_LIST_ptr next ; FREE_LIST_ptr next;
FREE_LIST_ptr prev ; FREE_LIST_ptr prev;
} ; };
#endif #endif
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -38,36 +38,36 @@
** selftest on a booting RTA. ** selftest on a booting RTA.
*/ */
typedef struct { typedef struct {
short magic; /* Identifies packet type */ short magic; /* Identifies packet type */
int test; /* Test number, see below */ int test; /* Test number, see below */
unsigned int result; /* Result value */ unsigned int result; /* Result value */
unsigned int dataIn; unsigned int dataIn;
unsigned int dataOut; unsigned int dataOut;
}selftestStruct; } selftestStruct;
/* /*
** The different tests are identified by the following data values. ** The different tests are identified by the following data values.
*/ */
enum test { enum test {
TESTS_COMPLETE = 0x00, TESTS_COMPLETE = 0x00,
MEMTEST_ADDR = 0x01, MEMTEST_ADDR = 0x01,
MEMTEST_BIT = 0x02, MEMTEST_BIT = 0x02,
MEMTEST_FILL = 0x03, MEMTEST_FILL = 0x03,
MEMTEST_DATABUS = 0x04, MEMTEST_DATABUS = 0x04,
MEMTEST_ADDRBUS = 0x05, MEMTEST_ADDRBUS = 0x05,
CD1400_INIT = 0x10, CD1400_INIT = 0x10,
CD1400_LOOP = 0x11, CD1400_LOOP = 0x11,
CD1400_INTERRUPT = 0x12 CD1400_INTERRUPT = 0x12
}; };
enum result { enum result {
E_PORT = 0x10, E_PORT = 0x10,
E_TX = 0x11, E_TX = 0x11,
E_RX = 0x12, E_RX = 0x12,
E_EXCEPT = 0x13, E_EXCEPT = 0x13,
E_COMPARE = 0x14, E_COMPARE = 0x14,
E_MODEM = 0x15, E_MODEM = 0x15,
E_TIMEOUT = 0x16, E_TIMEOUT = 0x16,
E_INTERRUPT = 0x17 E_INTERRUPT = 0x17
}; };
#endif /* _selftests_h_ */ #endif /* _selftests_h_ */

View File

@@ -42,4 +42,4 @@ extern int rio_bases[];
extern int rio_limits[]; extern int rio_limits[];
extern int rio_vects[]; extern int rio_vects[];
#endif /* __rio_space_h__ */ #endif /* __rio_space_h__ */

View File

@@ -37,27 +37,26 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
static char *_rio_sysmap_h_sccs = "@(#)sysmap.h 1.1" ; static char *_rio_sysmap_h_sccs = "@(#)sysmap.h 1.1";
#endif #endif
#endif #endif
#define SYSTEM_MAP_LEN 64 /* Len of System Map array */ #define SYSTEM_MAP_LEN 64 /* Len of System Map array */
typedef struct SYS_MAP SYS_MAP ; typedef struct SYS_MAP SYS_MAP;
typedef struct SYS_MAP_LINK SYS_MAP_LINK ; typedef struct SYS_MAP_LINK SYS_MAP_LINK;
struct SYS_MAP_LINK { struct SYS_MAP_LINK {
short id ; /* Unit Id */ short id; /* Unit Id */
short link ; /* Id's Link */ short link; /* Id's Link */
short been_here ; /* Used by map_gen */ short been_here; /* Used by map_gen */
} ; };
struct SYS_MAP { struct SYS_MAP {
char serial_num[4] ; char serial_num[4];
SYS_MAP_LINK link[4] ; SYS_MAP_LINK link[4];
} ; };
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -37,15 +37,14 @@
#ifndef lint #ifndef lint
#ifdef SCCS_LABELS #ifdef SCCS_LABELS
static char *_rio_defaults_h_sccs = "@(#)timeouts.h 1.3" ; static char *_rio_defaults_h_sccs = "@(#)timeouts.h 1.3";
#endif #endif
#endif #endif
#define MILLISECOND (int) (1000/64) /* 15.625 low ticks */ #define MILLISECOND (int) (1000/64) /* 15.625 low ticks */
#define SECOND (int) 15625 /* Low priority ticks */ #define SECOND (int) 15625 /* Low priority ticks */
#define TX_TIMEOUT (int) (200 * MILLISECOND) #define TX_TIMEOUT (int) (200 * MILLISECOND)
/*********** end of file ***********/ /*********** end of file ***********/

View File

@@ -40,10 +40,9 @@ static char *_top_h_sccs_ = "@(#)top.h 1.2";
/* /*
** Topology information ** Topology information
*/ */
struct Top struct Top {
{ uchar Unit;
uchar Unit; uchar Link;
uchar Link;
}; };
#endif /* __rio_top_h__ */ #endif /* __rio_top_h__ */

View File

@@ -45,11 +45,11 @@ static char *_typdef_h_sccs_ = "@(#)typdef.h 1.2";
** These types are ONLY to be used for refering to data structures ** These types are ONLY to be used for refering to data structures
** on the RIO Host card! ** on the RIO Host card!
*/ */
typedef volatile unsigned char BYTE; typedef volatile unsigned char BYTE;
typedef volatile unsigned short WORD; typedef volatile unsigned short WORD;
typedef volatile unsigned int DWORD; typedef volatile unsigned int DWORD;
typedef volatile unsigned short RIOP; typedef volatile unsigned short RIOP;
typedef volatile short NUMBER; typedef volatile short NUMBER;
/* /*
@@ -59,13 +59,13 @@ typedef volatile short NUMBER;
** are here only to make the source compile. ** are here only to make the source compile.
*/ */
/* typedef unsigned int uint; */ /* typedef unsigned int uint; */
typedef unsigned long ulong_t; typedef unsigned long ulong_t;
typedef unsigned short ushort_t; typedef unsigned short ushort_t;
typedef unsigned char uchar_t; typedef unsigned char uchar_t;
typedef unsigned char queue_t; typedef unsigned char queue_t;
typedef unsigned char mblk_t; typedef unsigned char mblk_t;
typedef unsigned int paddr_t; typedef unsigned int paddr_t;
typedef unsigned char uchar; typedef unsigned char uchar;
#define TPNULL ((ushort)(0x8000)) #define TPNULL ((ushort)(0x8000))
@@ -73,10 +73,10 @@ typedef unsigned char uchar;
/* /*
** RIO structures defined in other include files. ** RIO structures defined in other include files.
*/ */
typedef struct PKT PKT; typedef struct PKT PKT;
typedef struct LPB LPB; typedef struct LPB LPB;
typedef struct RUP RUP; typedef struct RUP RUP;
typedef struct Port Port; typedef struct Port Port;
typedef struct DpRam DpRam; typedef struct DpRam DpRam;
#endif /* __rio_typdef_h__ */ #endif /* __rio_typdef_h__ */

View File

@@ -41,16 +41,15 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2";
** UnixRup data structure. This contains pointers to actual RUPs on the ** UnixRup data structure. This contains pointers to actual RUPs on the
** host card, and all the command/boot control stuff. ** host card, and all the command/boot control stuff.
*/ */
struct UnixRup struct UnixRup {
{ struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */
struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */ struct CmdBlk *CmdPendingP; /* The command currently being sent */
struct CmdBlk *CmdPendingP; /* The command currently being sent */ struct RUP *RupP; /* the Rup to send it to */
struct RUP *RupP; /* the Rup to send it to */ uint Id; /* Id number */
uint Id; /* Id number */ uint BaseSysPort; /* SysPort of first tty on this RTA */
uint BaseSysPort; /* SysPort of first tty on this RTA */ uint ModTypes; /* Modules on this RTA */
uint ModTypes; /* Modules on this RTA */ spinlock_t RupLock; /* Lock structure for MPX */
spinlock_t RupLock; /* Lock structure for MPX */ /* struct lockb RupLock; *//* Lock structure for MPX */
/* struct lockb RupLock; */ /* Lock structure for MPX */
}; };
#endif /* __rio_unixrup_h__ */ #endif /* __rio_unixrup_h__ */