public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Bug when using custom baud rates....
@ 2005-01-20 14:54 Rogier Wolff
       [not found] ` <20050120150857.GH13036@kroah.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Rogier Wolff @ 2005-01-20 14:54 UTC (permalink / raw)
  To: lkml, greg, bryder, kuba, ftdi-usb-sio-devel; +Cc: edwin

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

Hi,

When using custom baud rates, the code does: 


       if ((new_serial.baud_base != priv->baud_base) ||
            (new_serial.baud_base < 9600))
                return -EINVAL;

Which translates to english as: 

	If you changed the baud-base, OR the new one is
	invalid, return invalid. 

but it should be:

	If you changed the baud-base, OR the new one is
	invalid, return invalid. 

Patch attached. 

	Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ

[-- Attachment #2: ftdi_fix --]
[-- Type: text/plain, Size: 541 bytes --]

diff -ur linux-2.4.28.clean/drivers/usb/serial/ftdi_sio.c linux-2.4.28.ftdi_fix/drivers/usb/serial/ftdi_sio.c
--- linux-2.4.28.clean/drivers/usb/serial/ftdi_sio.c	Wed Jan 19 16:31:03 2005
+++ linux-2.4.28.ftdi_fix/drivers/usb/serial/ftdi_sio.c	Thu Jan 20 15:47:49 2005
@@ -981,7 +981,7 @@
 		goto check_and_exit;
 	}
 
-	if ((new_serial.baud_base != priv->baud_base) ||
+	if ((new_serial.baud_base != priv->baud_base) &&
 	    (new_serial.baud_base < 9600))
 		return -EINVAL;
 
Only in linux-2.4.28.ftdi_fix/drivers/usb/serial: ftdi_sio.c~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-21  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 14:54 Bug when using custom baud rates Rogier Wolff
     [not found] ` <20050120150857.GH13036@kroah.com>
2005-01-20 15:22   ` Rogier Wolff
2005-01-21  0:03     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox