aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-02tty: Fix the HSO termios handling a bitAlan Cox1-24/+31
Init the tty structure once Don't set ->low_latency twice in a row Don't force bits we should be leaving to the user Don't allocate termios arrays as these are in fact allocated by the tty layer for you and just overwrite the ones allocated in the driver Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02hso: net driver using tty without lockingAlan Cox1-12/+42
Checking tty == NULL doesn't help us unless we have a clear semantic for the locking of the tty object in the driver. Use the tty kref objects so that we can take references to the tty in the USB event handling paths. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: kref nozomiAlan Cox1-40/+45
Update the nozomi driver to use krefs Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Remove some pointless castsAlan Cox16-150/+150
disc_data and driver_data are void * Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: PTYs set TTY_DO_WRITE_WAKEUP when they don't need toAlan Cox1-3/+0
The write wakeup is done anyway for the poll while DO_WRITE_WAKUP is cleared, set and managed by the ldisc layer and is no business of the pty code. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: N_TTY SIGIO only works for readThomas Pfaff1-3/+3
The N_TTY ldisc layer does not send SIGIO POLL_OUTs correctly when output is possible due to flawed handling of the TTY_DO_WRITE_WAKEUP bit. It will either send no SIGIOs at all or on every tty wakeup. The fix is to set the bit when the tty driver write would block and test and clear it on write wakeup. [Merged with existing N_TTY patches and a small buglet fixed -- Alan] Signed-off-by: Thomas Pfaff <tpfaff@pcs.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: USB tty devices can block in tcdrain when unpluggedAlan Cox1-0/+4
The underlying problem is that the device methods don't all correctly handle disconnected status and some keep reporting bytes pending which causes tcdrain to stall. When the cable is unplugged they are definitely gone, and as this is true for all USB cables we can fix it in the core usb serial code. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02serial: set correct baud_base for Oxford Semiconductor Ltd EXSYS EX-41092 Dual 16950 Serial adapterNiels de Vos2-0/+4
The PCI-card identified as "Oxford Semiconductor Ltd EXSYS EX-41092 Dual 16950 Serial adapter" is only usable with other devices (i.e. not the same card) after doing a "setserial /dev/ttyS<n> baud_base 115200". This baud_base should be default for this card. Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Introduce some close helpers for portsAlan Cox11-391/+126
Again this is a lot of common code we can unify Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: tty port zero baud openAlan Cox1-1/+2
If we have no speed set at some point then we should not raise DTR/RTS at that point when opening as the tty is not ready Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: ESP has been broken for locking etc forverAlan Cox1-1/+1
Mark it broken Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: rework stallion to use the tty_port bitsAlan Cox1-104/+38
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Rework istallion to use the tty port changesAlan Cox2-117/+43
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Introduce a tty_port generic block_til_readyAlan Cox7-235/+115
Start sucking more commonality out of the drivers into a single piece of core code. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: relock the mxser driverAlan Cox1-15/+13
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: relock riscom8 using port locksAlan Cox1-10/+20
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: rocketport uses different port flags to everyone elseAlan Cox3-26/+21
Normalise them so we can use the common helpers later on Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: relock generic_serialAlan Cox1-13/+24
Switch generic_serial to do port count locking via the tty_port structure ready for moving to a common port wait routine. Keep the old driver lock for internal calling so we don't risk messing up the drivers below until we are ready. Still needs kref conversions Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02isicom: redo locking to use tty port locksAlan Cox4-26/+54
This helps set the basis for moving block_til_ready into common code. We also introduce a tty_port_hangup helper as this will also be generally needed. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Pull the dtr raise into tty portAlan Cox7-25/+79
This moves another per device special out of what should be shared open wait paths into private methods Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02rio: Kill off ckmallocAlan Cox1-13/+4
This was an alloc/clear wrapper but makes even less sense now it uses kzalloc. Kill it off. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty_port: Add a port level carrier detect operationAlan Cox19-239/+427
This is the first step to generalising the various pieces of waiting logic duplicated in all sorts of serial drivers. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Fix PPP hang under loadAlan Cox2-9/+22
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02CRED: Wrap task credential accesses in the devpts filesystemDavid Howells1-3/+3
Wrap access to task credentials so that they can be separated more easily from the task_struct during the introduction of COW creds. Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id(). Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more sense to use RCU directly rather than a convenient wrapper; these will be addressed by later patches. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02Add device function for USB serial consoleKevin Hao1-0/+13
Add device funtion for usb serial console, so we can open /dev/console when we use a usb serial device as console. (Typecast removed as noted by Sergei Shtylyov) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02And here's a patch (to be applied on top of the last) which preventsRussell King2-17/+22
this happening again by making use of 'const'. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02Convert the oxsemi tornado special cases to use the quirk interface and notRussell King1-40/+51
scribble on its own reference structures. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02devpts: fix unused function warningAndrew Morton1-1/+1
fs/devpts/inode.c:324: warning: 'compare_init_pts_sb' defined but not used Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Fix close races in USB serialAlan Cox1-5/+10
USB serial has always had races where the tty port usage count can hit zero during a receive event. The internal locking is a mutex so we can't use that in the IRQ handlers. With krefs we can tackle this differently but we still need to be careful. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02n_tty: Output bells immediately on a full bufferJoe Peterson1-17/+9
This patch causes "bell" (^G) characters (invoked when the input buffer is full) to be immediately output rather than filling the echo buffer. This is especially a problem when the tty is stopped and buffers fill, since the bells do not serve their purpose of immediate notification that the buffer cannot take further input, and they will flush all at once when the tty is restarted. Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02n_tty: Fix hanfling of buffer full corner casesJoe Peterson1-17/+38
Fix the handling of input characters when the tty buffer is full or nearly full. This includes tests that are done in n_tty_receive_char() and handling of PARMRK. Problems with the buffer-full tests done in receive_char() caused characters to be lost at times when the buffer(s) filled. Also, these full conditions would often only be detected with echo on, and PARMRK was not accounted for properly in all cases. One symptom of these problems, in addition to lost characters, was early termination from unix commands like tr and cat when ^Q was used to break from a stopped tty with full buffers (note that breaking out was often previously not possible, due to the pty getting in "gridlock", which will be addressed in another patch). Note space is always reserved at the end of the buffer for a newline (or EOF/EOL) in canonical mode. Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02n_tty: Fix handling of control characters and continuationsJoe Peterson1-9/+15
Fix process_output_block to detect continuation characters correctly and to handle control characters even when O_OLCUC is enabled. Make similar change to do_output_char(). Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02pty: simplify resizeAlan Cox6-36/+74
We have special case logic for resizing pty/tty pairs. We also have a per driver resize method so for the pty case we should use it. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02tty: Fix sparse static warning for tty_driver_lookup_ttyJason Wessel1-1/+1
Fixed sparse warning: drivers/char/tty_io.c:1216:19: warning: symbol 'tty_driver_lookup_tty' was not declared. Should it be static? Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02sierra: Fix formattingAlan Cox1-1/+1
Andrew Morton wrote: in drivers/usb/serial/sierra.c: } else { if (urb->actual_length) { + tty = tty_port_tty_get(&port->port); tty_buffer_request_room(tty, urb->actual_length); it's missing a tab. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-02devpts: Coding style clean upAlan Cox1-27/+26
Just nail the oddments now while this code is being touched Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>