aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)AuthorFilesLines
2014-01-12serial: mpc512x: setup the PSC FIFO clock as wellGerhard Sittig1-6/+44
prepare and enable the FIFO clock upon PSC FIFO initialization, check for and propagage errors when enabling the PSC FIFO clock, disable and unprepare the FIFO clock upon PSC FIFO uninitialization devm_{get,put}_clk() doesn't apply here, as the SoC provides a single FIFO component which is shared among several PSC components, thus the FIFO isn't associated with a device (while the PSCs are) provide a fallback clock lookup approach in case the OF based clock lookup for the PSC FIFO fails, this allows for successful operation in the presence of an outdated device tree which lacks clock specs Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: [email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Gerhard Sittig <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]>
2014-01-12serial: mpc512x: adjust for OF based clock lookupGerhard Sittig1-5/+35
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the "psc%d_mclk" template and unconditionally use 'mclk' acquire and release the "ipg" clock item for register access as well Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: [email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Gerhard Sittig <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]>
2014-01-09drivers/tty: ehv_bytechan fails to build as a moduleAnton Blanchard1-1/+1
ehv_bytechan is marked tristate but fails to build as a module: drivers/tty/ehv_bytechan.c:363:1: error: type defaults to ‘int’ in declaration of ‘console_initcall’ [-Werror=implicit-int] It doesn't make much sense for a console driver to be built as a module, so change it to a bool. Signed-off-by: Anton Blanchard <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2014-01-09Merge branch 'qcom/drivers' into next/driversOlof Johansson1-1/+1
* qcom/drivers: tty: serial: Limit msm_serial_hs driver to platforms that use it mmc: msm_sdcc: Limit driver to platforms that use it usb: phy: msm: Move mach dependent code to platform data Signed-off-by: Olof Johansson <[email protected]>
2014-01-09tty: serial: Limit msm_serial_hs driver to platforms that use itStephen Boyd1-1/+1
The msm_serial_hs driver uses mach specific dma APIs. This is not compatible with the multi-platform ARM effort. Let's only compile this driver on MSM devices that are prepared to support it; allowing the DT based MSM devices to enter the multi-platform ARM build. Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2014-01-07serial: 8250: enable UART_BUG_NOMSR for TegraStephen Warren1-0/+4
Tegra chips have 4 or 5 identical UART modules embedded. UARTs C..E have their MODEM-control signals tied off to a static state. However UARTs A and B can optionally route those signals to/from package pins, depending on the exact pinmux configuration. When these signals are not routed to package pins, false interrupts may trigger either temporarily, or permanently, all while not showing up in the IIR; it will read as NO_INT. This will eventually lead to the UART IRQ being disabled due to unhandled interrupts. When this happens, the kernel may print e.g.: irq 68: nobody cared (try booting with the "irqpoll" option) In order to prevent this, enable UART_BUG_NOMSR. This prevents UART_IER_MSI from being enabled, which prevents the false interrupts from triggering. In practice, this is not needed under any of the following conditions: * On Tegra chips after Tegra30, since the HW bug has apparently been fixed. * On UARTs C..E since their MODEM control signals are tied to the correct static state which doesn't trigger the issue. * On UARTs A..B if the MODEM control signals are routed out to package pins, since they will then carry valid signals. However, we ignore these exceptions for now, since they are only relevant if a board actually hooks up more than a 4-wire UART, and no currently supported board does this. If we ever support a board that does, we can refine the algorithm that enables UART_BUG_NOMSR to take those exceptions into account, and/or read a flag from DT/... that indicates that the board has hooked up and pinmux'd more than a 4-wire UART. Reported-by: Olof Johansson <[email protected]> # autotester Cc: <[email protected]> Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty/serial: at91: reset rx_ring when port is shutdownMark Deneen1-0/+6
When using RX DMA, the driver won't pass any data to the uart layer until the buffer is flipped. When the port is shutdown, the dma buffers are unmapped, but the head and tail of the ring buffer are not reseted. Since the serial console will keep the port open, this will only present itself when the uart is not shared. To reproduce the issue, with an unpatched driver, run a getty on /dev/ttyS0 with no serial console and exit. Getty will exit, and when the new one returns you will be unable to log in. If you hold down a key long enough to fill the DMA buffer and flip it, you can then log in. Signed-off-by: Mark Deneen <[email protected]> Acked-by: Leilei Zhao <[email protected]> [[email protected]: adapt to mainline kernel, handle !DMA case] Cc: <[email protected]> # v3.12 Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty/serial: at91: fix race condition in atmel_serial_removeMarek Roszko1-1/+2
The _remove callback could be called when a tasklet is scheduled. tasklet_kill was called inside the function in order to free up any scheduled tasklets. However it was called after uart_remove_one_port which destroys tty references needed in the port for atmel_tasklet_func. Simply putting the tasklet_kill at the start of the function will prevent this conflict. Signed-off-by: Marek Roszko <[email protected]> Acked-by: Leilei Zhao <[email protected]> Cc: <[email protected]> # v3.12 Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty/serial: at91: Handle shutdown more safelyMarek Roszko1-7/+13
Interrupts were being cleaned up late in the shutdown handler, it is possible that an interrupt can occur and schedule a tasklet that runs after the port is cleaned up. There is a null dereference due to this race condition with the following stacktrace: [<c02092b0>] (atmel_tasklet_func+0x514/0x814) from [<c001fd34>] (tasklet_action+0x70/0xa8) [<c001fd34>] (tasklet_action+0x70/0xa8) from [<c001f60c>] (__do_softirq+0x90/0x144) [<c001f60c>] (__do_softirq+0x90/0x144) from [<c001fa18>] (irq_exit+0x40/0x4c) [<c001fa18>] (irq_exit+0x40/0x4c) from [<c000e298>] (handle_IRQ+0x64/0x84) [<c000e298>] (handle_IRQ+0x64/0x84) from [<c000d6c0>] (__irq_svc+0x40/0x50) [<c000d6c0>] (__irq_svc+0x40/0x50) from [<c0208060>] (atmel_rx_dma_release+0x88/0xb8) [<c0208060>] (atmel_rx_dma_release+0x88/0xb8) from [<c0209740>] (atmel_shutdown+0x104/0x160) [<c0209740>] (atmel_shutdown+0x104/0x160) from [<c0205e8c>] (uart_port_shutdown+0x2c/0x38) Signed-off-by: Marek Roszko <[email protected]> Acked-by: Leilei Zhao <[email protected]> Cc: <[email protected]> # v3.12 Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07serial: sirf: correct condition for fetching dma buffer into ttyQipan Li1-2/+6
In rx dma-callback it calls tasklet_schedule, if the tasklet be scheduled after all the dma-callback in the rx dma channel, current check condition in the tasklet will not do fetch dma buffer into tty because tx_issued is equal with tx_completed, so as timeout tasklet does. so we check whether we should fetch the whole dma buffer into tty according to the status of transactions in rx dma channel. Signed-off-by: Qipan Li <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07serial: sirf: provide pm entries of uart_opsQipan Li1-3/+11
this patch provides PM entry of uart_ops, then drop clk enable and disable because serial core will do it. the patch also fixes the issue that uart hang in resume caused by not-enabled clock. Signed-off-by: Qipan Li <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07serial: sirf: use PM macro initialize PM functionsQipan Li1-6/+11
use SET_SYSTEM_SLEEP_PM_OPS to initialize suspend/resume functions instead of legacy suspend and resume entries of platform_driver. this will add hibernation support automatically as suspend to disk entries are also set. Signed-off-by: Qipan Li <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07serial: clps711x: Enable driver compilation with COMPILE_TESTAlexander Shiyan2-20/+23
This helps increasing build testing coverage. To do this, read{write}_relaxed() functions was be replaced with simple read{write}() variants. Potential "uninitialized variable" warnings was be fixed if driver compiled without MFD_SYSCON. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07serial: clps711x: Add support for N_IRDA line disciplineAlexander Shiyan1-8/+12
This patch replace custom handling of IrDA feature with N_IRDA line discipline, so IrDA mode can be used with irtty driver. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty: synclink: avoid sleep_on raceArnd Bergmann3-6/+6
The four variants of the synclink driver use the same code in their open() callback to wait for a port in process of being closed, using interruptible_sleep_on, which is racy and going away soon. Making things worse, these functions hold the BTM while doing so, which means that if we ever enter this code path, we cannot actually continue since the other thread that is in process of closing the port can no longer get the BTM. This addresses both issues by using wait_event_interruptible_tty() instead. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty/amiserial: avoid interruptible_sleep_onArnd Bergmann1-8/+18
interruptible_sleep_on is generally problematic and we want to get rid of it. In case of TIOCMIWAIT, that race is actually in user space and does not get fixed since we can only detect changes after entering the ioctl handler, but it removes one more caller. This instance can not be trivially replaced with wait_event, so I chose to open-code the wait loop using prepare_to_wait/finish_wait. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07tty: delete non-required instances of include <linux/init.h>Paul Gortmaker15-15/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07treewide: fix comments and printk msgsMasanari Iida1-1/+1
This patch fixed several typo in printk from various part of kernel source. Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2014-01-02Merge tag 'davinci-for-v3.14/gpio' of ↵Olof Johansson1-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers From Sekhar Nori: DaVinci GPIO driver updates --------------------------- This pull request contains updates to DaVinci GPIO driver and the resultant platform code changes. The updates include DT-conversion and changes to make the driver cross-platform ready. * tag 'davinci-for-v3.14/gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: gpio: davinci: don't create irq_domain in case of unbanked irqs gpio: davinci: use chained_irq_enter/chained_irq_exit API gpio: davinci: add OF support gpio: davinci: remove unused variable intc_irq_num gpio: davinci: convert to use irqdomain support. gpio: introduce GPIO_DAVINCI kconfig option gpio: davinci: get rid of DAVINCI_N_GPIO gpio: davinci: use {readl|writel}_relaxed() instead of __raw_* Signed-off-by: Olof Johansson <[email protected]>
2014-01-02Merge tag 'renesas-sh-sci3-for-v3.14' of ↵Olof Johansson1-50/+137
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers From Simon Horman: Third Round of Renesas SH SCI Updates for v3.14 * Add Device Tree Support * Remove platform data mapbase and irqs fields * Remove platform data scbrr_algo_id field * tag 'renesas-sh-sci3-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: serial: sh-sci: Add OF support serial: sh-sci: Add device tree bindings documentation serial: sh-sci: Remove platform data mapbase and irqs fields serial: sh-sci: Remove platform data scbrr_algo_id field Signed-off-by: Olof Johansson <[email protected]>
2014-01-02Merge branch 'renesas/drivers-sci2' into next/driversOlof Johansson2-168/+154
* renesas/drivers-sci2: serial: sh-sci: Rework baud rate calculation serial: sh-sci: Compute overrun_bit without using baud rate algo serial: sh-sci: Remove unused GPIO request code serial: sh-sci: Move overrun_bit and error_mask fields out of pdata serial: sh-sci: Support resources passed through platform resources serial: sh-sci: Don't check IRQ in verify port operation serial: sh-sci: Set the UPF_FIXED_PORT flag serial: sh-sci: Remove duplicate interrupt check in verify port op serial: sh-sci: Simplify baud rate calculation algorithms serial: sh-sci: Remove baud rate calculation algorithm 5 serial: sh-sci: Sort headers alphabetically serial: sh-sci: Convert to clk_prepare/unprepare serial: sh-sci: Don't enable/disable port from within break timer serial: sh-sci: Fix warnings due to improper casts and printk formats
2014-01-02Merge tag 'renesas-sh-sci2-for-v3.14' of ↵Olof Johansson2-151/+132
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup From Simon Horman: Second Round of Renesas SH SCI updates for v3.14 * Rework baud rate calculation * Compute overrun_bit without using baud rate algo * Remove unused GPIO request code * Move overrun_bit and error_mask fields out of pdata * Support resources passed through platform resources * Don't check IRQ in verify port operation * Set the UPF_FIXED_PORT flag * Remove duplicate interrupt check in verify port op * Simplify baud rate calculation algorithms * Remove baud rate calculation algorithm 5 * Sort headers alphabetically * tag 'renesas-sh-sci2-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: serial: sh-sci: Rework baud rate calculation serial: sh-sci: Compute overrun_bit without using baud rate algo serial: sh-sci: Remove unused GPIO request code serial: sh-sci: Move overrun_bit and error_mask fields out of pdata serial: sh-sci: Support resources passed through platform resources serial: sh-sci: Don't check IRQ in verify port operation serial: sh-sci: Set the UPF_FIXED_PORT flag serial: sh-sci: Remove duplicate interrupt check in verify port op serial: sh-sci: Simplify baud rate calculation algorithms serial: sh-sci: Remove baud rate calculation algorithm 5 serial: sh-sci: Sort headers alphabetically Signed-off-by: Olof Johansson <[email protected]>
2013-12-29Merge tag 'renesas-sh-sci-for-v3.14' of ↵Olof Johansson1-17/+22
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup From Simon Horman: Renesas SH SCI updates for v3.14 Updates for the SH SCI serial driver * Convert to clk_prepare/unprepare * Fix warnings due to improper casts and printk formats * tag 'renesas-sh-sci-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: serial: sh-sci: Convert to clk_prepare/unprepare serial: sh-sci: Don't enable/disable port from within break timer serial: sh-sci: Fix warnings due to improper casts and printk formats Signed-off-by: Olof Johansson <[email protected]>
2013-12-26Merge tag 'tegra-for-3.14-dmas-resets-rework' of ↵Olof Johansson1-22/+16
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/cleanup From Stephen Warren: ARM: tegra: implement common DMA and resets DT bindings This series converts the Tegra DTs and drivers to use the common/ standard DMA and reset bindings, rather than custom bindings. It also adds complete documentation for the Tegra clock bindings without actually changing any binding definitions. This conversion relies on a few sets of patches in branches from outside the Tegra tree: 1) A patch to add an DMA channel request API which allows deferred probe to be implemented. 2) A patch to implement a common part of the of_xlate function for DMA controllers. 3) Some ASoC patches (which in turn rely on (1) above), which support deferred probe during DMA channel allocation. 4) The Tegra clock driver changes for 3.14. Consequently, this branch is based on a merge of all of those external branches. In turn, this branch is or will be pulled into a few places that either rely on features introduced here, or would otherwise conflict with the patches: a) Tegra's own for-3.14/powergate and for-4.14/dt branches, to avoid conflicts. b) The DRM tree, which introduces new code that relies on the reset controller framework introduced in this branch, and to avoid conflicts. * tag 'tegra-for-3.14-dmas-resets-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (30 commits) spi: tegra: checking for ERR_PTR instead of NULL ASoC: tegra: update module reset list for Tegra124 clk: tegra: remove bogus PCIE_XCLK clk: tegra: remove legacy reset APIs ARM: tegra: remove legacy DMA entries from DT ARM: tegra: remove legacy clock entries from DT USB: EHCI: tegra: use reset framework Input: tegra-kbc - use reset framework serial: tegra: convert to standard DMA DT bindings serial: tegra: use reset framework spi: tegra: convert to standard DMA DT bindings spi: tegra: use reset framework staging: nvec: use reset framework i2c: tegra: use reset framework ASoC: tegra: convert to standard DMA DT bindings ASoC: tegra: allocate AHUB FIFO during probe() not startup() ASoC: tegra: call pm_runtime APIs around register accesses ASoC: tegra: use reset framework dma: tegra: register as an OF DMA controller dma: tegra: use reset framework ... Signed-off-by: Olof Johansson <[email protected]>
2013-12-24Merge 3.13-rc5 into tty-nextGreg Kroah-Hartman4-6/+27
We need the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-24serial: sh-sci: Add OF supportBastian Hecht1-3/+98
Extend the driver to with support for SCIx device tree bindings. A minimal set of features is supported, additional properties can be added later should the need to describe more device features arise. Signed-off-by: Bastian Hecht <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Remove platform data mapbase and irqs fieldsLaurent Pinchart1-26/+34
The fields are not used anymore by board files, remove them. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Remove platform data scbrr_algo_id fieldLaurent Pinchart1-21/+5
The field isn't set by any board, remote it. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Rework baud rate calculationLaurent Pinchart1-7/+30
Computing the baud rate register value requires knowledge of the hardware sampling rate. This information is currently encoded in a baud rate calculation algorithm ID passed through platform data. However, it can be derived from the port type directly in most cases. Compute the sampling rate internally in the driver if the baud rate calculation algorithm ID isn't specified, and allow platforms to override the sampling rate through platform data in special cases (this is only required for SCIFA ports on sh7723 and sh7724, the reason needs to be investigated). Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Compute overrun_bit without using baud rate algoLaurent Pinchart1-12/+14
The overrun bit index is a property of the hardware. It's currently computed based on a different and unrelated hardware property, the baud rate calculation algorithm. Compute it using hardware identification information only. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Remove unused GPIO request codeLaurent Pinchart1-67/+0
The driver requests at initialization time GPIOs passed through platform data. No platform makes use of this feature, remove it. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Move overrun_bit and error_mask fields out of pdataLaurent Pinchart2-28/+24
None of the fields is ever set by board code, and both of them are set in the driver at probe time. Move them out of struct plat_sci_port to struct sci_port. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Support resources passed through platform resourcesLaurent Pinchart1-16/+49
Memory and IRQ resources are currently passed to the driver through platform data. Support passing them through the standard platform resources mechanism instead. This deprecates platform data resources. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Don't check IRQ in verify port operationLaurent Pinchart1-4/+0
The IRQ number can't be modified by the user as the port is fixed. There's no need to check the new IRQ number as it will be ignored by the core. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Set the UPF_FIXED_PORT flagLaurent Pinchart1-1/+1
The base address, IRQ and baud rate generator parent clock rate can't be changed by userspace. Mark the port as fixed. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Remove duplicate interrupt check in verify port opLaurent Pinchart1-1/+1
The driver checks if the interrupt number is greater than nr_irqs and returns an error in that case. The same check is already performed by the caller, remove it. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Simplify baud rate calculation algorithmsLaurent Pinchart1-4/+4
Rewrite the baud rate register value calculations in easier to read forms. The computed value isn't modified. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Remove baud rate calculation algorithm 5Laurent Pinchart1-2/+0
The algorithm isn't used, remove it. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-24serial: sh-sci: Sort headers alphabeticallyLaurent Pinchart1-21/+21
This helps locating duplicates. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-12-20tty: an overflow of multiplication in drivers/tty/cyclades.cQixue Xiao1-0/+2
there is an overflow in the code : cyz_polling_cycle = (arg * HZ) / 1000, the multiplicator arg comes from user, so it may be an overflow if arg is a big number. And the value of cyc_polling_cycle will be wrong when it is used next time. Reported-by: Qixue Xiao <[email protected]> Suggested-by: Yongjian Xu <[email protected]> Suggested-by: Yu Chen <[email protected]> Signed-off-by: Qixue Xiao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-20ARM/serial: at91: switch atmel serial to use gpiolibLinus Walleij1-18/+31
This passes the errata fix using a GPIO to control the RTS pin on one of the AT91 chips to use gpiolib instead of the AT91-specific interfaces. Also remove the reliance on compile-time #defines and the cpu_* check and rely on the platform passing down the proper GPIO pin through platform data. This is a prerequisite for getting rid of the local GPIO implementation in the AT91 platform and move toward multiplatform. The patch also adds device tree support for getting the RTS GPIO pin from the device tree on DT boot paths. Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]>
2013-12-19serial: Remove old SC26XX driverAlexander Shiyan3-768/+0
New driver for NXP (Philips) UART ICs was introduced in September 2012. Old driver no longer used anywhere, this patch removes it. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-19serial: add support for 200 v3 series Titan cardYegor Yefremov1-0/+4
Signed-off-by: Yegor Yefremov <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-19serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chipJonathan Woithe1-2/+2
Fix the initialisation of older Quatech serial cards which are fitted with the AMCC PCI Matchmaker interface chip. Signed-off-by: Jonathan Woithe ([email protected]) Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-18TTY/n_gsm: Removing the wrong tty_unlock/lock() in gsm_dlci_release()Chuansheng Liu1-4/+1
Commit 4d9b109060f690f5c835(tty: Prevent deadlock in n_gsm driver) tried to close all the virtual ports synchronously before closing the phycial ports, so the tty_vhangup() is used. But the tty_unlock/lock() is wrong: tty_release tty_ldisc_release tty_lock_pair(tty, o_tty) < == Here the tty is for physical port tty_ldisc_kill gsmld_close gsm_cleanup_mux gsm_dlci_release tty = tty_port_tty_get(&dlci->port) < == Here the tty(s) are for virtual port They are different ttys, so before tty_vhangup(virtual tty), do not need to call the tty_unlock(virtual tty) at all which causes unbalanced unlock warning. When enabling mutex debugging option, we will hit the below warning also: [ 99.276903] ===================================== [ 99.282172] [ BUG: bad unlock balance detected! ] [ 99.287442] 3.10.20-261976-gaec5ba0 #44 Tainted: G O [ 99.293972] ------------------------------------- [ 99.299240] mmgr/152 is trying to release lock (&tty->legacy_mutex) at: [ 99.306693] [<c1b2dcad>] mutex_unlock+0xd/0x10 [ 99.311669] but there are no more locks to release! [ 99.317131] [ 99.317131] other info that might help us debug this: [ 99.324440] 3 locks held by mmgr/152: [ 99.328542] #0: (&tty->legacy_mutex/1){......}, at: [<c1b30ab0>] tty_lock_nested+0x40/0x90 [ 99.338116] #1: (&tty->ldisc_mutex){......}, at: [<c15dbd02>] tty_ldisc_kill+0x22/0xd0 [ 99.347284] #2: (&gsm->mutex){......}, at: [<c15e3d83>] gsm_cleanup_mux+0x73/0x170 [ 99.356060] [ 99.356060] stack backtrace: [ 99.360932] CPU: 0 PID: 152 Comm: mmgr Tainted: G O 3.10.20-261976-gaec5ba0 #44 [ 99.370086] ef4a4de0 ef4a4de0 ef4c1d98 c1b27b91 ef4c1db8 c1292655 c1dd10f5 c1b2dcad [ 99.378921] c1b2dcad ef4a4de0 ef4a528c ffffffff ef4c1dfc c12930dd 00000246 00000000 [ 99.387754] 00000000 00000000 c15e1926 00000000 00000001 ddfa7530 00000003 c1b2dcad [ 99.396588] Call Trace: [ 99.399326] [<c1b27b91>] dump_stack+0x16/0x18 [ 99.404307] [<c1292655>] print_unlock_imbalance_bug+0xe5/0xf0 [ 99.410840] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.416110] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.421382] [<c12930dd>] lock_release_non_nested+0x1cd/0x210 [ 99.427818] [<c15e1926>] ? gsm_destroy_network+0x36/0x130 [ 99.433964] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.439235] [<c12931a2>] lock_release+0x82/0x1c0 [ 99.444505] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.449776] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.455047] [<c1b2dc2f>] __mutex_unlock_slowpath+0x5f/0xd0 [ 99.461288] [<c1b2dcad>] mutex_unlock+0xd/0x10 [ 99.466365] [<c1b30bb1>] tty_unlock+0x21/0x50 [ 99.471345] [<c15e3dd1>] gsm_cleanup_mux+0xc1/0x170 [ 99.476906] [<c15e44d2>] gsmld_close+0x52/0x90 [ 99.481983] [<c15db905>] tty_ldisc_close.isra.1+0x35/0x50 [ 99.488127] [<c15dbd0c>] tty_ldisc_kill+0x2c/0xd0 [ 99.493494] [<c15dc7af>] tty_ldisc_release+0x2f/0x50 [ 99.499152] [<c15d572c>] tty_release+0x37c/0x4b0 [ 99.504424] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.509695] [<c1b2dcad>] ? mutex_unlock+0xd/0x10 [ 99.514967] [<c1372f6e>] ? eventpoll_release_file+0x7e/0x90 [ 99.521307] [<c1335849>] __fput+0xd9/0x200 [ 99.525996] [<c133597d>] ____fput+0xd/0x10 [ 99.530685] [<c125c731>] task_work_run+0x81/0xb0 [ 99.535957] [<c12019e9>] do_notify_resume+0x49/0x70 [ 99.541520] [<c1b30dc4>] work_notifysig+0x29/0x31 [ 99.546897] ------------[ cut here ]------------ So here we can call tty_vhangup() directly which is for virtual port. Reviewed-by: Chao Bi <[email protected]> Signed-off-by: Liu, Chuansheng <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-17tty: xuartps: Properly guard sysrq specific codeSoren Brinkmann1-0/+2
Commit 'tty: xuartps: Implement BREAK detection, add SYSRQ support' (0c0c47bc40a2e358d593b2d7fb93b50027fbfc0c) introduced sysrq support without properly guarding sysrq specific code which results in build errors when sysrq is disabled: DNAME=KBUILD_STR(xilinx_uartps)" -c -o drivers/tty/serial/.tmp_xilinx_uartps.o drivers/tty/serial/xilinx_uartps.c drivers/tty/serial/xilinx_uartps.c: In function 'xuartps_isr': drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port' has no member named 'sysrq' drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port' has no member named 'sysrq' drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port' has no member named 'sysrq' make[3]: *** [drivers/tty/serial/xilinx_uartps.o] Error 1 Reported-by: Masanari Iida <[email protected]> Cc: Vlad Lungu <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-17n_tty: Fix apparent order of echoed outputPeter Hurley1-1/+6
With block processing of echoed output, observed output order is still required. Push completed echoes and echo commands prior to output. Introduce echo_mark echo buffer index, which tracks completed echo commands; ie., those submitted via commit_echoes but which may not have been committed. Ensure that completed echoes are output prior to subsequent terminal writes in process_echoes(). Fixes newline/prompt output order in cooked mode shell. Cc: <[email protected]> # 3.12.x : 39434ab n_tty: Fix missing newline echo Reported-by: Karl Dahlke <[email protected]> Reported-by: Mikulas Patocka <[email protected]> Signed-off-by: Peter Hurley <[email protected]> Tested-by: Karl Dahlke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-17serial: 8250_dw: add new ACPI IDsMika Westerberg1-0/+2
Newer Intel PCHs with LPSS have the same Designware controllers than Haswell but ACPI IDs are different. Add these IDs to the driver list. Signed-off-by: Mika Westerberg <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-17drivers: tty: Mark the function hvc_poll_init() as static in hvc_console.cRashika Kheria1-1/+1
Mark the function hvc_poll_init() as static in hvc/hvc_console.c because it is not used outside this file. This eliminates the following warning in hvc/hvc_console.c: drivers/tty/hvc/hvc_console.c:791:5: warning: no previous prototype for ‘hvc_poll_init’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-17drivers: tty: Mark the functions as static in n_gsm.cRashika Kheria1-9/+5
Marks the functions gsm_cleanup_mux(), gsm_activate_mux(), gsm_free_mux(), gsm_alloc_mux() and gsm_change_mtu() as static in n_gsm.c because they are not used outside this file. Also, drop the EXPORT_SYMBOL_GPL for the above mentioned functions because nothing else in the kernel calls them. This eliminates the following warnings in n_gsm.c: drivers/tty/n_gsm.c:2022:6: warning: no previous prototype for ‘gsm_cleanup_mux’ [-Wmissing-prototypes] drivers/tty/n_gsm.c:2076:5: warning: no previous prototype for ‘gsm_activate_mux’ [-Wmissing-prototypes] drivers/tty/n_gsm.c:2120:6: warning: no previous prototype for ‘gsm_free_mux’ [-Wmissing-prototypes] drivers/tty/n_gsm.c:2156:17: warning: no previous prototype for ‘gsm_alloc_mux’ [-Wmissing-prototypes] drivers/tty/n_gsm.c:2714:5: warning: no previous prototype for ‘gsm_change_mtu’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>