Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84629
b: refs/heads/master
c: 6df3526
h: refs/heads/master
i:
  84627: f3b4dbe
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Feb 8, 2008
1 parent 6b848c8 commit 45c427a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: 4edf1827ea19e65ca27ed197384d63f4d1dc8836
refs/heads/master: 6df3526b6649e57a414ba6b4179655341affcf46
18 changes: 8 additions & 10 deletions trunk/drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,10 @@ static void configure_r_port(struct r_port *info,
unsigned rocketMode;
int bits, baud, divisor;
CHANNEL_t *cp;
struct ktermios *t = info->tty->termios;

if (!info->tty || !info->tty->termios)
return;
cp = &info->channel;
cflag = info->tty->termios->c_cflag;
cflag = t->c_cflag;

/* Byte size and parity */
if ((cflag & CSIZE) == CS8) {
Expand Down Expand Up @@ -754,10 +753,7 @@ static void configure_r_port(struct r_port *info,
baud = 9600;
divisor = ((rp_baud_base[info->board] + (baud >> 1)) / baud) - 1;
if ((divisor >= 8192 || divisor < 0) && old_termios) {
info->tty->termios->c_cflag &= ~CBAUD;
info->tty->termios->c_cflag |=
(old_termios->c_cflag & CBAUD);
baud = tty_get_baud_rate(info->tty);
baud = tty_termios_baud_rate(old_termios);
if (!baud)
baud = 9600;
divisor = (rp_baud_base[info->board] / baud) - 1;
Expand All @@ -769,6 +765,9 @@ static void configure_r_port(struct r_port *info,
info->cps = baud / bits;
sSetBaud(cp, divisor);

/* FIXME: Should really back compute a baud rate from the divisor */
tty_encode_baud_rate(info->tty, baud, baud);

if (cflag & CRTSCTS) {
info->intmask |= DELTA_CTS;
sEnCTSFlowCtl(cp);
Expand Down Expand Up @@ -1202,15 +1201,14 @@ static void rp_set_termios(struct tty_struct *tty,

cflag = tty->termios->c_cflag;

if (cflag == old_termios->c_cflag)
return;

/*
* This driver doesn't support CS5 or CS6
*/
if (((cflag & CSIZE) == CS5) || ((cflag & CSIZE) == CS6))
tty->termios->c_cflag =
((cflag & ~CSIZE) | (old_termios->c_cflag & CSIZE));
/* Or CMSPAR */
tty->termios->c_cflag &= ~CMSPAR;

configure_r_port(info, old_termios);

Expand Down

0 comments on commit 45c427a

Please sign in to comment.