Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163818
b: refs/heads/master
c: 46fb782
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Live-CD User committed Sep 19, 2009
1 parent df9f3c5 commit 5b94607
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3aeea5b92210083c7cffd4f08a0bb141d3f2d574
refs/heads/master: 46fb782522092f772c6ce2b129f201ca6e1e15a2
45 changes: 14 additions & 31 deletions trunk/drivers/char/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,8 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
channel = info->line - card->first_line;

if (!cy_is_Z(card)) {
u32 cflags;

/* baud rate */
baud = tty_get_baud_rate(tty);
if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
Expand Down Expand Up @@ -2198,37 +2200,18 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
(info->default_timeout ? info->default_timeout : 0x02));
/* 10ms rx timeout */

if (C_CLOCAL(tty)) {
/* without modem intr */
cyy_writeb(info, CySRER,
cyy_readb(info, CySRER) | CyMdmCh);
/* act on 1->0 modem transitions */
if ((cflag & CRTSCTS) && info->rflow) {
cyy_writeb(info, CyMCOR1,
(CyCTS | rflow_thr[i]));
} else {
cyy_writeb(info, CyMCOR1,
CyCTS);
}
/* act on 0->1 modem transitions */
cyy_writeb(info, CyMCOR2, CyCTS);
} else {
/* without modem intr */
cyy_writeb(info, CySRER,
cyy_readb(info, CySRER) | CyMdmCh);
/* act on 1->0 modem transitions */
if ((cflag & CRTSCTS) && info->rflow) {
cyy_writeb(info, CyMCOR1,
(CyDSR | CyCTS | CyRI | CyDCD |
rflow_thr[i]));
} else {
cyy_writeb(info, CyMCOR1,
CyDSR | CyCTS | CyRI | CyDCD);
}
/* act on 0->1 modem transitions */
cyy_writeb(info, CyMCOR2,
CyDSR | CyCTS | CyRI | CyDCD);
}
cflags = CyCTS;
if (!C_CLOCAL(tty))
cflags |= CyDSR | CyRI | CyDCD;
/* without modem intr */
cyy_writeb(info, CySRER, cyy_readb(info, CySRER) | CyMdmCh);
/* act on 1->0 modem transitions */
if ((cflag & CRTSCTS) && info->rflow)
cyy_writeb(info, CyMCOR1, cflags | rflow_thr[i]);
else
cyy_writeb(info, CyMCOR1, cflags);
/* act on 0->1 modem transitions */
cyy_writeb(info, CyMCOR2, cflags);

if (i == 0) /* baud rate is zero, turn off line */
cyy_change_rts_dtr(info, 0, TIOCM_DTR);
Expand Down

0 comments on commit 5b94607

Please sign in to comment.