History log of /drivers/tty/serial/jsm/jsm_driver.c
Revision Date Author Comments
26aa38cafae0dbef3b2fe75ea487c83313c36d45 09-Jan-2012 Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com> jsm: Fixed EEH recovery error

There was an error on the jsm driver that would cause it to be unable to
recover after a second error is detected.

At the first error, the device recovers properly:

[72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0
[72521.485695] EEH: This PCI device has failed 1 times in the last hour:
...
[72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm
[72532.105689] jsm: Port 3 added

However, at the second error, it cascades until EEH disables the device:

[72631.229549] Call Trace:
...
[72641.725687] jsm: Port 3 added
[72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0
[72641.725698] EEH: This PCI device has failed 3 times in the last hour:

It was caused because the PCI state was not being saved after the first
restore. Therefore, at the second recovery the PCI state would not be
restored.

Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
578b9ce0095ff3dd2c3b94508407c3be8fcce68d 27-May-2011 Paul Gortmaker <paul.gortmaker@windriver.com> tty: Add module.h to drivers/tty users who just expect it there.

We are cleaning up the issue that means module.h is omnipresent.
These tty users are the people who implictly are relying on that.
Fix up the real users to call out the include that they really need.

In the case of jsm_driver.c file, it had moduleparam.h but that
isn't enough and it needs the full module.h

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9d898966c4a07e4a5092215b5a2829d0ef02baa2 24-Aug-2011 Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> jsm: remove buggy write queue

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root@hostname ~]$ cat /dev/ttyn1 > cascardo/dump &
[1] 2658
[root@hostname ~]$ cat /proc/tty/drivers > /dev/ttyn0
[root@hostname ~]$ cat /proc/tty/drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
jsm /dev/ttyn 250 0-31 serial
serial /dev/ttyS 4 64-95 serial
hvc /dev/hvc 229 0-7 system
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
[root@hostname ~]$ cat cascardo/dump
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaste[root@hostname ~]$

This patch drops the driver write queue entirely, using the circular
buffer from uart_core only.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
d64bbeb57f9901b6919fabd1e5a555e94748c255 24-Aug-2011 Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> jsm: remove remaining flip buffer code

The flip buffer is not used anymore. Remove its allocation and
declaration in the board structure.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
af99d6f0037d970084b03d9690f50e34d6f70dae 01-Jun-2011 Lennart Sorensen <lsorense@csclub.uwaterloo.ca> serial: ioremap warning fix for jsm driver.

I saw a warning about ioremap from the jsm driver on a system which
looked like this:

resource map sanity check conflict: 0xe0200800 0xe02017ff 0xe0200800 0xe0200fff 0000:01:08.0

Turns out the warning is valid. The jsm driver has been asking to ioremap
0x1000 forever, but in fact only 8 port chips have 0x1000 bytes of memory.
4 port chips have 0x800 and 2 port chips have 0x400 according to the
data sheet. It makes more sense to map the size of the region rather
than a hard coded value. If you happen to have the region legitimately
mapped to a base address that is not 4K aligned, ioremap complains
otherwise.

Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ab4382d27412e7e3e7c936e8d50d8888dfac3df8 13-Jan-2011 Greg Kroah-Hartman <gregkh@suse.de> tty: move drivers/serial/ to drivers/tty/serial/

The serial drivers are really just tty drivers, so move them to
drivers/tty/ to make things a bit neater overall.

This is part of the tty/serial driver movement proceedure as proposed by
Arnd Bergmann and approved by everyone involved a number of months ago.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
Cc: Michael H. Warfield <mhw@wittsend.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>