aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-29tty: fix ldisc lock inversion traceAlan Cox1-16/+25
This is caused by tty_release using tty_lock_pair to lock both sides of the pty/tty pair, and then tty_ldisc_release dropping and relocking one side only. We can drop both fine, so drop both to avoid any lock ordering concerns. Rework the release path to fix the new locking model. Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29pty: Fix lock inversionAlan Cox1-2/+0
The ptmx_open path takes the tty and devpts locks in the wrong order because tty_init_dev locks and returns a locked tty. As far as I can tell this is actually safe anyway because the tty being returned is new so nobody can get a reference to lock it at this point. However we don't even need the devpts lock at this point, it's only held as a byproduct of the way the locks were pushe down. Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-26Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-15/+23
Pull arm-soc clock driver changes from Olof Johansson: "The new clock subsystem was merged in linux-3.4 without any users, this now moves the first three platforms over to it: imx, mxs and spear. The series also contains the changes for the clock subsystem itself, since Mike preferred to have it together with the platforms that require these changes, in order to avoid interdependencies and conflicts." Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code removed in one branch, added OF support in another) and drivers/dma/imx-sdma.c (independent changes next to each other). * tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits) clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate(). clk: Provide dummy clk_unregister() SPEAr: Update defconfigs SPEAr: Add SMI NOR partition info in dts files SPEAr: Switch to common clock framework SPEAr: Call clk_prepare() before calling clk_enable SPEAr: clk: Add General Purpose Timer Synthesizer clock SPEAr: clk: Add Fractional Synthesizer clock SPEAr: clk: Add Auxiliary Synthesizer clock SPEAr: clk: Add VCO-PLL Synthesizer clock SPEAr: Add DT bindings for SPEAr's timer ARM i.MX: remove now unused clock files ARM: i.MX6: implement clocks using common clock framework ARM i.MX35: implement clocks using common clock framework ARM i.MX5: implement clocks using common clock framework ARM: Kirkwood: Replace clock gating ARM: Orion: Audio: Add clk/clkdev support ARM: Orion: PCIE: Add support for clk ARM: Orion: XOR: Add support for clk ARM: Orion: CESA: Add support for clk ...
2012-05-23Merge branch 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linuxLinus Torvalds3-71/+0
Pull the MCA deletion branch from Paul Gortmaker: "It was good that we could support MCA machines back in the day, but realistically, nobody is using them anymore. They were mostly limited to 386-sx 16MHz CPU and some 486 class machines and never more than 64MB of RAM. Even the enthusiast hobbyist community seems to have dried up close to ten years ago, based on what you can find searching various websites dedicated to the relatively short lived hardware. So lets remove the support relating to CONFIG_MCA. There is no point carrying this forward, wasting cycles doing routine maintenance on it; wasting allyesconfig build time on validating it, wasting I/O on git grep'ping over it, and so on." Let's see if anybody screams. It generally has compiled, and James Bottomley pointed out that there was a MCA extension from NCR that allowed for up to 4GB of memory and PPro-class machines. So in *theory* there may be users out there. But even James (technically listed as a maintainer) doesn't actually have a system, and while Alan Cox claims to have a machine in his cellar that he offered to anybody who wants to take it off his hands, he didn't argue for keeping MCA support either. So we could bring it back. But somebody had better speak up and talk about how they have actually been using said MCA hardware with modern kernels for us to do that. And David already took the patch to delete all the networking driver code (commit a5e371f61ad3: "drivers/net: delete all code/drivers depending on CONFIG_MCA"). * 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: MCA: delete all remaining traces of microchannel bus support. scsi: delete the MCA specific drivers and driver code serial: delete the MCA specific 8250 support. arm: remove ability to select CONFIG_MCA
2012-05-23Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-12/+8
Pull x86 platform changes from Ingo Molnar: "This tree includes assorted platform driver updates and a preparatory series for a platform with custom DMA remapping semantics (sta2x11 I/O hub)." * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vsmp: Fix number of CPUs when vsmp is disabled keyboard: Use BIOS Keyboard variable to set Numlock x86/olpc/xo1/sci: Report RTC wakeup events x86/olpc/xo1/sci: Produce wakeup events for buttons and switches x86, platform: Initial support for sta2x11 I/O hub x86: Introduce CONFIG_X86_DMA_REMAP x86-32: Introduce CONFIG_X86_DEV_DMA_OPS
2012-05-23Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-shLinus Torvalds1-5/+44
Pull SuperH updates from Paul Mundt: - New CPUs: SH7734 (SH-4A), SH7264 and SH7269 (SH-2A) - New boards: RSK2+SH7264, RSK2+SH7269 - Unbreaking kgdb for SMP - Consolidation of _32/_64 page fault handling. - watchdog and legacy DMA chainsawing, part 1 - Conversion to evt2irq() hwirq lookup, to support relocation of vectored IRQs for irqdomains. * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (98 commits) sh: intc: Kill off special reservation interface. sh: Enable PIO API for hp6xx and se770x. sh: Kill off machvec IRQ hinting. sh: dma: More legacy cpu dma chainsawing. sh: Kill off MAX_DMA_ADDRESS leftovers. sh: Tidy up some of the cpu legacy dma header mess. sh: Move sh4a dma header from cpu-sh4 to cpu-sh4a. sh64: Fix up vmalloc fault range check. Revert "sh: Ensure fixmap and store queue space can co-exist." serial: sh-sci: Fix for port types without BRI interrupts. sh: legacy PCI evt2irq migration. sh: cpu dma evt2irq migration. sh: sh7763rdp evt2irq migration. sh: sdk7780 evt2irq migration. sh: migor evt2irq migration. sh: landisk evt2irq migration. sh: kfr2r09 evt2irq migration. sh: ecovec24 evt2irq migration. sh: ap325rxa evt2irq migration. sh: urquell evt2irq migration. ...
2012-05-22Merge tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds41-1217/+1316
Pull TTY updates from Greg Kroah-Hartman: "Here's the big TTY/serial driver pull request for the 3.5-rc1 merge window. Nothing major in here, just lots of incremental changes from Alan and Jiri reworking some tty core things to behave better and to get a more solid grasp on some of the nasty tty locking issues. There are a few tty and serial driver updates in here as well. All of this has been in the linux-next releases for a while with no problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (115 commits) serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller. serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width. serial: bfin_uart: narrow the reboot condition in DMA tx interrupt serial: bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller. Revert "serial_core: Update buffer overrun statistics." tty: hvc_xen: NULL dereference on allocation failure tty: Fix LED error return tty: Allow uart_register/unregister/register tty: move global ldisc idle waitqueue to the individual ldisc serial8250-em: Add DT support serial8250-em: clk_get() IS_ERR() error handling fix serial_core: Update buffer overrun statistics. tty: drop the pty lock during hangup cris: fix missing tty arg in wait_event_interruptible_tty call tty/amiserial: Add missing argument for tty_unlock() tty_lock: Localise the lock pty: Lock the devpts bits privately tty_lock: undo the old tty_lock use on the ctty serial8250-em: Emma Mobile UART driver V2 Add missing call to uart_update_timeout() ...
2012-05-22Merge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds3-0/+24
Pull arm soc-specific pinctrl changes from Olof Johansson: "With this, five platforms are moving to the relatively new pinctrl subsystem for their pin management, replacing the older soc specific in-kernel interfaces with common code. There is quite a bit of net addition of code for each platform being added to the pinctrl subsystem. But the payback comes later when adding new boards can be done by only providing new device trees instead." Fix up trivial conflicts in arch/arm/mach-ux500/{Makefile,board-mop500.c} * tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (61 commits) mtd: nand: gpmi: fix compile error caused by pinctrl call ARM: PRIMA2: select PINCTRL and PINCTRL_SIRF in Kconfig ARM: nomadik: enable PINCTRL_NOMADIK where needed ARM: mxs: enable pinctrl support video: mxsfb: adopt pinctrl support ASoC: mxs-saif: adopt pinctrl support i2c: mxs: adopt pinctrl support mtd: nand: gpmi: adopt pinctrl support mmc: mxs-mmc: adopt pinctrl support serial: mxs-auart: adopt pinctrl support serial: amba-pl011: adopt pinctrl support spi/imx: adopt pinctrl support i2c: imx: adopt pinctrl support can: flexcan: adopt pinctrl support net: fec: adopt pinctrl support ARM: ux500: switch MSP to using pinctrl for pins ARM: ux500: alter MSP registration to return a device pointer ARM: ux500: switch to using pinctrl for uart0 ARM: ux500: delete custom pin control system ARM: ux500: switch over to Nomadik pinctrl driver ...
2012-05-22Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-1/+0
Pull first batch of arm-soc cleanups from Olof Johansson: "These cleanups are basically all over the place. The idea is to collect changes with minimal impact but large number of changes so we can avoid them from distracting in the diffstat in the other series. A significant number of lines get removed here, in particular because the ixp2000 and ixp23xx platforms get removed. These have never been extremely popular and have fallen into disuse over time with no active maintainer taking care of them. The u5500 soc never made it into a product, so we are removing it from the ux500 platform. Many good cleanups also went into the at91 and omap platforms, as has been the case for a number of releases." Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx} * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits) ARM: clps711x: Cleanup IRQ handling ARM clps711x: Removed unused header mach/time.h ARM: clps711x: Added note about support EP731x CPU to Kconfig ARM: clps711x: Added missing register definitions ARM: clps711x: Used own subarch directory for store header file Dove: Fix Section mismatch warnings ARM: orion5x: ts78xx debugging changes ARM: orion5x: remove PM dependency from ts78xx ARM: orion5x: ts78xx fix NAND resource off by one ARM: orion5x: ts78xx whitespace cleanups Orion5x: Fix Section mismatch warnings Orion5x: Fix warning: struct pci_dev declared inside paramter list ARM: clps711x: Combine header files into one for clps711x-targets ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c ARM: S3C24XX: Use common macro to define resources on mach-osiris.c ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c ARM: S5PV210: Use common macro to define resources on dev-audio.c ARM: S5PC100: Use common macro to define resources on dev-audio.c ARM: S5P64X0: Use common macro to define resources on dev-audio.c ...
2012-05-18serial: sh-sci: Fix for port types without BRI interrupts.Paul Mundt1-1/+18
In doing the evt2irq() + muxed vector conversion for various port types it became apparent that some of the legacy port types will presently error out due to the irq requesting logic attempting to acquire the non-existent BRI IRQ. This adds some sanity checks to the request/free path to ensure that non-existence of a source in itself is not an error. This should restore functionality for legacy PORT_SCI ports. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-18Merge branch 'sh/evt2irq-migration' into sh-latestPaul Mundt1-1/+1
Conflicts: arch/sh/kernel/cpu/sh3/setup-sh770x.c arch/sh/kernel/cpu/sh3/setup-sh7710.c arch/sh/kernel/cpu/sh3/setup-sh7720.c arch/sh/kernel/cpu/sh4/setup-sh7750.c arch/sh/kernel/cpu/sh4a/setup-sh7343.c arch/sh/kernel/cpu/sh4a/setup-sh7366.c arch/sh/kernel/cpu/sh4a/setup-sh7722.c arch/sh/kernel/cpu/sh4a/setup-sh7723.c arch/sh/kernel/cpu/sh4a/setup-sh7724.c arch/sh/kernel/cpu/sh4a/setup-sh7757.c arch/sh/kernel/cpu/sh4a/setup-sh7763.c arch/sh/kernel/cpu/sh4a/setup-sh7770.c arch/sh/kernel/cpu/sh4a/setup-sh7785.c arch/sh/kernel/cpu/sh4a/setup-sh7786.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-17serial: delete the MCA specific 8250 support.Paul Gortmaker3-71/+0
The support for CONFIG_MCA is being removed, since the 20 year old hardware simply isn't capable of meeting today's software demands on CPU and memory resources. This commit removes the MCA specific 8250 UART code. Cc: Alan Cox <alan@linux.intel.com> Cc: linux-serial@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-17serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller.Sonic Zhang1-16/+4
Simplify serial data width calculation and adapt to bf609 LCR bit mask. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width.Sonic Zhang1-12/+10
Change hardware flow control code to adapt to both bf5xx and bf60x. Disabled serial device before set termios for bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: narrow the reboot condition in DMA tx interruptSonic Zhang1-1/+1
Check if xmit buffer pointers are set to zero. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17serial: bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller.Sonic Zhang1-19/+13
The serial4 controller on bf60x is an enhanced version of serial controller on bf5xx. MMR size is 32 bits other than 16 bits. MMR GCTL, MCR and LCR are combined into one control MMR. MSR and LSR are combined into one status MMR. This patch adapts current bf5xx serial driver to serial4 controller on bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15Revert "serial_core: Update buffer overrun statistics."Greg Kroah-Hartman1-4/+2
This reverts commit 642180871bc91afebb6ccf40d1615a7dd33699a3. Buffer overruns are for hardware reported overruns, not software ones, which will only happen if we run out of memory and you will get lots of -ENOMEM errors at the same time. Thanks to Alan Cox for catching this. Reported-by: Alan Cox <alan@linux.intel.com> Cc: Corbin Atkinson <corbinat@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15tty: hvc_xen: NULL dereference on allocation failureDan Carpenter1-2/+2
If kzalloc() returns a NULL here, we pass a NULL to xencons_disconnect_backend() which will cause an Oops. Also I removed the __GFP_ZERO while I was at it since kzalloc() implies __GFP_ZERO. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14tty: Fix LED error returnAlan Cox1-1/+1
3.4-rc introduced a regression when setting the LEDS. We do the right thing but then return an error code. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144 Reported-by: Christian Casteyde Signed-off-by: Alan Cox <alan@linux/intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-14tty: Fix LED error returnAlan Cox1-1/+1
3.4-rc introduced a regression when setting the LEDS. We do the right thing but then return an error code. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144 Reported-by: Christian Casteyde Signed-off-by: Alan Cox <alan@linux/intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14tty: Allow uart_register/unregister/registerAlan Cox1-0/+1
This is legitimate but because we don't clear the drv->state pointer in the unregister code causes a bogus BUG(). Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42880 Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Merge branches 'spear/clock' and 'imx/clock' into next/clockArnd Bergmann3-0/+24
Updated to resolve dependencies. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-14Merge branch 'imx/pinctrl' into imx/clockArnd Bergmann3-0/+24
Conflicts: drivers/mmc/host/sdhci-esdhc-imx.c drivers/net/ethernet/freescale/fec.c drivers/spi/spi-imx.c drivers/tty/serial/imx.c This resolves dependencies between the pinctrl and clock changes in imx. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-12serial: mxs-auart: adopt pinctrl supportShawn Guo1-0/+8
Cc: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-05-12serial: amba-pl011: adopt pinctrl supportShawn Guo1-0/+8
Cc: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-05-11Merge branch 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/clockArnd Bergmann2-10/+22
Shawn Guo <shawn.guo@linaro.org> writes: mxs common clk porting for v3.5. It depends on the following two branches. [1] git://git.linaro.org/people/mturquette/linux.git clk-next [2] http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev As the mxs device tree conversion will constantly touch clock files, to save the conflicts, the updated mxs/dt branch coming later will based on this pull-request. * 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6: ARM: mxs: remove now unused timer_clk argument from mxs_timer_init ARM: mxs: remove old clock support ARM: mxs: switch to common clk framework ARM: mxs: change the lookup name for fec phy clock ARM: mxs: request clock for timer clk: mxs: add clock support for imx28 clk: mxs: add clock support for imx23 clk: mxs: add mxs specific clocks Includes an update to Linux 3.4-rc6 Conflicts: drivers/clk/Makefile Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-11Merge branch 'clps711x/cleanup' into next/cleanupArnd Bergmann1-1/+0
A single patch from Alexander Shiyan <shc_work@mail.ru>: * clps711x/cleanup: ARM: clps711x: Using a single definition for the PHYS and VIRT registers offset Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-11ARM: clps711x: Using a single definition for the PHYS and VIRT registers offsetAlexander Shiyan1-1/+0
Using a single definition for the physical and virtual address register for all variants boards clps711x. This patch also includes the use of a single function clps_read/write in some units. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-11tty: serial: imx: adopt pinctrl supportShawn Guo1-0/+8
Cc: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
2012-05-10tty: move global ldisc idle waitqueue to the individual ldiscIvo Sieben1-3/+4
The global wait_queue that is used for line discipline idle handling is moved to a separate wait_queue for each line instance. This prevents unnecessary blocking on one line, because of idle handling on another line. Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10Merge branch 'sh/rsk-updates' into sh-latestPaul Mundt5-18/+36
Conflicts: arch/sh/Kconfig Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-09serial8250-em: Add DT supportMagnus Damm1-0/+7
Update the 8250_em driver to support DT. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09serial8250-em: clk_get() IS_ERR() error handling fixMagnus Damm1-1/+2
Update the 8250_em driver to correctly handle the case where no clock is associated with the device. The return value of clk_get() needs to be checked with IS_ERR() to avoid NULL pointer referencing. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09serial_core: Update buffer overrun statistics.Corbin Atkinson1-2/+4
Currently, serial drivers don't report buffer overruns. When a buffer overrun occurs, tty_insert_flip_char returns 0, and no attempt is made to insert that same character again (i.e. it is lost). This patch reports buffer overruns via the buf_overrun field in the port's icount structure. Signed-off-by: Corbin Atkinson <corbin.atkinson@ni.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09tty: drop the pty lock during hangupAlan Cox1-0/+2
In theory we don't need it, in practice we are hitting some ill understood deadlock when we don't drop it. The old code dropped it here so we are not undoing anything problematic for pty. If pty could be unloaded it would be a problem but it can't. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08keyboard: Use BIOS Keyboard variable to set NumlockJoshua Cov1-12/+8
The PC BIOS does provide a NUMLOCK flag containing the desired state of this LED. This patch sets the current state according to the data in the bios. [ hpa: fixed __weak declaration without definition, changed "inline" to "static inline" ] Signed-Off-By: Joshua Cov <joshuacov@googlemail.com> Link: http://lkml.kernel.org/r/CAKL7Q7rvq87TNS1T_Km8fW_5OzS%2BSbYazLXKxW-6ztOxo3zorg@mail.gmail.com Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-05-08cris: fix missing tty arg in wait_event_interruptible_tty callPaul Gortmaker1-2/+2
Commit d29f3ef39be4eec0362b985305fc526d9be318cf "tty_lock: Localise the lock" added a tty arg to wait_event_interruptible_tty() but it missed this arch specific instance for cris, causing a compile failure. Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07tty/amiserial: Add missing argument for tty_unlock()Geert Uytterhoeven1-1/+1
commit d29f3ef39be4eec0362b985305fc526d9be318cf ("tty_lock: Localise the lock") missed that d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 ("drivers/tty/amiserial.c: add missing tty_unlock") just added a new caller of tty_unlock(): drivers/tty/amiserial.c: In function ‘set_serial_info’: drivers/tty/amiserial.c:1077: error: too few arguments to function ‘tty_unlock’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04tty_lock: Localise the lockAlan Cox12-90/+137
In each remaining case the tty_lock is associated with a specific tty. This means we can now lock on a per tty basis. We do need tty_lock_pair() for the pty case. Uglier but still a step in the right direction. [fixed up calls in 3 missing drivers - gregkh] Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04pty: Lock the devpts bits privatelyAlan Cox1-4/+15
This is a private pty affair, we don't want to tangle it with the tty_lock any more as we know all the other non tty locking is now handled by the vfs so we too can move. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04tty_lock: undo the old tty_lock use on the cttyAlan Cox1-2/+7
get_current_tty has its own consistent locking. That means a pile of the tty lock cases are not needed. As get_current_tty also keeps a reference the tty object lifetime means we can propogate the lock removal out. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04serial8250-em: Emma Mobile UART driver V2Magnus Damm3-0/+187
This is V2 of the Emma Mobile 8250 platform driver. The hardware itself has according to the data sheet up to 64 byte FIFOs but at this point we only make use of the 16550 compatible mode. To support this piece of hardware the common UART registers need to be remapped, and the access size differences need to be handled. The DLL and DLM registers can due to offset collision not be remapped easily, and because of that this driver makes use of ->dl_read() and ->dl_write() callbacks. This in turn requires a registration function that takes 8250-specific paramenters. Future potential enhancements include DT support, early platform driver console and fine grained PM. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04Add missing call to uart_update_timeout()Lothar Waßmann1-0/+2
This patch fixes a problem reported here: http://article.gmane.org/gmane.linux.ports.arm.kernel/155242/match=auart Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04tty: mxser: local variables should not be exposed globallyH Hartley Sweeten1-1/+1
The variable 'mxser_port_ops' is only referenced in this file and should be marked static to prevent it from being exposed globally. Quites the sparse warning: warning: symbol 'mxser_port_ops' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02serial8250: Introduce serial8250_register_8250_port()Magnus Damm1-32/+59
Introduce yet another 8250 registration function. This time it is serial8250_register_8250_port() and it allows us to register 8250 hardware instances using struct uart_8250_port. The new function makes it possible to register 8250 hardware that makes use of 8250 specific callbacks such as ->dl_read() and ->dl_write(). Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02serial8250: Clean up default map and dl codeMagnus Damm1-26/+12
Get rid of unused functions and macros now when Alchemy and RM9K are converted over to callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02serial8250: Use dl_read()/dl_write() on RM9KMagnus Damm1-33/+29
Convert the 8250 RM9K support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02serial8250: Use dl_read()/dl_write() on AlchemyMagnus Damm1-41/+26
Convert the 8250 Alchemy support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02serial8250: Add dl_read()/dl_write() callbacksMagnus Damm2-53/+78
Convert serial_dl_read() and serial_dl_write() from macro to 8250 specific callbacks. This change makes it easier to support 8250 hardware with non-standard DLL and DLM register configurations such as Alchemy, RM9K and upcoming Emma Mobile UART hardware. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02Merge tag 'tty-3.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds1-7/+19
Pull a TTY fix from Greg Kroah-Hartman: "This is a deadlock bugfix that was easy to hit, and that the vt layer lock rework got wrong, so it reverts the logic back to the way it was in 3.3 and earlier kernels to prevent problems." * tag 'tty-3.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: Fix deadlock on scroll-lock