diff options
Diffstat (limited to 'drivers/char/rio/riotty.c')
-rw-r--r-- | drivers/char/rio/riotty.c | 25 |
1 files changed, 13 insertions, 12 deletions
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 |