aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio')
-rw-r--r--drivers/char/rio/cirrus.h210
-rw-r--r--drivers/char/rio/rio_linux.c10
-rw-r--r--drivers/char/rio/riocmd.c19
-rw-r--r--drivers/char/rio/rioctrl.c37
-rw-r--r--drivers/char/rio/riointr.c5
-rw-r--r--drivers/char/rio/rioparam.c70
-rw-r--r--drivers/char/rio/riotty.c25
7 files changed, 191 insertions, 185 deletions
diff --git a/drivers/char/rio/cirrus.h b/drivers/char/rio/cirrus.h
index f4f837f86829..a03a538a3efb 100644
--- a/drivers/char/rio/cirrus.h
+++ b/drivers/char/rio/cirrus.h
@@ -43,83 +43,83 @@
43/* Bit fields for particular registers shared with driver */ 43/* Bit fields for particular registers shared with driver */
44 44
45/* COR1 - driver and RTA */ 45/* COR1 - driver and RTA */
46#define COR1_ODD 0x80 /* Odd parity */ 46#define RIOC_COR1_ODD 0x80 /* Odd parity */
47#define COR1_EVEN 0x00 /* Even parity */ 47#define RIOC_COR1_EVEN 0x00 /* Even parity */
48#define COR1_NOP 0x00 /* No parity */ 48#define RIOC_COR1_NOP 0x00 /* No parity */
49#define COR1_FORCE 0x20 /* Force parity */ 49#define RIOC_COR1_FORCE 0x20 /* Force parity */
50#define COR1_NORMAL 0x40 /* With parity */ 50#define RIOC_COR1_NORMAL 0x40 /* With parity */
51#define COR1_1STOP 0x00 /* 1 stop bit */ 51#define RIOC_COR1_1STOP 0x00 /* 1 stop bit */
52#define COR1_15STOP 0x04 /* 1.5 stop bits */ 52#define RIOC_COR1_15STOP 0x04 /* 1.5 stop bits */
53#define COR1_2STOP 0x08 /* 2 stop bits */ 53#define RIOC_COR1_2STOP 0x08 /* 2 stop bits */
54#define COR1_5BITS 0x00 /* 5 data bits */ 54#define RIOC_COR1_5BITS 0x00 /* 5 data bits */
55#define COR1_6BITS 0x01 /* 6 data bits */ 55#define RIOC_COR1_6BITS 0x01 /* 6 data bits */
56#define COR1_7BITS 0x02 /* 7 data bits */ 56#define RIOC_COR1_7BITS 0x02 /* 7 data bits */
57#define COR1_8BITS 0x03 /* 8 data bits */ 57#define RIOC_COR1_8BITS 0x03 /* 8 data bits */
58 58
59#define COR1_HOST 0xef /* Safe host bits */ 59#define RIOC_COR1_HOST 0xef /* Safe host bits */
60 60
61/* RTA only */ 61/* RTA only */
62#define COR1_CINPCK 0x00 /* Check parity of received characters */ 62#define RIOC_COR1_CINPCK 0x00 /* Check parity of received characters */
63#define COR1_CNINPCK 0x10 /* Don't check parity */ 63#define RIOC_COR1_CNINPCK 0x10 /* Don't check parity */
64 64
65/* COR2 bits for both RTA and driver use */ 65/* COR2 bits for both RTA and driver use */
66#define COR2_IXANY 0x80 /* IXANY - any character is XON */ 66#define RIOC_COR2_IXANY 0x80 /* IXANY - any character is XON */
67#define COR2_IXON 0x40 /* IXON - enable tx soft flowcontrol */ 67#define RIOC_COR2_IXON 0x40 /* IXON - enable tx soft flowcontrol */
68#define COR2_RTSFLOW 0x02 /* Enable tx hardware flow control */ 68#define RIOC_COR2_RTSFLOW 0x02 /* Enable tx hardware flow control */
69 69
70/* Additional driver bits */ 70/* Additional driver bits */
71#define COR2_HUPCL 0x20 /* Hang up on close */ 71#define RIOC_COR2_HUPCL 0x20 /* Hang up on close */
72#define COR2_CTSFLOW 0x04 /* Enable rx hardware flow control */ 72#define RIOC_COR2_CTSFLOW 0x04 /* Enable rx hardware flow control */
73#define COR2_IXOFF 0x01 /* Enable rx software flow control */ 73#define RIOC_COR2_IXOFF 0x01 /* Enable rx software flow control */
74#define COR2_DTRFLOW 0x08 /* Enable tx hardware flow control */ 74#define RIOC_COR2_DTRFLOW 0x08 /* Enable tx hardware flow control */
75 75
76/* RTA use only */ 76/* RTA use only */
77#define COR2_ETC 0x20 /* Embedded transmit options */ 77#define RIOC_COR2_ETC 0x20 /* Embedded transmit options */
78#define COR2_LOCAL 0x10 /* Local loopback mode */ 78#define RIOC_COR2_LOCAL 0x10 /* Local loopback mode */
79#define COR2_REMOTE 0x08 /* Remote loopback mode */ 79#define RIOC_COR2_REMOTE 0x08 /* Remote loopback mode */
80#define COR2_HOST 0xc2 /* Safe host bits */ 80#define RIOC_COR2_HOST 0xc2 /* Safe host bits */
81 81
82/* COR3 - RTA use only */ 82/* COR3 - RTA use only */
83#define COR3_SCDRNG 0x80 /* Enable special char detect for range */ 83#define RIOC_COR3_SCDRNG 0x80 /* Enable special char detect for range */
84#define COR3_SCD34 0x40 /* Special character detect for SCHR's 3 + 4 */ 84#define RIOC_COR3_SCD34 0x40 /* Special character detect for SCHR's 3 + 4 */
85#define COR3_FCT 0x20 /* Flow control transparency */ 85#define RIOC_COR3_FCT 0x20 /* Flow control transparency */
86#define COR3_SCD12 0x10 /* Special character detect for SCHR's 1 + 2 */ 86#define RIOC_COR3_SCD12 0x10 /* Special character detect for SCHR's 1 + 2 */
87#define COR3_FIFO12 0x0c /* 12 chars for receive FIFO threshold */ 87#define RIOC_COR3_FIFO12 0x0c /* 12 chars for receive FIFO threshold */
88#define COR3_FIFO10 0x0a /* 10 chars for receive FIFO threshold */ 88#define RIOC_COR3_FIFO10 0x0a /* 10 chars for receive FIFO threshold */
89#define COR3_FIFO8 0x08 /* 8 chars for receive FIFO threshold */ 89#define RIOC_COR3_FIFO8 0x08 /* 8 chars for receive FIFO threshold */
90#define COR3_FIFO6 0x06 /* 6 chars for receive FIFO threshold */ 90#define RIOC_COR3_FIFO6 0x06 /* 6 chars for receive FIFO threshold */
91 91
92#define COR3_THRESHOLD COR3_FIFO8 /* MUST BE LESS THAN MCOR_THRESHOLD */ 92#define RIOC_COR3_THRESHOLD RIOC_COR3_FIFO8 /* MUST BE LESS THAN MCOR_THRESHOLD */
93 93
94#define COR3_DEFAULT (COR3_FCT | COR3_THRESHOLD) 94#define RIOC_COR3_DEFAULT (RIOC_COR3_FCT | RIOC_COR3_THRESHOLD)
95 /* Default bits for COR3 */ 95 /* Default bits for COR3 */
96 96
97/* COR4 driver and RTA use */ 97/* COR4 driver and RTA use */
98#define COR4_IGNCR 0x80 /* Throw away CR's on input */ 98#define RIOC_COR4_IGNCR 0x80 /* Throw away CR's on input */
99#define COR4_ICRNL 0x40 /* Map CR -> NL on input */ 99#define RIOC_COR4_ICRNL 0x40 /* Map CR -> NL on input */
100#define COR4_INLCR 0x20 /* Map NL -> CR on input */ 100#define RIOC_COR4_INLCR 0x20 /* Map NL -> CR on input */
101#define COR4_IGNBRK 0x10 /* Ignore Break */ 101#define RIOC_COR4_IGNBRK 0x10 /* Ignore Break */
102#define COR4_NBRKINT 0x08 /* No interrupt on break (-BRKINT) */ 102#define RIOC_COR4_NBRKINT 0x08 /* No interrupt on break (-BRKINT) */
103#define COR4_RAISEMOD 0x01 /* Raise modem output lines on non-zero baud */ 103#define RIOC_COR4_RAISEMOD 0x01 /* Raise modem output lines on non-zero baud */
104 104
105 105
106/* COR4 driver only */ 106/* COR4 driver only */
107#define COR4_IGNPAR 0x04 /* IGNPAR (ignore characters with errors) */ 107#define RIOC_COR4_IGNPAR 0x04 /* IGNPAR (ignore characters with errors) */
108#define COR4_PARMRK 0x02 /* PARMRK */ 108#define RIOC_COR4_PARMRK 0x02 /* PARMRK */
109 109
110#define COR4_HOST 0xf8 /* Safe host bits */ 110#define RIOC_COR4_HOST 0xf8 /* Safe host bits */
111 111
112/* COR4 RTA only */ 112/* COR4 RTA only */
113#define COR4_CIGNPAR 0x02 /* Thrown away bad characters */ 113#define RIOC_COR4_CIGNPAR 0x02 /* Thrown away bad characters */
114#define COR4_CPARMRK 0x04 /* PARMRK characters */ 114#define RIOC_COR4_CPARMRK 0x04 /* PARMRK characters */
115#define COR4_CNPARMRK 0x03 /* Don't PARMRK */ 115#define RIOC_COR4_CNPARMRK 0x03 /* Don't PARMRK */
116 116
117/* COR5 driver and RTA use */ 117/* COR5 driver and RTA use */
118#define COR5_ISTRIP 0x80 /* Strip input chars to 7 bits */ 118#define RIOC_COR5_ISTRIP 0x80 /* Strip input chars to 7 bits */
119#define COR5_LNE 0x40 /* Enable LNEXT processing */ 119#define RIOC_COR5_LNE 0x40 /* Enable LNEXT processing */
120#define COR5_CMOE 0x20 /* Match good and errored characters */ 120#define RIOC_COR5_CMOE 0x20 /* Match good and errored characters */
121#define COR5_ONLCR 0x02 /* NL -> CR NL on output */ 121#define RIOC_COR5_ONLCR 0x02 /* NL -> CR NL on output */
122#define COR5_OCRNL 0x01 /* CR -> NL on output */ 122#define RIOC_COR5_OCRNL 0x01 /* CR -> NL on output */
123 123
124/* 124/*
125** Spare bits - these are not used in the CIRRUS registers, so we use 125** Spare bits - these are not used in the CIRRUS registers, so we use
@@ -128,86 +128,86 @@
128/* 128/*
129** tstop and tbusy indication 129** tstop and tbusy indication
130*/ 130*/
131#define COR5_TSTATE_ON 0x08 /* Turn on monitoring of tbusy and tstop */ 131#define RIOC_COR5_TSTATE_ON 0x08 /* Turn on monitoring of tbusy and tstop */
132#define COR5_TSTATE_OFF 0x04 /* Turn off monitoring of tbusy and tstop */ 132#define RIOC_COR5_TSTATE_OFF 0x04 /* Turn off monitoring of tbusy and tstop */
133/* 133/*
134** TAB3 134** TAB3
135*/ 135*/
136#define COR5_TAB3 0x10 /* TAB3 mode */ 136#define RIOC_COR5_TAB3 0x10 /* TAB3 mode */
137 137
138#define COR5_HOST 0xc3 /* Safe host bits */ 138#define RIOC_COR5_HOST 0xc3 /* Safe host bits */
139 139
140/* CCSR */ 140/* CCSR */
141#define CCSR_TXFLOFF 0x04 /* Tx is xoffed */ 141#define RIOC_CCSR_TXFLOFF 0x04 /* Tx is xoffed */
142 142
143/* MSVR1 */ 143/* MSVR1 */
144/* NB. DTR / CD swapped from Cirrus spec as the pins are also reversed on the 144/* NB. DTR / CD swapped from Cirrus spec as the pins are also reversed on the
145 RTA. This is because otherwise DCD would get lost on the 1 parallel / 3 145 RTA. This is because otherwise DCD would get lost on the 1 parallel / 3
146 serial option. 146 serial option.
147*/ 147*/
148#define MSVR1_CD 0x80 /* CD (DSR on Cirrus) */ 148#define RIOC_MSVR1_CD 0x80 /* CD (DSR on Cirrus) */
149#define MSVR1_RTS 0x40 /* RTS (CTS on Cirrus) */ 149#define RIOC_MSVR1_RTS 0x40 /* RTS (CTS on Cirrus) */
150#define MSVR1_RI 0x20 /* RI */ 150#define RIOC_MSVR1_RI 0x20 /* RI */
151#define MSVR1_DTR 0x10 /* DTR (CD on Cirrus) */ 151#define RIOC_MSVR1_DTR 0x10 /* DTR (CD on Cirrus) */
152#define MSVR1_CTS 0x01 /* CTS output pin (RTS on Cirrus) */ 152#define RIOC_MSVR1_CTS 0x01 /* CTS output pin (RTS on Cirrus) */
153/* Next two used to indicate state of tbusy and tstop to driver */ 153/* Next two used to indicate state of tbusy and tstop to driver */
154#define MSVR1_TSTOP 0x08 /* Set if port flow controlled */ 154#define RIOC_MSVR1_TSTOP 0x08 /* Set if port flow controlled */
155#define MSVR1_TEMPTY 0x04 /* Set if port tx buffer empty */ 155#define RIOC_MSVR1_TEMPTY 0x04 /* Set if port tx buffer empty */
156 156
157#define MSVR1_HOST 0xf3 /* The bits the host wants */ 157#define RIOC_MSVR1_HOST 0xf3 /* The bits the host wants */
158 158
159/* Defines for the subscripts of a CONFIG packet */ 159/* Defines for the subscripts of a CONFIG packet */
160#define CONFIG_COR1 1 /* Option register 1 */ 160#define RIOC_CONFIG_COR1 1 /* Option register 1 */
161#define CONFIG_COR2 2 /* Option register 2 */ 161#define RIOC_CONFIG_COR2 2 /* Option register 2 */
162#define CONFIG_COR4 3 /* Option register 4 */ 162#define RIOC_CONFIG_COR4 3 /* Option register 4 */
163#define CONFIG_COR5 4 /* Option register 5 */ 163#define RIOC_CONFIG_COR5 4 /* Option register 5 */
164#define CONFIG_TXXON 5 /* Tx XON character */ 164#define RIOC_CONFIG_TXXON 5 /* Tx XON character */
165#define CONFIG_TXXOFF 6 /* Tx XOFF character */ 165#define RIOC_CONFIG_TXXOFF 6 /* Tx XOFF character */
166#define CONFIG_RXXON 7 /* Rx XON character */ 166#define RIOC_CONFIG_RXXON 7 /* Rx XON character */
167#define CONFIG_RXXOFF 8 /* Rx XOFF character */ 167#define RIOC_CONFIG_RXXOFF 8 /* Rx XOFF character */
168#define CONFIG_LNEXT 9 /* LNEXT character */ 168#define RIOC_CONFIG_LNEXT 9 /* LNEXT character */
169#define CONFIG_TXBAUD 10 /* Tx baud rate */ 169#define RIOC_CONFIG_TXBAUD 10 /* Tx baud rate */
170#define CONFIG_RXBAUD 11 /* Rx baud rate */ 170#define RIOC_CONFIG_RXBAUD 11 /* Rx baud rate */
171 171
172#define PRE_EMPTIVE 0x80 /* Pre-emptive bit in command field */ 172#define RIOC_PRE_EMPTIVE 0x80 /* Pre-emptive bit in command field */
173 173
174/* Packet types going from Host to remote - with the exception of OPEN, MOPEN, 174/* Packet types going from Host to remote - with the exception of OPEN, MOPEN,
175 CONFIG, SBREAK and MEMDUMP the remaining bytes of the data array will not 175 CONFIG, SBREAK and MEMDUMP the remaining bytes of the data array will not
176 be used 176 be used
177*/ 177*/
178#define OPEN 0x00 /* Open a port */ 178#define RIOC_OPEN 0x00 /* Open a port */
179#define CONFIG 0x01 /* Configure a port */ 179#define RIOC_CONFIG 0x01 /* Configure a port */
180#define MOPEN 0x02 /* Modem open (block for DCD) */ 180#define RIOC_MOPEN 0x02 /* Modem open (block for DCD) */
181#define CLOSE 0x03 /* Close a port */ 181#define RIOC_CLOSE 0x03 /* Close a port */
182#define WFLUSH (0x04 | PRE_EMPTIVE) /* Write flush */ 182#define RIOC_WFLUSH (0x04 | RIOC_PRE_EMPTIVE) /* Write flush */
183#define RFLUSH (0x05 | PRE_EMPTIVE) /* Read flush */ 183#define RIOC_RFLUSH (0x05 | RIOC_PRE_EMPTIVE) /* Read flush */
184#define RESUME (0x06 | PRE_EMPTIVE) /* Resume if xoffed */ 184#define RIOC_RESUME (0x06 | RIOC_PRE_EMPTIVE) /* Resume if xoffed */
185#define SBREAK 0x07 /* Start break */ 185#define RIOC_SBREAK 0x07 /* Start break */
186#define EBREAK 0x08 /* End break */ 186#define RIOC_EBREAK 0x08 /* End break */
187#define SUSPEND (0x09 | PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */ 187#define RIOC_SUSPEND (0x09 | RIOC_PRE_EMPTIVE) /* Susp op (behave as tho xoffed) */
188#define FCLOSE (0x0a | PRE_EMPTIVE) /* Force close */ 188#define RIOC_FCLOSE (0x0a | RIOC_PRE_EMPTIVE) /* Force close */
189#define XPRINT 0x0b /* Xprint packet */ 189#define RIOC_XPRINT 0x0b /* Xprint packet */
190#define MBIS (0x0c | PRE_EMPTIVE) /* Set modem lines */ 190#define RIOC_MBIS (0x0c | RIOC_PRE_EMPTIVE) /* Set modem lines */
191#define MBIC (0x0d | PRE_EMPTIVE) /* Clear modem lines */ 191#define RIOC_MBIC (0x0d | RIOC_PRE_EMPTIVE) /* Clear modem lines */
192#define MSET (0x0e | PRE_EMPTIVE) /* Set modem lines */ 192#define RIOC_MSET (0x0e | RIOC_PRE_EMPTIVE) /* Set modem lines */
193#define PCLOSE 0x0f /* Pseudo close - Leaves rx/tx enabled */ 193#define RIOC_PCLOSE 0x0f /* Pseudo close - Leaves rx/tx enabled */
194#define MGET (0x10 | PRE_EMPTIVE) /* Force update of modem status */ 194#define RIOC_MGET (0x10 | RIOC_PRE_EMPTIVE) /* Force update of modem status */
195#define MEMDUMP (0x11 | PRE_EMPTIVE) /* Send back mem from addr supplied */ 195#define RIOC_MEMDUMP (0x11 | RIOC_PRE_EMPTIVE) /* Send back mem from addr supplied */
196#define READ_REGISTER (0x12 | PRE_EMPTIVE) /* Read CD1400 register (debug) */ 196#define RIOC_READ_REGISTER (0x12 | RIOC_PRE_EMPTIVE) /* Read CD1400 register (debug) */
197 197
198/* "Command" packets going from remote to host COMPLETE and MODEM_STATUS 198/* "Command" packets going from remote to host COMPLETE and MODEM_STATUS
199 use data[4] / data[3] to indicate current state and modem status respectively 199 use data[4] / data[3] to indicate current state and modem status respectively
200*/ 200*/
201 201
202#define COMPLETE (0x20 | PRE_EMPTIVE) 202#define RIOC_COMPLETE (0x20 | RIOC_PRE_EMPTIVE)
203 /* Command complete */ 203 /* Command complete */
204#define BREAK_RECEIVED (0x21 | PRE_EMPTIVE) 204#define RIOC_BREAK_RECEIVED (0x21 | RIOC_PRE_EMPTIVE)
205 /* Break received */ 205 /* Break received */
206#define MODEM_STATUS (0x22 | PRE_EMPTIVE) 206#define RIOC_MODEM_STATUS (0x22 | RIOC_PRE_EMPTIVE)
207 /* Change in modem status */ 207 /* Change in modem status */
208 208
209/* "Command" packet that could go either way - handshake wake-up */ 209/* "Command" packet that could go either way - handshake wake-up */
210#define HANDSHAKE (0x23 | PRE_EMPTIVE) 210#define RIOC_HANDSHAKE (0x23 | RIOC_PRE_EMPTIVE)
211 /* Wake-up to HOST / RTA */ 211 /* Wake-up to HOST / RTA */
212 212
213#endif 213#endif
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 0ce96670f979..412777cd1e68 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -344,7 +344,7 @@ int rio_minor(struct tty_struct *tty)
344 344
345static int rio_set_real_termios(void *ptr) 345static int rio_set_real_termios(void *ptr)
346{ 346{
347 return RIOParam((struct Port *) ptr, CONFIG, 1, 1); 347 return RIOParam((struct Port *) ptr, RIOC_CONFIG, 1, 1);
348} 348}
349 349
350 350
@@ -487,7 +487,7 @@ static int rio_get_CD(void *ptr)
487 int rv; 487 int rv;
488 488
489 func_enter(); 489 func_enter();
490 rv = (PortP->ModemState & MSVR1_CD) != 0; 490 rv = (PortP->ModemState & RIOC_MSVR1_CD) != 0;
491 491
492 rio_dprintk(RIO_DEBUG_INIT, "Getting CD status: %d\n", rv); 492 rio_dprintk(RIO_DEBUG_INIT, "Getting CD status: %d\n", rv);
493 493
@@ -607,7 +607,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
607 rio_dprintk(RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); 607 rio_dprintk(RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
608 rc = -EIO; 608 rc = -EIO;
609 } else { 609 } else {
610 if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) { 610 if (RIOShortCommand(p, PortP, RIOC_SBREAK, 2, 250) ==
611 RIO_FAIL) {
611 rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); 612 rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
612 rc = -EIO; 613 rc = -EIO;
613 } 614 }
@@ -622,7 +623,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
622 l = arg ? arg * 100 : 250; 623 l = arg ? arg * 100 : 250;
623 if (l > 255) 624 if (l > 255)
624 l = 255; 625 l = 255;
625 if (RIOShortCommand(p, PortP, SBREAK, 2, arg ? arg * 100 : 250) == RIO_FAIL) { 626 if (RIOShortCommand(p, PortP, RIOC_SBREAK, 2,
627 arg ? arg * 100 : 250) == RIO_FAIL) {
626 rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); 628 rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
627 rc = -EIO; 629 rc = -EIO;
628 } 630 }
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c
index bf36959fc121..7b96e0814887 100644
--- a/drivers/char/rio/riocmd.c
+++ b/drivers/char/rio/riocmd.c
@@ -417,7 +417,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
417 PortP = p->RIOPortp[SysPort]; 417 PortP = p->RIOPortp[SysPort];
418 rio_spin_lock_irqsave(&PortP->portSem, flags); 418 rio_spin_lock_irqsave(&PortP->portSem, flags);
419 switch (readb(&PktCmdP->Command)) { 419 switch (readb(&PktCmdP->Command)) {
420 case BREAK_RECEIVED: 420 case RIOC_BREAK_RECEIVED:
421 rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n"); 421 rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n");
422 /* If the current line disc. is not multi-threading and 422 /* If the current line disc. is not multi-threading and
423 the current processor is not the default, reset rup_intr 423 the current processor is not the default, reset rup_intr
@@ -428,16 +428,16 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
428 gs_got_break(&PortP->gs); 428 gs_got_break(&PortP->gs);
429 break; 429 break;
430 430
431 case COMPLETE: 431 case RIOC_COMPLETE:
432 rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts); 432 rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts);
433 subCommand = 1; 433 subCommand = 1;
434 switch (readb(&PktCmdP->SubCommand)) { 434 switch (readb(&PktCmdP->SubCommand)) {
435 case MEMDUMP: 435 case RIOC_MEMDUMP:
436 rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr)); 436 rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr));
437 break; 437 break;
438 case READ_REGISTER: 438 case RIOC_READ_REGISTER:
439 rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr)); 439 rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr));
440 p->CdRegister = (readb(&PktCmdP->ModemStatus) & MSVR1_HOST); 440 p->CdRegister = (readb(&PktCmdP->ModemStatus) & RIOC_MSVR1_HOST);
441 break; 441 break;
442 default: 442 default:
443 subCommand = 0; 443 subCommand = 0;
@@ -456,14 +456,15 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
456 rio_dprintk(RIO_DEBUG_CMD, "No change\n"); 456 rio_dprintk(RIO_DEBUG_CMD, "No change\n");
457 457
458 /* FALLTHROUGH */ 458 /* FALLTHROUGH */
459 case MODEM_STATUS: 459 case RIOC_MODEM_STATUS:
460 /* 460 /*
461 ** Knock out the tbusy and tstop bits, as these are not relevant 461 ** Knock out the tbusy and tstop bits, as these are not relevant
462 ** to the check for modem status change (they're just there because 462 ** to the check for modem status change (they're just there because
463 ** it's a convenient place to put them!). 463 ** it's a convenient place to put them!).
464 */ 464 */
465 ReportedModemStatus = readb(&PktCmdP->ModemStatus); 465 ReportedModemStatus = readb(&PktCmdP->ModemStatus);
466 if ((PortP->ModemState & MSVR1_HOST) == (ReportedModemStatus & MSVR1_HOST)) { 466 if ((PortP->ModemState & RIOC_MSVR1_HOST) ==
467 (ReportedModemStatus & RIOC_MSVR1_HOST)) {
467 rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState); 468 rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState);
468 /* 469 /*
469 ** Update ModemState just in case tbusy or tstop states have 470 ** Update ModemState just in case tbusy or tstop states have
@@ -497,7 +498,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
497 /* 498 /*
498 ** Is there a carrier? 499 ** Is there a carrier?
499 */ 500 */
500 if (PortP->ModemState & MSVR1_CD) { 501 if (PortP->ModemState & RIOC_MSVR1_CD) {
501 /* 502 /*
502 ** Has carrier just appeared? 503 ** Has carrier just appeared?
503 */ 504 */
@@ -691,7 +692,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
691 */ 692 */
692 rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); 693 rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
693 FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); 694 FreeMe = RIOCommandRup(p, Rup, HostP, PacketP);
694 if (readb(&PacketP->data[5]) == MEMDUMP) { 695 if (readb(&PacketP->data[5]) == RIOC_MEMDUMP) {
695 rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6]))); 696 rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6])));
696 rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32); 697 rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32);
697 } 698 }
diff --git a/drivers/char/rio/rioctrl.c b/drivers/char/rio/rioctrl.c
index d8eb2bcbe015..d65ceb9a434a 100644
--- a/drivers/char/rio/rioctrl.c
+++ b/drivers/char/rio/rioctrl.c
@@ -422,7 +422,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
422 } 422 }
423 423
424 rio_spin_lock_irqsave(&PortP->portSem, flags); 424 rio_spin_lock_irqsave(&PortP->portSem, flags);
425 if (RIOPreemptiveCmd(p, (p->RIOPortp[port]), RESUME) == RIO_FAIL) { 425 if (RIOPreemptiveCmd(p, (p->RIOPortp[port]), RIOC_RESUME) ==
426 RIO_FAIL) {
426 rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME failed\n"); 427 rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME failed\n");
427 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 428 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
428 return -EBUSY; 429 return -EBUSY;
@@ -636,7 +637,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
636 return -ENXIO; 637 return -ENXIO;
637 } 638 }
638 PortP = (p->RIOPortp[PortTty.port]); 639 PortP = (p->RIOPortp[PortTty.port]);
639 RIOParam(PortP, CONFIG, PortP->State & RIO_MODEM, OK_TO_SLEEP); 640 RIOParam(PortP, RIOC_CONFIG, PortP->State & RIO_MODEM,
641 OK_TO_SLEEP);
640 return retval; 642 return retval;
641 643
642 case RIO_SET_PORT_PARAMS: 644 case RIO_SET_PORT_PARAMS:
@@ -1247,7 +1249,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
1247 1249
1248 rio_spin_lock_irqsave(&PortP->portSem, flags); 1250 rio_spin_lock_irqsave(&PortP->portSem, flags);
1249 1251
1250 if (RIOPreemptiveCmd(p, PortP, MEMDUMP) == RIO_FAIL) { 1252 if (RIOPreemptiveCmd(p, PortP, RIOC_MEMDUMP) == RIO_FAIL) {
1251 rio_dprintk(RIO_DEBUG_CTRL, "RIO_MEM_DUMP failed\n"); 1253 rio_dprintk(RIO_DEBUG_CTRL, "RIO_MEM_DUMP failed\n");
1252 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 1254 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
1253 return -EBUSY; 1255 return -EBUSY;
@@ -1313,7 +1315,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
1313 1315
1314 rio_spin_lock_irqsave(&PortP->portSem, flags); 1316 rio_spin_lock_irqsave(&PortP->portSem, flags);
1315 1317
1316 if (RIOPreemptiveCmd(p, PortP, READ_REGISTER) == RIO_FAIL) { 1318 if (RIOPreemptiveCmd(p, PortP, RIOC_READ_REGISTER) ==
1319 RIO_FAIL) {
1317 rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_REGISTER failed\n"); 1320 rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_REGISTER failed\n");
1318 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 1321 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
1319 return -EBUSY; 1322 return -EBUSY;
@@ -1434,50 +1437,50 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd)
1434 PktCmdP->PhbNum = port; 1437 PktCmdP->PhbNum = port;
1435 1438
1436 switch (Cmd) { 1439 switch (Cmd) {
1437 case MEMDUMP: 1440 case RIOC_MEMDUMP:
1438 rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p " 1441 rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p "
1439 "(addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr); 1442 "(addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr);
1440 PktCmdP->SubCommand = MEMDUMP; 1443 PktCmdP->SubCommand = RIOC_MEMDUMP;
1441 PktCmdP->SubAddr = SubCmd.Addr; 1444 PktCmdP->SubAddr = SubCmd.Addr;
1442 break; 1445 break;
1443 case FCLOSE: 1446 case RIOC_FCLOSE:
1444 rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n", 1447 rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n",
1445 CmdBlkP); 1448 CmdBlkP);
1446 break; 1449 break;
1447 case READ_REGISTER: 1450 case RIOC_READ_REGISTER:
1448 rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) " 1451 rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) "
1449 "command blk %p\n", (int) SubCmd.Addr, CmdBlkP); 1452 "command blk %p\n", (int) SubCmd.Addr, CmdBlkP);
1450 PktCmdP->SubCommand = READ_REGISTER; 1453 PktCmdP->SubCommand = RIOC_READ_REGISTER;
1451 PktCmdP->SubAddr = SubCmd.Addr; 1454 PktCmdP->SubAddr = SubCmd.Addr;
1452 break; 1455 break;
1453 case RESUME: 1456 case RIOC_RESUME:
1454 rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n", 1457 rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n",
1455 CmdBlkP); 1458 CmdBlkP);
1456 break; 1459 break;
1457 case RFLUSH: 1460 case RIOC_RFLUSH:
1458 rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n", 1461 rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n",
1459 CmdBlkP); 1462 CmdBlkP);
1460 CmdBlkP->PostFuncP = RIORFlushEnable; 1463 CmdBlkP->PostFuncP = RIORFlushEnable;
1461 break; 1464 break;
1462 case SUSPEND: 1465 case RIOC_SUSPEND:
1463 rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n", 1466 rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n",
1464 CmdBlkP); 1467 CmdBlkP);
1465 break; 1468 break;
1466 1469
1467 case MGET: 1470 case RIOC_MGET:
1468 rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n", 1471 rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n",
1469 CmdBlkP); 1472 CmdBlkP);
1470 break; 1473 break;
1471 1474
1472 case MSET: 1475 case RIOC_MSET:
1473 case MBIC: 1476 case RIOC_MBIC:
1474 case MBIS: 1477 case RIOC_MBIS:
1475 CmdBlkP->Packet.data[4] = (char) PortP->ModemLines; 1478 CmdBlkP->Packet.data[4] = (char) PortP->ModemLines;
1476 rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command " 1479 rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command "
1477 "blk %p\n", CmdBlkP); 1480 "blk %p\n", CmdBlkP);
1478 break; 1481 break;
1479 1482
1480 case WFLUSH: 1483 case RIOC_WFLUSH:
1481 /* 1484 /*
1482 ** If we have queued up the maximum number of Write flushes 1485 ** If we have queued up the maximum number of Write flushes
1483 ** allowed then we should not bother sending any more to the 1486 ** allowed then we should not bother sending any more to the
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
index 4734e26e1ccd..ea21686c69a4 100644
--- a/drivers/char/rio/riointr.c
+++ b/drivers/char/rio/riointr.c
@@ -401,9 +401,8 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
401 PortP->InUse = NOT_INUSE; 401 PortP->InUse = NOT_INUSE;
402 402
403 rio_spin_unlock(&PortP->portSem); 403 rio_spin_unlock(&PortP->portSem);
404 if (RIOParam(PortP, OPEN, ((PortP->Cor2Copy & (COR2_RTSFLOW | COR2_CTSFLOW)) == (COR2_RTSFLOW | COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL) { 404 if (RIOParam(PortP, RIOC_OPEN, ((PortP->Cor2Copy & (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) == (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL)
405 continue; /* with next port */ 405 continue; /* with next port */
406 }
407 rio_spin_lock(&PortP->portSem); 406 rio_spin_lock(&PortP->portSem);
408 PortP->MagicFlags &= ~MAGIC_REBOOT; 407 PortP->MagicFlags &= ~MAGIC_REBOOT;
409 } 408 }
@@ -429,7 +428,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
429 */ 428 */
430 PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0]; 429 PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0];
431 430
432 writeb(WFLUSH, &PktCmdP->Command); 431 writeb(RIOC_WFLUSH, &PktCmdP->Command);
433 432
434 p = PortP->HostPort % (u16) PORTS_PER_RTA; 433 p = PortP->HostPort % (u16) PORTS_PER_RTA;
435 434
diff --git a/drivers/char/rio/rioparam.c b/drivers/char/rio/rioparam.c
index da276ed57b3f..4810b845cc21 100644
--- a/drivers/char/rio/rioparam.c
+++ b/drivers/char/rio/rioparam.c
@@ -177,7 +177,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
177 } 177 }
178 rio_spin_lock_irqsave(&PortP->portSem, flags); 178 rio_spin_lock_irqsave(&PortP->portSem, flags);
179 179
180 if (cmd == OPEN) { 180 if (cmd == RIOC_OPEN) {
181 /* 181 /*
182 ** If the port is set to store or lock the parameters, and it is 182 ** If the port is set to store or lock the parameters, and it is
183 ** paramed with OPEN, we want to restore the saved port termio, but 183 ** paramed with OPEN, we want to restore the saved port termio, but
@@ -241,50 +241,50 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
241 case CS5: 241 case CS5:
242 { 242 {
243 rio_dprintk(RIO_DEBUG_PARAM, "5 bit data\n"); 243 rio_dprintk(RIO_DEBUG_PARAM, "5 bit data\n");
244 Cor1 |= COR1_5BITS; 244 Cor1 |= RIOC_COR1_5BITS;
245 break; 245 break;
246 } 246 }
247 case CS6: 247 case CS6:
248 { 248 {
249 rio_dprintk(RIO_DEBUG_PARAM, "6 bit data\n"); 249 rio_dprintk(RIO_DEBUG_PARAM, "6 bit data\n");
250 Cor1 |= COR1_6BITS; 250 Cor1 |= RIOC_COR1_6BITS;
251 break; 251 break;
252 } 252 }
253 case CS7: 253 case CS7:
254 { 254 {
255 rio_dprintk(RIO_DEBUG_PARAM, "7 bit data\n"); 255 rio_dprintk(RIO_DEBUG_PARAM, "7 bit data\n");
256 Cor1 |= COR1_7BITS; 256 Cor1 |= RIOC_COR1_7BITS;
257 break; 257 break;
258 } 258 }
259 case CS8: 259 case CS8:
260 { 260 {
261 rio_dprintk(RIO_DEBUG_PARAM, "8 bit data\n"); 261 rio_dprintk(RIO_DEBUG_PARAM, "8 bit data\n");
262 Cor1 |= COR1_8BITS; 262 Cor1 |= RIOC_COR1_8BITS;
263 break; 263 break;
264 } 264 }
265 } 265 }
266 266
267 if (TtyP->termios->c_cflag & CSTOPB) { 267 if (TtyP->termios->c_cflag & CSTOPB) {
268 rio_dprintk(RIO_DEBUG_PARAM, "2 stop bits\n"); 268 rio_dprintk(RIO_DEBUG_PARAM, "2 stop bits\n");
269 Cor1 |= COR1_2STOP; 269 Cor1 |= RIOC_COR1_2STOP;
270 } else { 270 } else {
271 rio_dprintk(RIO_DEBUG_PARAM, "1 stop bit\n"); 271 rio_dprintk(RIO_DEBUG_PARAM, "1 stop bit\n");
272 Cor1 |= COR1_1STOP; 272 Cor1 |= RIOC_COR1_1STOP;
273 } 273 }
274 274
275 if (TtyP->termios->c_cflag & PARENB) { 275 if (TtyP->termios->c_cflag & PARENB) {
276 rio_dprintk(RIO_DEBUG_PARAM, "Enable parity\n"); 276 rio_dprintk(RIO_DEBUG_PARAM, "Enable parity\n");
277 Cor1 |= COR1_NORMAL; 277 Cor1 |= RIOC_COR1_NORMAL;
278 } else { 278 } else {
279 rio_dprintk(RIO_DEBUG_PARAM, "Disable parity\n"); 279 rio_dprintk(RIO_DEBUG_PARAM, "Disable parity\n");
280 Cor1 |= COR1_NOP; 280 Cor1 |= RIOC_COR1_NOP;
281 } 281 }
282 if (TtyP->termios->c_cflag & PARODD) { 282 if (TtyP->termios->c_cflag & PARODD) {
283 rio_dprintk(RIO_DEBUG_PARAM, "Odd parity\n"); 283 rio_dprintk(RIO_DEBUG_PARAM, "Odd parity\n");
284 Cor1 |= COR1_ODD; 284 Cor1 |= RIOC_COR1_ODD;
285 } else { 285 } else {
286 rio_dprintk(RIO_DEBUG_PARAM, "Even parity\n"); 286 rio_dprintk(RIO_DEBUG_PARAM, "Even parity\n");
287 Cor1 |= COR1_EVEN; 287 Cor1 |= RIOC_COR1_EVEN;
288 } 288 }
289 289
290 /* 290 /*
@@ -292,11 +292,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
292 */ 292 */
293 if (TtyP->termios->c_iflag & IXON) { 293 if (TtyP->termios->c_iflag & IXON) {
294 rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop output control\n"); 294 rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop output control\n");
295 Cor2 |= COR2_IXON; 295 Cor2 |= RIOC_COR2_IXON;
296 } else { 296 } else {
297 if (PortP->Config & RIO_IXON) { 297 if (PortP->Config & RIO_IXON) {
298 rio_dprintk(RIO_DEBUG_PARAM, "Force enable start/stop output control\n"); 298 rio_dprintk(RIO_DEBUG_PARAM, "Force enable start/stop output control\n");
299 Cor2 |= COR2_IXON; 299 Cor2 |= RIOC_COR2_IXON;
300 } else 300 } else
301 rio_dprintk(RIO_DEBUG_PARAM, "IXON has been disabled.\n"); 301 rio_dprintk(RIO_DEBUG_PARAM, "IXON has been disabled.\n");
302 } 302 }
@@ -304,29 +304,29 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
304 if (TtyP->termios->c_iflag & IXANY) { 304 if (TtyP->termios->c_iflag & IXANY) {
305 if (PortP->Config & RIO_IXANY) { 305 if (PortP->Config & RIO_IXANY) {
306 rio_dprintk(RIO_DEBUG_PARAM, "Enable any key to restart output\n"); 306 rio_dprintk(RIO_DEBUG_PARAM, "Enable any key to restart output\n");
307 Cor2 |= COR2_IXANY; 307 Cor2 |= RIOC_COR2_IXANY;
308 } else 308 } else
309 rio_dprintk(RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n"); 309 rio_dprintk(RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n");
310 } 310 }
311 311
312 if (TtyP->termios->c_iflag & IXOFF) { 312 if (TtyP->termios->c_iflag & IXOFF) {
313 rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop input control 2\n"); 313 rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop input control 2\n");
314 Cor2 |= COR2_IXOFF; 314 Cor2 |= RIOC_COR2_IXOFF;
315 } 315 }
316 316
317 if (TtyP->termios->c_cflag & HUPCL) { 317 if (TtyP->termios->c_cflag & HUPCL) {
318 rio_dprintk(RIO_DEBUG_PARAM, "Hangup on last close\n"); 318 rio_dprintk(RIO_DEBUG_PARAM, "Hangup on last close\n");
319 Cor2 |= COR2_HUPCL; 319 Cor2 |= RIOC_COR2_HUPCL;
320 } 320 }
321 321
322 if (C_CRTSCTS(TtyP)) { 322 if (C_CRTSCTS(TtyP)) {
323 rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n"); 323 rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n");
324 Cor2 |= COR2_CTSFLOW; 324 Cor2 |= RIOC_COR2_CTSFLOW;
325 Cor2 |= COR2_RTSFLOW; 325 Cor2 |= RIOC_COR2_RTSFLOW;
326 } else { 326 } else {
327 rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n"); 327 rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n");
328 Cor2 &= ~COR2_CTSFLOW; 328 Cor2 &= ~RIOC_COR2_CTSFLOW;
329 Cor2 &= ~COR2_RTSFLOW; 329 Cor2 &= ~RIOC_COR2_RTSFLOW;
330 } 330 }
331 331
332 332
@@ -341,36 +341,36 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
341 */ 341 */
342 if (TtyP->termios->c_iflag & IGNBRK) { 342 if (TtyP->termios->c_iflag & IGNBRK) {
343 rio_dprintk(RIO_DEBUG_PARAM, "Ignore break condition\n"); 343 rio_dprintk(RIO_DEBUG_PARAM, "Ignore break condition\n");
344 Cor4 |= COR4_IGNBRK; 344 Cor4 |= RIOC_COR4_IGNBRK;
345 } 345 }
346 if (!(TtyP->termios->c_iflag & BRKINT)) { 346 if (!(TtyP->termios->c_iflag & BRKINT)) {
347 rio_dprintk(RIO_DEBUG_PARAM, "Break generates NULL condition\n"); 347 rio_dprintk(RIO_DEBUG_PARAM, "Break generates NULL condition\n");
348 Cor4 |= COR4_NBRKINT; 348 Cor4 |= RIOC_COR4_NBRKINT;
349 } else { 349 } else {
350 rio_dprintk(RIO_DEBUG_PARAM, "Interrupt on break condition\n"); 350 rio_dprintk(RIO_DEBUG_PARAM, "Interrupt on break condition\n");
351 } 351 }
352 352
353 if (TtyP->termios->c_iflag & INLCR) { 353 if (TtyP->termios->c_iflag & INLCR) {
354 rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage return on input\n"); 354 rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage return on input\n");
355 Cor4 |= COR4_INLCR; 355 Cor4 |= RIOC_COR4_INLCR;
356 } 356 }
357 357
358 if (TtyP->termios->c_iflag & IGNCR) { 358 if (TtyP->termios->c_iflag & IGNCR) {
359 rio_dprintk(RIO_DEBUG_PARAM, "Ignore carriage return on input\n"); 359 rio_dprintk(RIO_DEBUG_PARAM, "Ignore carriage return on input\n");
360 Cor4 |= COR4_IGNCR; 360 Cor4 |= RIOC_COR4_IGNCR;
361 } 361 }
362 362
363 if (TtyP->termios->c_iflag & ICRNL) { 363 if (TtyP->termios->c_iflag & ICRNL) {
364 rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on input\n"); 364 rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on input\n");
365 Cor4 |= COR4_ICRNL; 365 Cor4 |= RIOC_COR4_ICRNL;
366 } 366 }
367 if (TtyP->termios->c_iflag & IGNPAR) { 367 if (TtyP->termios->c_iflag & IGNPAR) {
368 rio_dprintk(RIO_DEBUG_PARAM, "Ignore characters with parity errors\n"); 368 rio_dprintk(RIO_DEBUG_PARAM, "Ignore characters with parity errors\n");
369 Cor4 |= COR4_IGNPAR; 369 Cor4 |= RIOC_COR4_IGNPAR;
370 } 370 }
371 if (TtyP->termios->c_iflag & PARMRK) { 371 if (TtyP->termios->c_iflag & PARMRK) {
372 rio_dprintk(RIO_DEBUG_PARAM, "Mark parity errors\n"); 372 rio_dprintk(RIO_DEBUG_PARAM, "Mark parity errors\n");
373 Cor4 |= COR4_PARMRK; 373 Cor4 |= RIOC_COR4_PARMRK;
374 } 374 }
375 375
376 /* 376 /*
@@ -378,22 +378,22 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
378 ** on reception of a config packet. 378 ** on reception of a config packet.
379 ** The download code handles the zero baud condition. 379 ** The download code handles the zero baud condition.
380 */ 380 */
381 Cor4 |= COR4_RAISEMOD; 381 Cor4 |= RIOC_COR4_RAISEMOD;
382 382
383 /* 383 /*
384 ** COR 5 384 ** COR 5
385 */ 385 */
386 386
387 Cor5 = COR5_CMOE; 387 Cor5 = RIOC_COR5_CMOE;
388 388
389 /* 389 /*
390 ** Set to monitor tbusy/tstop (or not). 390 ** Set to monitor tbusy/tstop (or not).
391 */ 391 */
392 392
393 if (PortP->MonitorTstate) 393 if (PortP->MonitorTstate)
394 Cor5 |= COR5_TSTATE_ON; 394 Cor5 |= RIOC_COR5_TSTATE_ON;
395 else 395 else
396 Cor5 |= COR5_TSTATE_OFF; 396 Cor5 |= RIOC_COR5_TSTATE_OFF;
397 397
398 /* 398 /*
399 ** Could set LNE here if you wanted LNext processing. SVR4 will use it. 399 ** Could set LNE here if you wanted LNext processing. SVR4 will use it.
@@ -401,24 +401,24 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
401 if (TtyP->termios->c_iflag & ISTRIP) { 401 if (TtyP->termios->c_iflag & ISTRIP) {
402 rio_dprintk(RIO_DEBUG_PARAM, "Strip input characters\n"); 402 rio_dprintk(RIO_DEBUG_PARAM, "Strip input characters\n");
403 if (!(PortP->State & RIO_TRIAD_MODE)) { 403 if (!(PortP->State & RIO_TRIAD_MODE)) {
404 Cor5 |= COR5_ISTRIP; 404 Cor5 |= RIOC_COR5_ISTRIP;
405 } 405 }
406 } 406 }
407 407
408 if (TtyP->termios->c_oflag & ONLCR) { 408 if (TtyP->termios->c_oflag & ONLCR) {
409 rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n"); 409 rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n");
410 if (PortP->CookMode == COOK_MEDIUM) 410 if (PortP->CookMode == COOK_MEDIUM)
411 Cor5 |= COR5_ONLCR; 411 Cor5 |= RIOC_COR5_ONLCR;
412 } 412 }
413 if (TtyP->termios->c_oflag & OCRNL) { 413 if (TtyP->termios->c_oflag & OCRNL) {
414 rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on output\n"); 414 rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on output\n");
415 if (PortP->CookMode == COOK_MEDIUM) 415 if (PortP->CookMode == COOK_MEDIUM)
416 Cor5 |= COR5_OCRNL; 416 Cor5 |= RIOC_COR5_OCRNL;
417 } 417 }
418 if ((TtyP->termios->c_oflag & TABDLY) == TAB3) { 418 if ((TtyP->termios->c_oflag & TABDLY) == TAB3) {
419 rio_dprintk(RIO_DEBUG_PARAM, "Tab delay 3 set\n"); 419 rio_dprintk(RIO_DEBUG_PARAM, "Tab delay 3 set\n");
420 if (PortP->CookMode == COOK_MEDIUM) 420 if (PortP->CookMode == COOK_MEDIUM)
421 Cor5 |= COR5_TAB3; 421 Cor5 |= RIOC_COR5_TAB3;
422 } 422 }
423 423
424 /* 424 /*
diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c
index 1cb8580a161d..c99354843be1 100644
--- a/drivers/char/rio/riotty.c
+++ b/drivers/char/rio/riotty.c
@@ -211,7 +211,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
211 rio_dprintk(RIO_DEBUG_TTY, "Waiting for RIO_CLOSING to go away\n"); 211 rio_dprintk(RIO_DEBUG_TTY, "Waiting for RIO_CLOSING to go away\n");
212 if (repeat_this-- <= 0) { 212 if (repeat_this-- <= 0) {
213 rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); 213 rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n");
214 RIOPreemptiveCmd(p, PortP, FCLOSE); 214 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
215 retval = -EINTR; 215 retval = -EINTR;
216 goto bombout; 216 goto bombout;
217 } 217 }
@@ -264,7 +264,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
264 here. If I read the docs correctly the "open" 264 here. If I read the docs correctly the "open"
265 command piggybacks the parameters immediately. 265 command piggybacks the parameters immediately.
266 -- REW */ 266 -- REW */
267 RIOParam(PortP, OPEN, 1, OK_TO_SLEEP); /* Open the port */ 267 RIOParam(PortP, RIOC_OPEN, 1, OK_TO_SLEEP); /* Open the port */
268 rio_spin_lock_irqsave(&PortP->portSem, flags); 268 rio_spin_lock_irqsave(&PortP->portSem, flags);
269 269
270 /* 270 /*
@@ -275,7 +275,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
275 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 275 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
276 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { 276 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
277 rio_dprintk(RIO_DEBUG_TTY, "Waiting for open to finish broken by signal\n"); 277 rio_dprintk(RIO_DEBUG_TTY, "Waiting for open to finish broken by signal\n");
278 RIOPreemptiveCmd(p, PortP, FCLOSE); 278 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
279 func_exit(); 279 func_exit();
280 return -EINTR; 280 return -EINTR;
281 } 281 }
@@ -297,7 +297,8 @@ int riotopen(struct tty_struct *tty, struct file *filp)
297 ** insert test for carrier here. -- ??? 297 ** insert test for carrier here. -- ???
298 ** I already see that test here. What's the deal? -- REW 298 ** I already see that test here. What's the deal? -- REW
299 */ 299 */
300 if ((PortP->gs.tty->termios->c_cflag & CLOCAL) || (PortP->ModemState & MSVR1_CD)) { 300 if ((PortP->gs.tty->termios->c_cflag & CLOCAL) ||
301 (PortP->ModemState & RIOC_MSVR1_CD)) {
301 rio_dprintk(RIO_DEBUG_TTY, "open(%d) Modem carr on\n", SysPort); 302 rio_dprintk(RIO_DEBUG_TTY, "open(%d) Modem carr on\n", SysPort);
302 /* 303 /*
303 tp->tm.c_state |= CARR_ON; 304 tp->tm.c_state |= CARR_ON;
@@ -325,7 +326,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
325 ** I think it's OK. -- REW 326 ** I think it's OK. -- REW
326 */ 327 */
327 rio_dprintk(RIO_DEBUG_TTY, "open(%d) sleeping for carr broken by signal\n", SysPort); 328 rio_dprintk(RIO_DEBUG_TTY, "open(%d) sleeping for carr broken by signal\n", SysPort);
328 RIOPreemptiveCmd(p, PortP, FCLOSE); 329 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
329 /* 330 /*
330 tp->tm.c_state &= ~WOPEN; 331 tp->tm.c_state &= ~WOPEN;
331 */ 332 */
@@ -416,7 +417,7 @@ int riotclose(void *ptr)
416 */ 417 */
417 PortP->State &= ~RIO_MOPEN; 418 PortP->State &= ~RIO_MOPEN;
418 PortP->State &= ~RIO_CARR_ON; 419 PortP->State &= ~RIO_CARR_ON;
419 PortP->ModemState &= ~MSVR1_CD; 420 PortP->ModemState &= ~RIOC_MSVR1_CD;
420 /* 421 /*
421 ** If the device was open as both a Modem and a tty line 422 ** If the device was open as both a Modem and a tty line
422 ** then we need to wimp out here, as the port has not really 423 ** then we need to wimp out here, as the port has not really
@@ -453,7 +454,7 @@ int riotclose(void *ptr)
453 if (repeat_this-- <= 0) { 454 if (repeat_this-- <= 0) {
454 rv = -EINTR; 455 rv = -EINTR;
455 rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); 456 rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n");
456 RIOPreemptiveCmd(p, PortP, FCLOSE); 457 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
457 goto close_end; 458 goto close_end;
458 } 459 }
459 rio_dprintk(RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); 460 rio_dprintk(RIO_DEBUG_TTY, "Calling timeout to flush in closing\n");
@@ -492,8 +493,8 @@ int riotclose(void *ptr)
492 /* Can't call RIOShortCommand with the port locked. */ 493 /* Can't call RIOShortCommand with the port locked. */
493 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 494 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
494 495
495 if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { 496 if (RIOShortCommand(p, PortP, RIOC_CLOSE, 1, 0) == RIO_FAIL) {
496 RIOPreemptiveCmd(p, PortP, FCLOSE); 497 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
497 rio_spin_lock_irqsave(&PortP->portSem, flags); 498 rio_spin_lock_irqsave(&PortP->portSem, flags);
498 goto close_end; 499 goto close_end;
499 } 500 }
@@ -503,7 +504,7 @@ int riotclose(void *ptr)
503 try--; 504 try--;
504 if (time_after(jiffies, end_time)) { 505 if (time_after(jiffies, end_time)) {
505 rio_dprintk(RIO_DEBUG_TTY, "Run out of tries - force the bugger shut!\n"); 506 rio_dprintk(RIO_DEBUG_TTY, "Run out of tries - force the bugger shut!\n");
506 RIOPreemptiveCmd(p, PortP, FCLOSE); 507 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
507 break; 508 break;
508 } 509 }
509 rio_dprintk(RIO_DEBUG_TTY, "Close: PortState:ISOPEN is %d\n", PortP->PortState & PORT_ISOPEN); 510 rio_dprintk(RIO_DEBUG_TTY, "Close: PortState:ISOPEN is %d\n", PortP->PortState & PORT_ISOPEN);
@@ -515,14 +516,14 @@ int riotclose(void *ptr)
515 } 516 }
516 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { 517 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
517 rio_dprintk(RIO_DEBUG_TTY, "RTA EINTR in delay \n"); 518 rio_dprintk(RIO_DEBUG_TTY, "RTA EINTR in delay \n");
518 RIOPreemptiveCmd(p, PortP, FCLOSE); 519 RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
519 break; 520 break;
520 } 521 }
521 } 522 }
522 rio_spin_lock_irqsave(&PortP->portSem, flags); 523 rio_spin_lock_irqsave(&PortP->portSem, flags);
523 rio_dprintk(RIO_DEBUG_TTY, "Close: try was %d on completion\n", try); 524 rio_dprintk(RIO_DEBUG_TTY, "Close: try was %d on completion\n", try);
524 525
525 /* RIOPreemptiveCmd(p, PortP, FCLOSE); */ 526 /* RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE); */
526 527
527/* 528/*
528** 15.10.1998 ARG - ESIL 0761 part fix 529** 15.10.1998 ARG - ESIL 0761 part fix