Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d340d89087534e8b12e1b6ed1c1569dd892b5465
Commit:     d340d89087534e8b12e1b6ed1c1569dd892b5465
Parent:     5e55e2f5fc95b355d8aa649f346cff69904c8ade
Author:     Daniel Drake <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 26 21:32:15 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Mar 27 09:05:15 2007 -0700

    [PATCH] generic_serial: fix decoding of baud rate
    
    Commit d720bc4b8fc5d6d179ef094908d4fbb5e436ffad partially removed a
    private implementation of baud speed decoding.  However it doesn't seem
    to be complete: after the speed is decoded, it is still being used as an
    index to a local speed table (array overrun, no doubt).
    
    This was found by Graham Murray who noticed it caused a 2.6.19 regression
    with the SX driver: https://bugs.gentoo.org/170554
    
    Signed-off-by: Daniel Drake <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Cc: Russell King <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/generic_serial.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
index 337bbcd..8ea0275 100644
--- a/drivers/char/generic_serial.c
+++ b/drivers/char/generic_serial.c
@@ -710,12 +710,6 @@ void gs_close(struct tty_struct * tty, struct file * filp)
 }
 
 
-static unsigned int     gs_baudrates[] = {
-  0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
-  9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600
-};
-
-
 void gs_set_termios (struct tty_struct * tty, 
                      struct ktermios * old_termios)
 {
@@ -771,7 +765,6 @@ void gs_set_termios (struct tty_struct * tty,
 
        baudrate = tty_get_baud_rate(tty);
 
-       baudrate = gs_baudrates[baudrate];
        if ((tiosp->c_cflag & CBAUD) == B38400) {
                if (     (port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
                        baudrate = 57600;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to