Bug when using custom baud rates....
Subsystems (2)
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.
Signature · 5 lines
** [email protected] ** 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
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -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~
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 15 lines · Greg KH
Quoted 14 lines · Rogier Wolff
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.
Quoted 6 lines
Quoted 4 lines
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.
Quoted 3 lines
Quoted 1 line
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.
Signature · 3 lines
+-- 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!
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -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 ;
Greg KH
AppliedQuoted 27 lines · Rogier Wolff
Quoted 15 lines · Greg KH
Quoted 14 lines · Rogier Wolff
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.
Quoted 6 lines
Quoted 4 lines
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.
Quoted 2 lines
Quoted 1 line
Patch attached.
Quoted 7 lines
Quoted 1 line
Have a 2.6 patch?
Patch told me:
patching filedrivers/usb/serial/ftdi_sio.c
Hunk #1 succeeded at 1137 (offset 156 lines).but the resulting patch is attached.
Applied, thanks.
greg k-h