summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* XTENSA: iss/console, use setup_timerJiri Slaby2012-03-081-4/+1
| | | | | | | | Use setup_timer instead of explicit assignments. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* NET: pc300, show version info from module initJiri Slaby2012-03-081-7/+2
| | | | | | | | | | | | | Again, no need to do that from the pci probe function. Hmm, I noticed this driver is marked as BROKEN. Won't touch it more, it has to be converted to dynamic tty driver allocation first. Perhaps it is time to move it to staging? Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* NET: pc300, do not zero global variablesJiri Slaby2012-03-082-22/+0
| | | | | | | | | | | | They are in .bss which is initialized to zeros when the module is loaded/kernel booted. What a strange way to do the initialization once in the pci probe routine... Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: ipwireless, fix tty->index handlingJiri Slaby2012-03-081-23/+13
| | | | | | | | | | | | | | | | | * do not test if tty->index is in bounds. It is always. * tty->index is not a minor! Fix that. >From now on, let's assume that the parameter of the function is tty index with base being zero. This makes also the code more readable. Factually, there is no real change as tty_driver->minor_start is zero, so the tests are equivalent. But it did not make sense. And if this had changed eventually, it would have caused troubles. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: David Sterba <dsterba@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: remove unneeded tty->index checksJiri Slaby2012-03-0821-95/+38
| | | | | | | | | | | | | Checking if tty->index is in bounds is not needed. The tty has the index set in the initial open. This is done in get_tty_driver. And it can be only in interval <0,driver->num). So remove the tests which check exactly this interval. Some are left untouched as they check against the current backing device count. (Leaving apart that the check is racy in most of the cases.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: serialP, remove DECLARE_WAITQUEUE checkJiri Slaby2012-03-081-6/+0
| | | | | | | | The macro is always defined now. This was there only for historical reasons. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: srmcons, convert to use tty_portJiri Slaby2012-03-081-15/+17
| | | | | | | | | | | | This is needed because the tty buffer will become a tty_port member later. That will help us to wipe out most of the races and checks for the tty pointer in hot paths. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALPHA: srmcons, fix racy singleton structureJiri Slaby2012-03-081-35/+5
| | | | | | | | | | | | The test and the assignment were racy. Make it really a singleton. This is achieved by one global variable initialized at the module init. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALPHA: srmcons, use timer functionsJiri Slaby2012-03-081-9/+5
| | | | | | | | | | | It makes the code more readable. We move the setup to the allocation location because we need to initialize timers only once. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: tty_driver, document tty->ops->shutdown limitationJiri Slaby2012-03-081-0/+2
| | | | | | | | | | | | | | | Note that tty->ops->shutdown is called from whatever context the user drops the last tty reference from. E.g. if one takes a reference in an ISR, tty close happens on other CPU and the final tty put is from the ISR, tty->ops->shutdown will be called from that hard irq context. We would have a problem in vt if we start using tty refcounting from other contexts than user there. It is because vt's shutdown uses mutexes. This is yet to be fixed. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: serial, simplify ASYNC_USR_MASKJiri Slaby2012-03-081-2/+2
| | | | | | | By using ASYNC_SPD_MASK instead of the single speed bits. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: remove tty driver re-set from tty_reopenJiri Slaby2012-03-081-1/+0
| | | | | | | | | | | | | This is from tty_reopen: struct tty_driver *driver = tty->driver; ... tty->driver = driver; and it doesn't make sense at all. The driver is intended to be set in initialize_tty_struct from tty_init_dev (initial open). So this set in tty_reopen is not needed. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: simplify tty_driver_lookup_tty a bitJiri Slaby2012-03-081-4/+1
| | | | | | | Remove the useless local variable and return the value itself. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: remove re-assignments to tty_driver membersJiri Slaby2012-03-0841-59/+3
| | | | | | | | | | | | | | All num, magic and owner are set by alloc_tty_driver. No need to re-set them on each allocation site. pti driver sets something different to what it passes to alloc_tty_driver. It is not a bug, since we don't use the lines parameter in any way. Anyway this is fixed, and now we do the right thing. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: remove minor_num from tty_driverJiri Slaby2012-03-082-2/+0
| | | | | | | | It was added back in 2004 and never used for anything real. Remove the only assignment in the tree as well. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: let alloc_tty_driver deduce the owner automaticallyJiri Slaby2012-03-082-3/+7
| | | | | | | | | | | | | Like the rest of the kernel, make a stub from alloc_tty_driver which calls __alloc_tty_driver with proper owner. This will save us one more assignment on the driver side. Also this fixes some drivers which didn't set the owner. This allowed user to remove the module from the system even though a tty from the driver is still open. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: tty_io, remove buffer re-assignmentsJiri Slaby2012-03-081-1/+0
| | | | | | | | | TTY buffer head and tail are initialized in tty_buffer_init. No need to do it once again in initialize_tty_struct where tty_buffer_init is called. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: cdc-acm, use tty_standard_installJiri Slaby2012-03-081-6/+1
| | | | | | | | | | | | This is a piece I missed the last time. Do not copy the functionality all over the tree. Instead, use the helper the tty layer provides us with. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Oliver Neukum <oneukum@suse.de> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: tackle the main part of the selection logicAlan Cox2012-03-082-8/+33
| | | | | | | | We leave the existing paste mess alone and just fix up the vt side of things. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: waitevent is self locked so drop the tty_lockAlan Cox2012-03-081-9/+2
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: push down tioclinux casesAlan Cox2012-03-083-8/+18
| | | | | | | | Some of this ventures into selection which is still a complete lost cause. We are not making it any worse. It's completely busted anyway. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: push down the tty lock so we can see what is left to tackleAlan Cox2012-03-082-37/+59
| | | | | | | | | | | | | At this point we have the tty_lock guarding a couple of oddities, plus the translation and unimap still. We also extend the console_lock in a couple of spots where coverage is wrong and switch vcs_open to use the right lock ! [Fixed the locking issue Jiri reported] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: sort out locking for font handlingAlan Cox2012-03-081-10/+13
| | | | | | | | The font methods are console_lock covered. Unfortunately they don't extend the lock over all the needed tests. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: cyclades: TIOCSERGETLSR should should store to a uintDan Carpenter2012-03-081-1/+1
| | | | | | | | | | TIOCSERGETLSR should be saved in a uint so the cast here to unsigned long is a bug. Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: OMAP: Fix oops due to NULL pdata in DT bootCousson, Benoit2012-03-081-3/+3
| | | | | | | | | | | | | | The following commit: be4b0281956c5cae4f63f31f11d07625a6988766 (tty: serial: OMAP: block idle while the UART is transferring data in PIO mode), is introducing an oops if OMAP is booted using device tree blob because the pdata will not be initialized. Check if pdata is set before de-referencing it. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Reviewed-by: Paul Walmsley <paul@pwsan.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt:tackle kbd_tableAlan Cox2012-03-0810-377/+660
| | | | | | | | | | | | | | | | | | | | | Keyboard struct lifetime is easy, but the locking is not and is completely ignored by the existing code. Tackle this one head on - Make the kbd_table private so we can run down all direct users - Hoick the relevant ioctl handlers into the keyboard layer - Lock them with the keyboard lock so they don't change mid keypress - Add helpers for things like console stop/start so we isolate the poking around properly - Tweak the braille console so it still builds There are a couple of FIXME locking cases left for ioctls that are so hideous they should be addressed in a later patch. After this patch the kbd_table is private and all the keyboard jiggery pokery is in one place. This update fixes speakup and also a memory leak in the original. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: delete briq_panel.c driverGreg Kroah-Hartman2012-03-083-282/+0
| | | | | | | | | | | | This driver is broken, as reported by Jiri, and to quote Ben: Just remove the driver, I don't think anybody cares. so I'm doing just that here. Reported-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Josh Boyer <jwboyer@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: keyboard.c: add uaccess.h to fix a build problem on sparc32Greg Kroah-Hartman2012-02-271-0/+1
| | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: tidy a few bits of checkpatch noiseAlan Cox2012-02-241-9/+9
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: lock the accent tableAlan Cox2012-02-243-78/+168
| | | | | | | | | | | | First step to debletcherising the vt console layer - pick a victim and fix the locking This is a nice simple object with its own rules so lets pick it out for treatment. The user of the table already has a lock so we will also use the same lock for updates. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "TTY: pty, remove superfluous ptm test"Greg Kroah-Hartman2012-02-241-1/+4
| | | | | | | | | | | This reverts commit a50f724a432997321cabb6c9e665c28e34850f78. Sasha reported that this causes problems, so revert it. Cc: Alan Cox <alan@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "TTY: get rid of BTM around devpts_*"Greg Kroah-Hartman2012-02-242-3/+5
| | | | | | | | | | This reverts commit d3bda5298aad98c7a27678bdd0dd9d008ab9e685. Sasha reported that this causes problems, so revert it. Cc: Sasha Levin <levinsasha928@gmail.com> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* amba-pl011​/dma: Add check for the residue in DMA callbackChanho Min2012-02-241-1/+16
| | | | | | | | | | | | In DMA-operated uart, I found that rx data can be taken by the UART interrupts during the DMA irq handler. pl011_int is occurred just before it goes inside spin_lock_irq. When it returns to the callback, DMA buffer already has been flushed. Then, pl011_dma_rx_chars gets invalid data. So I add check for the residue as the patch bellow. Signed-off-by: Chanho Min <chanho.min@lge.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: samsung: fix s3c2442 platform dataDenis 'GNUtoo' Carikli2012-02-241-1/+1
| | | | | | | | | | | | | | | Without that fix machines having a s3c2442 CPU have something like that in dmesg: samsung-uart s3c2440-uart.0: could not find driver data samsung-uart s3c2440-uart.1: could not find driver data samsung-uart s3c2440-uart.2: could not find driver data And serial is never initialized. The previous log was obtained trough early printk on the gta02 machine. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/powerpc: early udbg consoles can't be modulesStephen Rothwell2012-02-241-1/+1
| | | | | | | | | | | | | Fixes these build errors: ERROR: ".udbg_printf" [drivers/tty/ehv_bytechan.ko] undefined! ERROR: ".register_early_udbg_console" [drivers/tty/ehv_bytechan.ko] undefined! ERROR: "udbg_putc" [drivers/tty/ehv_bytechan.ko] undefined! Cc: Timur Tabi <timur@freescale.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: Fix typo in sn_console.cMasanari Iida2012-02-241-2/+2
| | | | | | | | Correct spelling "receieve" to "receive" in drivers/tty/serial/sn_console.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/serial/mux.c: linux/tty.h included twiceDanny Kukawka2012-02-241-1/+0
| | | | | | | | drivers/tty/serial/mux.c included 'linux/tty.h' twice, remove the duplicate. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.hPaul Gortmaker2012-02-108-13/+10
| | | | | | | | | | | There are multiple users of this file from different source paths now, and rather than have ../ paths in include statements, just move the file to the linux header dir. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'tty-3.3-rc3' tty-nextGreg Kroah-Hartman2012-02-1034-230/+1152
|\ | | | | | | | | | | | | This is needed to handle the 8250 file merge mess properly for future patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: altera_uart: Add CONSOLE_POLL supportTobias Klauser2012-02-092-1/+25
| | | | | | | | | | | | | | This allows altera_uart to be used for KGDB debugging over serial line. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: altera_uart: remove early_altera_uart_setupTobias Klauser2012-02-092-27/+0
| | | | | | | | | | | | | | | | The function has no users inside the tree and the nios2 (out-of-mainline) port doesn't use it either (anymore). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * sysrq: Properly check for kernel threadsAnton Vorontsov2012-02-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a real possibility of killing kernel threads that might have issued use_mm(), so kthread's mm might become non-NULL. This patch fixes the issue by checking for PF_KTHREAD (just as get_task_mm()). Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * sysrq: Fix possible race with exiting taskAnton Vorontsov2012-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | sysrq should grab the tasklist lock, otherwise calling force_sig() is not safe, as it might race with exiting task, which ->sighand might be set to NULL already. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: trivail cleanup by removing the pch_uart_hal_request()Feng Tang2012-02-091-13/+3
| | | | | | | | | | | | | | | | | | pch_uart_hal_request() has parameters which it never uses, also it is very short, so merge it with its caller to make code cleaner. No functional changes at all. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: trivial cleanup by removing the get_msr()Feng Tang2012-02-091-21/+8
| | | | | | | | | | | | | | | | | | The short get_msr() has some unnecessary code and only used once, so merge it with its caller to make code cleaner. No functional change at all. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: add debugfs hook for register dumpFeng Tang2012-02-091-0/+84
| | | | | | | | | | | | | | | | | | This driver will be use as interfaces for multiple kinds of devices like Bluetooth/GPS etc, this debug hook will make driver debugging much easier. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: get rid of BTM around devpts_*Jiri Slaby2012-02-022-5/+3
| | | | | | | | | | | | | | | | devpts operations are protected by inode mutexes and dentry refcounting. There is no need to hold BTM. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: pty, remove superfluous ptm testJiri Slaby2012-02-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code looks like: if (tty->driver->subtype == PTY_TYPE_MASTER) { ... if (tty->driver == ptm_driver) But the second if is superfluous because only the ptm_driver is of PTY_TYPE_MASTER subtype. Also we can remove the #if now because devpts_pty_kill is defined as an empty function for non-CONFIG_UNIX98_PTYS configs. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: use tty_standard_installJiri Slaby2012-02-024-23/+9
| | | | | | | | | | | | | | | | | | Use the helper in the rest of the tty drivers. This is a simple replacement. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: serial, use tty_standard_installJiri Slaby2012-02-021-10/+6
| | | | | | | | | | | | | | | | | | But before that we need to reorder the calls so that we don't need to lower the reference counts if usb_autopm_get_interface fails. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud