Messages in this thread | | | Date | Mon, 15 Mar 2010 10:44:00 +0100 | From | Richard Röjfors <> | Subject | Re: [PATCH] serial: Two branches the same in timbuart_set_mctrl() |
| |
Hi Roel,
On 01/17/2010 08:02 PM, Roel Kluin wrote: > Dear Richard Röjfors, > > It is possible that I found a bug in the Timberdale UART driver that was added > to the linux kernel. The patch below tries to fix this, note the RTS to CTS > change, could you confirm whether the patch below changes your driver > correctly?
Thanks for finding this, I have a comment on the patch below.
> > Thank you, > > Roel Kluin > ----------------->8----------------------------8<------------------------------- > Regardless of whether the TIOCM_RTS bit was set in mctrl, the same write > occurred. > > Signed-off-by: Roel Kluin<roel.kluin@gmail.com> > --- > drivers/serial/timbuart.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c > index 34b31da..c433d40 100644 > --- a/drivers/serial/timbuart.c > +++ b/drivers/serial/timbuart.c > @@ -219,7 +219,7 @@ static void timbuart_set_mctrl(struct uart_port *port, unsigned int mctrl) > if (mctrl& TIOCM_RTS) > iowrite8(TIMBUART_CTRL_RTS, port->membase + TIMBUART_CTRL); > else > - iowrite8(TIMBUART_CTRL_RTS, port->membase + TIMBUART_CTRL); > + iowrite8(TIMBUART_CTRL_CTS, port->membase + TIMBUART_CTRL);
This is not completely correct. CTS is a read only bit and we are to stop signal RTS. So the line should look like: iowrite8(0, port->membase + TIMBUART_CTRL);
> } > > static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier)
--Richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |