Re: [PATCH] serial: revert "Use block_til_ready helper"

From: Arnd Bergmann
Date: Sun Jun 20 2010 - 16:55:15 EST


On Saturday 19 June 2010 23:57:06 Alan Cox wrote:
>
> Important question - does it need a getty or will a simple cat < /dev/foo
> twice get garbled (or cat > if its garbling the other way)
>
> Which direction matters and whether a hangup is needed matters

What I see is totally reproducible but does not make any sense to me.
In my test setup I have a serial cable between /dev/ttyS0 (on-board
16550A) and /dev/ttyUSB0 on the same machine.

When I start minicom on ttyS0 (or cat, for that matter), and start
a getty on ttyUSB0 (or write into it any other way), everything is
totally fine.

I can observe the following problems when I start minicom on ttyUSB0:
- writing to ttyS0 using cat alone gives garbled output
- writing to ttyS0 using minicom always works
- running a getty on ttyS0 lets me log in once
- writing to ttyS0 using cat works fine while a working getty or minicom
also has ttyS0 open
- running the getty on ttyS0 a second time gives me the same garbled
output as cat gives me

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.

Arnd
--
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/