diff options
Diffstat (limited to 'drivers/char/rocket.c')
-rw-r--r-- | drivers/char/rocket.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index f59fc5cea067..63d5b628477a 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -872,11 +872,16 @@ static int carrier_raised(struct tty_port *port) | |||
872 | return (sGetChanStatusLo(&info->channel) & CD_ACT) ? 1 : 0; | 872 | return (sGetChanStatusLo(&info->channel) & CD_ACT) ? 1 : 0; |
873 | } | 873 | } |
874 | 874 | ||
875 | static void raise_dtr_rts(struct tty_port *port) | 875 | static void dtr_rts(struct tty_port *port, int on) |
876 | { | 876 | { |
877 | struct r_port *info = container_of(port, struct r_port, port); | 877 | struct r_port *info = container_of(port, struct r_port, port); |
878 | sSetDTR(&info->channel); | 878 | if (on) { |
879 | sSetRTS(&info->channel); | 879 | sSetDTR(&info->channel); |
880 | sSetRTS(&info->channel); | ||
881 | } else { | ||
882 | sClrDTR(&info->channel); | ||
883 | sClrRTS(&info->channel); | ||
884 | } | ||
880 | } | 885 | } |
881 | 886 | ||
882 | /* | 887 | /* |
@@ -934,7 +939,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp) | |||
934 | /* | 939 | /* |
935 | * Info->count is now 1; so it's safe to sleep now. | 940 | * Info->count is now 1; so it's safe to sleep now. |
936 | */ | 941 | */ |
937 | if (!test_bit(ASYNC_INITIALIZED, &port->flags)) { | 942 | if (!test_bit(ASYNCB_INITIALIZED, &port->flags)) { |
938 | cp = &info->channel; | 943 | cp = &info->channel; |
939 | sSetRxTrigger(cp, TRIG_1); | 944 | sSetRxTrigger(cp, TRIG_1); |
940 | if (sGetChanStatus(cp) & CD_ACT) | 945 | if (sGetChanStatus(cp) & CD_ACT) |
@@ -958,7 +963,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp) | |||
958 | sEnRxFIFO(cp); | 963 | sEnRxFIFO(cp); |
959 | sEnTransmit(cp); | 964 | sEnTransmit(cp); |
960 | 965 | ||
961 | set_bit(ASYNC_INITIALIZED, &info->port.flags); | 966 | set_bit(ASYNCB_INITIALIZED, &info->port.flags); |
962 | 967 | ||
963 | /* | 968 | /* |
964 | * Set up the tty->alt_speed kludge | 969 | * Set up the tty->alt_speed kludge |
@@ -1641,7 +1646,7 @@ static int rp_write(struct tty_struct *tty, | |||
1641 | /* Write remaining data into the port's xmit_buf */ | 1646 | /* Write remaining data into the port's xmit_buf */ |
1642 | while (1) { | 1647 | while (1) { |
1643 | /* Hung up ? */ | 1648 | /* Hung up ? */ |
1644 | if (!test_bit(ASYNC_NORMAL_ACTIVE, &info->port.flags)) | 1649 | if (!test_bit(ASYNCB_NORMAL_ACTIVE, &info->port.flags)) |
1645 | goto end; | 1650 | goto end; |
1646 | c = min(count, XMIT_BUF_SIZE - info->xmit_cnt - 1); | 1651 | c = min(count, XMIT_BUF_SIZE - info->xmit_cnt - 1); |
1647 | c = min(c, XMIT_BUF_SIZE - info->xmit_head); | 1652 | c = min(c, XMIT_BUF_SIZE - info->xmit_head); |
@@ -2250,7 +2255,7 @@ static const struct tty_operations rocket_ops = { | |||
2250 | 2255 | ||
2251 | static const struct tty_port_operations rocket_port_ops = { | 2256 | static const struct tty_port_operations rocket_port_ops = { |
2252 | .carrier_raised = carrier_raised, | 2257 | .carrier_raised = carrier_raised, |
2253 | .raise_dtr_rts = raise_dtr_rts, | 2258 | .dtr_rts = dtr_rts, |
2254 | }; | 2259 | }; |
2255 | 2260 | ||
2256 | /* | 2261 | /* |