Adrian Bunk wrote: > On Mon, Oct 09, 2006 at 08:37:45AM +0200, Rogier Wolff wrote: > > On Mon, Oct 09, 2006 at 12:18:19AM +0200, Adrian Bunk wrote: > > > + if (baud == 38400) { > > > if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) > > > baud ++; > > > if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) > > > baud += 2; > > > } > > > > > > Increasing the index for baud_table[] by 1 or 2 is quite different from > > > increasing baud by 1 or 2. > > > > In that range, > > baud <<= 1; > > and > > baud <<= 2; > > > > should work. > > Thanks for the hint. > > What about the patch below? > @@ -1090,9 +1085,9 @@ > > if (baud == 38400) { > if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) > - baud ++; > + baud <<= 1; > if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) > - baud += 2; > + baud <<= 2; > } > > if (!baud) { Neither is 38400 <<= 1 == 57600 nor is 38400 <<= 2 == 115200. You should just set baud to the value you want instead of doing tricks here. Eike
Attachment:
pgpIEzFIza2qA.pgp
Description: PGP signature
- Follow-Ups:
- [2.6.19 patch] drivers/char/specialix.c: fix the baud conversion
- From: Adrian Bunk <[email protected]>
- [2.6.19 patch] drivers/char/specialix.c: fix the baud conversion
- References:
- drivers/char/specialix.c: broken baud conversion
- From: Adrian Bunk <[email protected]>
- Re: drivers/char/specialix.c: broken baud conversion
- From: Rogier Wolff <[email protected]>
- [2.6.19 patch] drivers/char/specialix.c: fix the baud conversion
- From: Adrian Bunk <[email protected]>
- drivers/char/specialix.c: broken baud conversion
- Prev by Date: Re: [PATCH 0/3] Fix IO error reporting on fsync()
- Next by Date: [PATCH] ixgb: Delete IXGB_DBG() macro and call pr_debug() directly.
- Previous by thread: [2.6.19 patch] drivers/char/specialix.c: fix the baud conversion
- Next by thread: [2.6.19 patch] drivers/char/specialix.c: fix the baud conversion
- Index(es):