* 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[parent not found: <20050120150857.GH13036@kroah.com>]
* Re: Bug when using custom baud rates.... [not found] ` <20050120150857.GH13036@kroah.com> @ 2005-01-20 15:22 ` Rogier Wolff 2005-01-21 0:03 ` Greg KH 0 siblings, 1 reply; 3+ messages in thread From: Rogier Wolff @ 2005-01-20 15:22 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel, bryder, kuba, ftdi-usb-sio-devel, edwin [-- Attachment #1: Type: text/plain, Size: 1043 bytes --] On Thu, Jan 20, 2005 at 07:08:58AM -0800, Greg KH wrote: > On Thu, Jan 20, 2005 at 03:54:22PM +0100, Rogier Wolff wrote: > > 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. > > You mean AND, not OR here, right? :) :-) Sorry. Too noisy here. > > Patch attached. > > Have a 2.6 patch? Patch told me: patching file drivers/usb/serial/ftdi_sio.c Hunk #1 succeeded at 1137 (offset 156 lines). but the resulting patch is attached. Roger. -- +-- Rogier Wolff -- www.harddisk-recovery.nl -- 0800 220 20 20 -- | Files foetsie, bestanden kwijt, alle data weg?! | Blijf kalm en neem contact op met Harddisk-recovery.nl! [-- Attachment #2: ftdi_2.6fix --] [-- Type: text/plain, Size: 499 bytes --] diff -ur linux-2.6.11-r1-clean/drivers/usb/serial/ftdi_sio.c linux-2.6.11-r1-ftdio_fix/drivers/usb/serial/ftdi_sio.c --- linux-2.6.11-r1-panoramix/drivers/usb/serial/ftdi_sio.c Wed Jan 12 09:19:32 2005 +++ linux-2.6.11-r1-ftdio_fix/drivers/usb/serial/ftdi_sio.c Thu Jan 20 16:20:24 2005 @@ -1137,7 +1137,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; ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug when using custom baud rates.... 2005-01-20 15:22 ` Rogier Wolff @ 2005-01-21 0:03 ` Greg KH 0 siblings, 0 replies; 3+ messages in thread From: Greg KH @ 2005-01-21 0:03 UTC (permalink / raw) To: Rogier Wolff; +Cc: linux-kernel, bryder, kuba, ftdi-usb-sio-devel, edwin On Thu, Jan 20, 2005 at 04:22:56PM +0100, Rogier Wolff wrote: > On Thu, Jan 20, 2005 at 07:08:58AM -0800, Greg KH wrote: > > On Thu, Jan 20, 2005 at 03:54:22PM +0100, Rogier Wolff wrote: > > > 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. > > > > You mean AND, not OR here, right? :) > > :-) Sorry. Too noisy here. > > > > Patch attached. > > > > Have a 2.6 patch? > > Patch told me: > patching file drivers/usb/serial/ftdi_sio.c > Hunk #1 succeeded at 1137 (offset 156 lines). > > but the resulting patch is attached. Applied, thanks. greg k-h ^ 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