Re: [PATCH] serial: revert "Use block_til_ready helper"
From: Alan Cox
Date: Mon Jun 21 2010 - 10:09:21 EST
> The way that the output is garbled seems to be just missing characters,
> in a mostly reproducible way. Repeatedly writing the string
> abcdefghijklmnopqrstuvwxyz1234567890 into ttyS0 gives an output like
> 'akq7m3iy', where only every sixteenth character is shown, plus
> an extra character in the second position.
Ok this sort of makes sense. Something isn't getting initialised and both
getty and minicom will do a termios set which is sorting it out.
And this is occurring because the generic block_til_ready sets
ASYNCB_NORMAL_ACTIVE so the termios updating gets skipped.
Ok the quickfix for this kernel is to delete this
/*
* If this is the first open to succeed, adjust things to suit.
*/
if (retval == 0 && !(port->flags & ASYNC_NORMAL_ACTIVE)) {
set_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
uart_update_termios(state);
}
and paste it into
void tty_port_raise_dtr_rts(struct tty_port *port)
{
if (port->ops->dtr_rts)
port->ops->dtr_rts(port, 1);
-->> HERE <<--
}
(the mutex is held by the caller)
That should cure it and then we can think about doing it more elegantly
by getting the serial layer to use tty_port_open, kfifo and the like and
removing the tons of repeated crap in all the drivers.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/