- 08 11月, 2017 6 次提交
-
-
由 Colin Ian King 提交于
Pointer ts is assigned a value that is never read, ts is therefore redundant and can be removed. Cleans up clang warning: drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts' is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gimcuan Hui 提交于
This patch fixes the checkpatch.pl complains: space required before the open parenthesis '('. Signed-off-by: NGimcuan Hui <gimcuan@gmail.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gimcuan Hui 提交于
This patch fixes the checkpatch.pl complain: ERROR: else should follow close brace '}'. Signed-off-by: NGimcuan Hui <gimcuan@gmail.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gimcuan Hui 提交于
This patch fixes checkpatch.pl warning: space prohibited between function name and open parenthesis '('. Signed-off-by: NGimcuan Hui <gimcuan@gmail.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gimcuan Hui 提交于
This patch fixes checkpatch.pl warning: Missing a blank line after declarations. Signed-off-by: NGimcuan Hui <gimcuan@gmail.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gimcuan Hui 提交于
The return type of jsm_get_mstat was int, and the local var result was for the return should be int, make the change. This patch fixes the checkpatch.pl warning: Prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: NGimcuan Hui <gimcuan@gmail.com> Acked-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 11月, 2017 19 次提交
-
-
由 Troy Kisky 提交于
Since commit 4dec2f11 ("imx-serial: RX DMA startup latency") the interrupt routine no longer will start rx dma. imx_dma_rxint no longer needs to be called to try and start dma. It won't start dma because dma_is_rxing is already true meaning dma is already started. Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Troy Kisky 提交于
Since commit 4dec2f11 ("imx-serial: RX DMA startup latency") the interrupt routine no longer will start rx dma. So, we no longer need to enable this interrupt to start dma. Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tomas Melin 提交于
Canceling hrtimer when holding uart spinlock can deadlock. CPU0: syscall write -> get uart port spinlock -> write uart -> start_tx_rs485 -> hrtimer_cancel -> wait for hrtimer callback to finish CPU1: hrtimer IRQ -> run hrtimer -> em485_handle_stop_tx -> get uart port spinlock CPU0 is waiting for the hrtimer callback to finish, but the hrtimer callback running on CPU1 is waiting to get the uart port spinlock. This deadlock can be avoided by not canceling the hrtimers in these paths. Setting active_timer=NULL can be done without accessing hrtimer, and that will effectively cancel operations that would otherwise have been performed by the hrtimer callback. Signed-off-by: NTomas Melin <tomas.melin@vaisala.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
With the timer converted to using the new timer_setup()/from_timer() API, setting the .data field is redundant (and the field will be removed soon), so drop it. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Philipp Zabel 提交于
During hibernation, freeze/thaw/restore dev_pm_ops are called instead of suspend/resume. Hook up the hibernation ops. The _noirq parts are identical, but suspend/resume are replaced with variants that do not enable wakeup from i.MX UART. There is no need to restore register contents in thaw_noirq. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lukas Wunner 提交于
Back in 2010, commit 3b43816f ("ARM: 5933/1: amba-pl011: support hardware flow control") added an autorts flag to this driver to store whether automatic hardware flow control is requested. In 2015, commit 391f93f2 ("serial: core: Rework hw-assisted flow control support") added a flag with identical functionality to generic code. Switch over to that flag and drop the driver-specific one. Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lukas Wunner 提交于
This driver's ->rs485_config callback checks if SER_RS485_RTS_ON_SEND and SER_RS485_RTS_AFTER_SEND have the same value. If they do, it means the user has passed in invalid data with the TIOCSRS485 ioctl() since RTS must have a different polarity when sending and when not sending. In this case, rs485 mode is not enabled (the RS485_URA bit is not set in the RS485 Enable Register) and this is supposed to be signaled back to the user by clearing the SER_RS485_ENABLED bit in struct serial_rs485 ... except a missing tilde character is preventing that from happening. Fixes: 28e3fb6c ("serial: Add support for Fintek F81216A LPC to 4 UART") Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com> Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
The final assignment to port is never read, hence it is redundant and can be removed. Also move the declaration of port to a more local scope. Cleans up clang warning: drivers/tty/serial/serial_core.c:1498:2: warning: Value stored to 'port' is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Takatoshi Akiyama 提交于
The SCSCR register access in sci_break_ctl() is not locked. sci_start_tx() and sci_set_termios() changes the SCSCR register, but does not lock sci_port. Therefore, this patch adds lock during register access. Also, remove the log output that leads to a double lock. Some analysis of where locks are not taken is as follows. It appears that the lock is not taken in: - sci_start_tx(), sci_stop_tx() as this is installed as a callback. And all callers of the callback take the lock. - start_rx as callers take the lock. - stop_rx. this is both installed as a callback and called directly. In both cases the caller takes the lock. Signed-off-by: NTakatoshi Akiyama <takatoshi.akiyama.kj@ps.hitachi-solutions.com> Signed-off-by: NTakeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Arnd Bergmann 提交于
gcc points out that the length passed into memset here is wrong: drivers/tty/serial/mvebu-uart.c: In function 'mvebu_uart_probe': arch/x86/include/asm/string_32.h:324:29: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size] Moreover, the structure was allocated with kzalloc a few lines earlier, so that memset is also unnecessary. Let's drop it to shut up the compiler warning. Fixes: 95f78768 ("serial: mvebu-uart: dissociate RX and TX interrupts") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
Variable rts is being assigned but it is never read, hence it can be removed. The assignment to param_new to zero is redundant as it is being updates a few statements later, so remove this redundant assignment. Cleans up two clang warnings: drivers/tty/serial/max3100.c:277:3: warning: Value stored to 'rts' is never read drivers/tty/serial/max3100.c:439:2: warning: Value stored to 'param_new' is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Johan Hovold 提交于
The tty_ldisc_receive_buf() helper returns the number of bytes processed so drop the bogus "not" from the kernel doc comment. Fixes: 8d082cd3 ("tty: Unify receive_buf() code paths") Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Richard Genoud <richard.genoud@gmail.com> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Acked-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Moves timer structures from global to attached to struct cyclades_port. Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" <davem@davemloft.net> Cc: Jiri Slaby <jslaby@suse.com> Cc: sparclinux@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Cc: nios2-dev@lists.rocketboards.org Signed-off-by: NKees Cook <keescook@chromium.org> Acked-by: NTobias Klauser <tklauser@distanz.ch> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby <jslaby@suse.com> Cc: adi-buildroot-devel@lists.sourceforge.net Cc: linux-serial@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby <jslaby@suse.com> Cc: Vignesh R <vigneshr@ti.com> Cc: Ed Blake <ed.blake@imgtec.com> Cc: Matthias Brugger <mbrugger@suse.com> Cc: Sean Young <sean@mess.org> Cc: linux-serial@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 23 10月, 2017 6 次提交
-
-
由 Johan Hovold 提交于
Reorder controller initialisation so that in the unlikely event that id allocation fails, we don't end up releasing id 0 in the destructor. Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Johan Hovold 提交于
Serdev currently only supports a single slave device, but the required sanity checks to prevent further registration attempts were missing. If a serial-port node has two child nodes with compatible properties, the OF code would try to register two slave devices using the same id and name. Driver core will not allow this (and there will be loud complaints), but the controller's slave pointer would already have been set to address of the soon to be deallocated second struct serdev_device. As the first slave device remains registered, this can lead to later use-after-free issues when the slave callbacks are accessed. Note that while the serdev registration helpers are exported, they are typically only called by serdev core. Any other (out-of-tree) callers must serialise registration and deregistration themselves. Fixes: cd6484e1 ("serdev: Introduce new bus for serial attached devices") Cc: stable <stable@vger.kernel.org> # 4.11 Cc: Rob Herring <robh@kernel.org> Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Johan Hovold 提交于
Add missing error handling for tty-driver open() which may fail (e.g. if resource allocation fails or if a port is being disconnected). Note that close() must be called also in case of failed open() and that the operation sanity check is amended to catch buggy drivers. Signed-off-by: NJohan Hovold <johan@kernel.org> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Johan Hovold 提交于
The tty-driver open routine is mandatory, but the serdev tty-port-controller implementation did not treat it as such and would instead fall back to calling tty_port_open() directly. Signed-off-by: NJohan Hovold <johan@kernel.org> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lukas Wunner 提交于
Commit 348f9bb3 ("serial: omap: Fix RTS handling") sought to enable auto RTS upon manual RTS assertion and disable it on deassertion. However it seems the latter was done incorrectly, it clears all bits in the Extended Features Register *except* auto RTS. Fixes: 348f9bb3 ("serial: omap: Fix RTS handling") Cc: Peter Hurley <peter@hurleysoftware.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Martin Townsend 提交于
The do .. while loop checks for interrupt pending at the start of the loop and exits if there is none, it then checks again for this condition at the end of the loop. Signed-off-by: NMartin Townsend <mtownsend1973@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 10月, 2017 9 次提交
-
-
由 Frédéric Danis 提交于
UART devices is expected to be enumerated by SerDev subsystem. During ACPI scan, serial devices behind SPI, I2C or UART buses are not enumerated, allowing them to be enumerated by their respective parents. Rename *spi_i2c_slave* to *serial_bus_slave* as this will be used for serial devices on serial buses (SPI, I2C or UART). On Macs an empty ResourceTemplate is returned for uart slaves. Instead the device properties "baud", "parity", "dataBits", "stopBits" are provided. Add a check for "baud" in acpi_is_serial_bus_slave(). Signed-off-by: NFrédéric Danis <frederic.danis.oss@gmail.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Tested-by: NRonald Tschalär <ronald@innovation.ch> Tested-by: NPeter Y. Chuang <peteryuchuang@gmail.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Frédéric Danis 提交于
This patch allows SerDev module to manage serial devices declared as attached to an UART in ACPI table. acpi_serdev_add_device() callback will only take into account entries without enumerated flag set. This flags is set for all entries during ACPI scan, except for SPI and I2C serial devices, and for UART with 2nd patch in the series. Check if a serdev device as been allocated during acpi_walk_namespace() to prevent serdev controller registration instead of the tty-class device. Signed-off-by: NFrédéric Danis <frederic.danis.oss@gmail.com> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Reviewed-by: NJohan Hovold <johan@kernel.org> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miquel Raynal 提交于
Define the missing register offsets and bit fields for the extended UART port. Add a second driver data structure filled with its port data, selected with the right compatible (marvell,armada-3700-uart-ext). Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miquel Raynal 提交于
A3700 boards may have up to two UART ports. Set the new limit to two maximum UART ports. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miquel Raynal 提交于
While the standard UART port can use a single IRQ that 'sums' both RX and TX interrupts, the extended port cannot and has to use two different ISR, one for each direction. The standard port also has the hability to use two separate interrupts (one for each direction). The logic is then: either there is only one unnamed interrupt on the standard port and this interrupt must be used for both directions (this is legacy bindings); or all the interrupts must be described and named 'uart-sum' (if available), 'uart-rx', 'uart-tx' and two separate handlers for each direction will be used. Suggested-by: NAllen Yan <yanwei@marvell.com> Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Allen Yan 提交于
Pulse interrupts (extended UART only) needs a change of state to trigger the TX interrupt. In addition to enabling the TX_READY_INT_EN flag, produce a FIFO state change from 'empty' to 'not full'. For this, write only one data byte in TX start, making the TX FIFO not empty, and wait for the TX interrupt to continue the transfer. Signed-off-by: NAllen Yan <yanwei@marvell.com> Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Allen Yan 提交于
When receiving data on RX pin before ->uart_startup() is called, some error bits in the state register could be set up (like BRK_DET). This is harmless when using only the standard UART (error bits are read-only), but may procude an endless loop once in the extended UART RX interrupt handler (error bits must be cleared). Clear the status register in ->uart_startup() to avoid this situation. Signed-off-by: NAllen Yan <yanwei@marvell.com> Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Allen Yan 提交于
Until now, the first UART port baudrate was set by the bootloader. Add a function allowing to change the baudrate. Changes may be done from userspace but also at probe time by the kernel. Use the simplest method: baudrate divisor. Works for all UART ports until 230400 baud. To achieve higher baudrates, software should implement the fractional divisor feature that allows more accuracy for higher rates. Signed-off-by: NAllen Yan <yanwei@marvell.com> [<miquel.raynal@free-electrons.com>: changed termios handling] Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Allen Yan 提交于
The existing UART driver relies on the bootloader to initialize the port(s). However, the secondary uart port may not be initialized properly in early boot stage. This patch adds the UART soft reset when probing, for all ports. Signed-off-by: NAllen Yan <yanwei@marvell.com> Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-