23 Jun, 2009

1 commit

  • In zs_console_putchar() occurs:

    if (zs_transmit_drain(zport, irq))
    write_zsdata(zport, ch);

    However if in zs_transmit_drain() no empty Tx Buffer occurs, limit reaches
    -1 => true, and the write still occurs.

    This patch changes postfix to prefix decrements in this and similar
    functions to prevent similar mistakes in the future. This decreases the
    iterations with one but the chosen loop count was arbitrary anyway.

    In sunhv limit reaches -1, not 0, so the test is off by one.

    Signed-off-by: Roel Kluin
    Acked-by: David S. Miller
    Acked-by: Maciej W. Rozycki
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Roel Kluin
     

25 Jul, 2008

1 commit

  • Changes to the generic console support code that happened a while ago
    introduced a scenario where the initial console is used in parallel with
    the final console during a brief period when switching between the two is
    in progress. During that time a message about the switch-over is printed.

    With some combinations of chips, firmware and drivers, such as the Zilog
    Z85C30 SCC used with the DECstation, a hang may happen because the
    firmware used for the initial console may not expect the state of the chip
    after it has been initialised by the driver. This is not a bug in the
    firmware, as some registers it would have to examine are write-only.

    This is a workaround for the Z85C30 which reuses the power-management
    callback to keep the transmitter of the line associated with the console
    enabled. It reflects the consensus reached in a discussion a while ago.

    Signed-off-by: Maciej W. Rozycki
    Cc: Jiri Slaby
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     

21 Jul, 2008

1 commit


18 Jul, 2007

1 commit

  • This is a reimplementation of the zs driver for the serial subsystem. Any
    resemblance to the old driver is purely coincidential. ;-) I do hope I got
    the handling of modem lines right -- better do not tackle me about the
    issue unless you feel too good...

    Any users of the old driver: please note the numbers of the serial lines
    have now been swapped, i.e. ttyS0 ttyS1 and ttyS2 ttyS3. It has
    to do with the modem lines mentioned above; basically the port A in a given
    chip has to be initialised before the port B if you want to use the latter
    as the serial console (which is usually the case), as operations on modem
    lines of the serial line associated with the port B access both ports (see
    the comment at the top of the driver for the details of wiring used).
    Please update your scripts.

    This is also the reason each SCC now requests an IRQ once only (as seen in
    "/proc/interrupts") -- the handler takes care of both ports at once as the
    line associated with the port B has to take status update interrupts from
    both ports (and yet the line of the port A takes its own for itself too).
    The old driver never got it right...

    Signed-off-by: Maciej W. Rozycki
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki