aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-10 04:44:54 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:26 -0500
commit7edc136ab688f751037a86e8a051151d7962d33f (patch)
treea2cb492af3947610efb2abedd4df259f97a34664 /drivers/char/isicom.c
parentcb4a10ccb0c5b5b02dec1a4a97cba1e8b2c2a325 (diff)
[PATCH] Char: isicom, support higher rates
Add support for higher baud rates (coming from original isi driver). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index eddb8d3a620e..07bc4a5cb1ef 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -183,7 +183,7 @@ static DEFINE_TIMER(tx, isicom_tx, 0, 0);
183/* baud index mappings from linux defns to isi */ 183/* baud index mappings from linux defns to isi */
184 184
185static signed char linuxb_to_isib[] = { 185static signed char linuxb_to_isib[] = {
186 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19 186 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21
187}; 187};
188 188
189struct isi_board { 189struct isi_board {
@@ -710,7 +710,8 @@ static void isicom_config_port(struct isi_port *port)
710 * respectively. 710 * respectively.
711 */ 711 */
712 712
713 if (baud < 1 || baud > 2) 713 /* 1,2,3,4 => 57.6, 115.2, 230, 460 kbps resp. */
714 if (baud < 1 || baud > 4)
714 port->tty->termios->c_cflag &= ~CBAUDEX; 715 port->tty->termios->c_cflag &= ~CBAUDEX;
715 else 716 else
716 baud += 15; 717 baud += 15;
@@ -726,6 +727,10 @@ static void isicom_config_port(struct isi_port *port)
726 baud++; /* 57.6 Kbps */ 727 baud++; /* 57.6 Kbps */
727 if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) 728 if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
728 baud +=2; /* 115 Kbps */ 729 baud +=2; /* 115 Kbps */
730 if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
731 baud += 3; /* 230 kbps*/
732 if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
733 baud += 4; /* 460 kbps*/
729 } 734 }
730 if (linuxb_to_isib[baud] == -1) { 735 if (linuxb_to_isib[baud] == -1) {
731 /* hang up */ 736 /* hang up */