]> git.karo-electronics.de Git - karo-tx-linux.git/commit
parisc : Remove broken line wrapping handling pdc_iodc_print()
authorGuy Martin <gmsoft@tuxicoman.be>
Mon, 6 Dec 2010 15:48:04 +0000 (16:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:45 +0000 (15:14 -0800)
commit49ae676572f86b2603bd3bd3f246a7c84ec25492
treee37d98bb95addc850e621d4764f025e3abc81806
parent97a3d0d9889f415e0415b7ccc50aa52f8942b216
parisc : Remove broken line wrapping handling pdc_iodc_print()

commit fbea668498e93bb38ac9226c7af9120a25957375 upstream.

Remove the broken line wrapping handling in pdc_iodc_print().
It is broken in 3 ways :
  - It doesn't keep track of the current screen position, it just
    assumes that the new buffer will be printed at the begining of the
    screen.
  - It doesn't take in account that non printable characters won't
    increase the current position on the screen.
  - And last but not least, it triggers a kernel panic if a backspace
    is the first char in the provided buffer :

 Backtrace:
  [<0000000040128ec4>] pdc_console_write+0x44/0x78
  [<0000000040128f18>] pdc_console_tty_write+0x20/0x38
  [<000000004032f1ac>] n_tty_write+0x2a4/0x550
  [<000000004032b158>] tty_write+0x1e0/0x2d8
  [<00000000401bb420>] vfs_write+0xb8/0x188
  [<00000000401bb630>] sys_write+0x68/0xb8
  [<0000000040104eb8>] syscall_exit+0x0/0x14

Most terminals handle the line wrapping just fine. I've confirmed that
it works correctly on a C8000 with both vga and serial output.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/parisc/kernel/firmware.c