diff options
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index a420e8d437dd..9533f43a30bb 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -547,14 +547,18 @@ static int mxser_carrier_raised(struct tty_port *port) | |||
547 | return (inb(mp->ioaddr + UART_MSR) & UART_MSR_DCD)?1:0; | 547 | return (inb(mp->ioaddr + UART_MSR) & UART_MSR_DCD)?1:0; |
548 | } | 548 | } |
549 | 549 | ||
550 | static void mxser_raise_dtr_rts(struct tty_port *port) | 550 | static void mxser_dtr_rts(struct tty_port *port, int on) |
551 | { | 551 | { |
552 | struct mxser_port *mp = container_of(port, struct mxser_port, port); | 552 | struct mxser_port *mp = container_of(port, struct mxser_port, port); |
553 | unsigned long flags; | 553 | unsigned long flags; |
554 | 554 | ||
555 | spin_lock_irqsave(&mp->slock, flags); | 555 | spin_lock_irqsave(&mp->slock, flags); |
556 | outb(inb(mp->ioaddr + UART_MCR) | | 556 | if (on) |
557 | UART_MCR_DTR | UART_MCR_RTS, mp->ioaddr + UART_MCR); | 557 | outb(inb(mp->ioaddr + UART_MCR) | |
558 | UART_MCR_DTR | UART_MCR_RTS, mp->ioaddr + UART_MCR); | ||
559 | else | ||
560 | outb(inb(mp->ioaddr + UART_MCR)&~(UART_MCR_DTR | UART_MCR_RTS), | ||
561 | mp->ioaddr + UART_MCR); | ||
558 | spin_unlock_irqrestore(&mp->slock, flags); | 562 | spin_unlock_irqrestore(&mp->slock, flags); |
559 | } | 563 | } |
560 | 564 | ||
@@ -2356,7 +2360,7 @@ static const struct tty_operations mxser_ops = { | |||
2356 | 2360 | ||
2357 | struct tty_port_operations mxser_port_ops = { | 2361 | struct tty_port_operations mxser_port_ops = { |
2358 | .carrier_raised = mxser_carrier_raised, | 2362 | .carrier_raised = mxser_carrier_raised, |
2359 | .raise_dtr_rts = mxser_raise_dtr_rts, | 2363 | .dtr_rts = mxser_dtr_rts, |
2360 | }; | 2364 | }; |
2361 | 2365 | ||
2362 | /* | 2366 | /* |
@@ -2711,7 +2715,7 @@ static int __init mxser_module_init(void) | |||
2711 | continue; | 2715 | continue; |
2712 | 2716 | ||
2713 | brd = &mxser_boards[m]; | 2717 | brd = &mxser_boards[m]; |
2714 | retval = mxser_get_ISA_conf(!ioaddr[b], brd); | 2718 | retval = mxser_get_ISA_conf(ioaddr[b], brd); |
2715 | if (retval <= 0) { | 2719 | if (retval <= 0) { |
2716 | brd->info = NULL; | 2720 | brd->info = NULL; |
2717 | continue; | 2721 | continue; |