Re: Bug when using custom baud rates....

From: Rogier Wolff
Date: Thu Jan 20 2005 - 10:30:03 EST


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!
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;