Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] rio: more header cleanup

Strip some of the typedef mess out Remove a small subset of unused defines
and the like.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Alan Cox and committed by
Linus Torvalds
74769abf 10e705f8

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