- 10 10月, 2019 2 次提交
-
-
由 Anson Huang 提交于
All i.MX SoCs except i.MX1 have ONLY one necessary IRQ, use platform_get_irq_optional() to get second/third IRQ which are optional to avoid below error message during probe: [ 0.726219] imx-uart 30860000.serial: IRQ index 1 not found [ 0.731329] imx-uart 30860000.serial: IRQ index 2 not found Fixes: 7723f4c5 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1570614559-11900-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Randy Dunlap 提交于
Fix Sphinx warning in serial_core.c: ../drivers/tty/serial/serial_core.c:1969: WARNING: Definition list ends without a blank line; unexpected unindent. Fixes: 73abaf87 ("serial: earlycon: Refactor parse_options into serial core") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/e989641c-224a-1090-e596-e7cc800bed44@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 10月, 2019 3 次提交
-
-
由 Adam Ford 提交于
There are two checks to see if the manual gpio is configured, but these the check is seeing if the structure is NULL instead it should check to see if there are CTS and/or RTS pins defined. This patch uses checks for those individual pins instead of checking for the structure itself to restore auto RTS/CTS. Signed-off-by: NAdam Ford <aford173@gmail.com> Reviewed-by: NYegor Yefremov <yegorslists@googlemail.com> Link: https://lore.kernel.org/r/20191006163314.23191-2-aford173@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Adam Ford 提交于
When using mctrl_gpio_to_gpiod, it dereferences gpios into a single requested GPIO. This dereferencing can break if gpios is NULL, so this patch adds a NULL check before dereferencing it. If gpios is NULL, this function will also return NULL. Signed-off-by: NAdam Ford <aford173@gmail.com> Reviewed-by: NYegor Yefremov <yegorslists@googlemail.com> Link: https://lore.kernel.org/r/20191006163314.23191-1-aford173@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrey Smirnov 提交于
Fix incorrect read-modify-write sequence in lpuart_flush_buffer() that was reading from UARTPFIFO and writing to UARTCFIFO instead of operating solely on the latter. Fixes: 9bc19af9 ("tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer") Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Reported-by: NVivien Didelot <vivien.didelot@gmail.com> Tested-by: NVivien Didelot <vivien.didelot@gmail.com> Tested-by: NAndrew Lunn <andrew@lunn.ch> Reviewed-by: NFabio Estevam <festevam@gmail.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Chris Healy <cphealy@gmail.com> Cc: Cory Tusar <cory.tusar@zii.aero> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Jiri Slaby <jslaby@suse.com> Link: https://lore.kernel.org/r/20191004215537.5308-1-andrew.smirnov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 10月, 2019 7 次提交
-
-
由 Michal Simek 提交于
There are two parts which should be fixed. The first one is to assigned uartps_major at the end of probe() to avoid complicated logic when something fails. The second part is initialized uartps_major number to 0 when last device is removed. This will ensure that on next probe driver will ask for new dynamic major number. Fixes: ab262666 ("serial: uartps: Use the same dynamic major number for all ports") Reported-by: NPaul Thomas <pthomas8589@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/d2652cda992833315c4f96f06953eb547f928918.1570194248.git.michal.simek@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Randy Dunlap 提交于
Call uart_unregister_driver() conditionally instead of unconditionally, only if it has been previously registered. This uses driver.state, just as the sh-sci.c driver does. Fixes this null pointer dereference in tty_unregister_driver(), since the 'driver' argument is null: general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI RIP: 0010:tty_unregister_driver+0x25/0x1d0 Fixes: 238b8721 ("[PATCH] serial uartlite driver") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: stable <stable@vger.kernel.org> Cc: Peter Korsgaard <jacmet@sunsite.dk> Link: https://lore.kernel.org/r/9c8e6581-6fcc-a595-0897-4d90f5d710df@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Stefan-gabriel Mirea 提交于
Following an incorrect indentation reported to me by Dan Carpenter, I noticed that the SysRq lines were inherited from the lpuart driver[1] (note how the 'continue' is aligned to 'sport->port.sysrq = 0') and we have never actually tested the SysRq support. 'sport->sysrq = 0' is not necessary neither before nor after 'continue', because sysrq will already be 0 after uart_handle_sysrq_char() will finish. Also, since the LINFlexD driver never called uart_handle_break(), sysrq would have never been set to a nonzero value, so uart_handle_sysrq_char() was not going to do anything. Break conditions are detected based on a null data byte along with a framing error (stop bit sampled to 0). [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/fsl_lpuart.c?h=b3e3bf2ef2c74f5ce5c19510edbbb9bfc1d249c2#n659 Fixes: 09864c1c ("tty: serial: Add linflexuart driver for S32V234") Signed-off-by: NStefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com> Reported-by: Nkbuild test robot <lkp@intel.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20190918184439.7465-1-stefan-gabriel.mirea@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Geert Uytterhoeven 提交于
As platform_get_irq() now prints an error when the interrupt does not exist, scary warnings may be printed for optional interrupts: sh-sci e6550000.serial: IRQ index 1 not found sh-sci e6550000.serial: IRQ index 2 not found sh-sci e6550000.serial: IRQ index 3 not found sh-sci e6550000.serial: IRQ index 4 not found sh-sci e6550000.serial: IRQ index 5 not found Fix this by calling platform_get_irq_optional() instead for all but the first interrupts, which are optional. Fixes: 7723f4c5 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20191001180743.1041-1-geert+renesas@glider.beSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Hellwig 提交于
The sifive serial driver implements earlycon support, but unless another driver is built in that supports earlycon support it won't be usable. Explicitly select SERIAL_EARLYCON instead. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NPaul Walmsley <paul.walmsley@sifive.com> Link: https://lore.kernel.org/r/20190910055923.28384-1-hch@lst.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christophe JAILLET 提交于
'exit' functions should be marked as __exit, not __init. Fixes: c10b1332 ("tty: serial: Add RDA8810PL UART driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190910041702.7357-1-christophe.jaillet@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christophe JAILLET 提交于
'exit' functions should be marked as __exit, not __init. Fixes: fc60a8b6 ("tty: serial: owl: Implement console driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190910041129.6978-1-christophe.jaillet@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 9月, 2019 13 次提交
-
-
由 Krishna Yarlagadda 提交于
Add PIO mode support in receive and transmit path with RX interrupt trigger of 16 bytes for Tegra194 and older chips. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-13-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Standard UART controllers support +/-4% baud rate error tolerance. Tegra186 only supports 0% to +4% error tolerance whereas other Tegra chips support standard +/-4% rate. Add chip data for knowing error tolerance level for each soc. Creating new compatible for Tegra194 chip as it supports baud rate error tolerance of -2 to +2%, different from older chips. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-12-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Add support to adjust baud rates to fall under supported tolerance range through DT. Tegra186 chip has a hardware issue resulting in frame errors when tolerance level for baud rate is negative. Provided entries to adjust baud rate to be within acceptable range and work with devices that can send negative baud rate. Also report error when baud rate set is out of tolerance range of controller updated in device tree. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-11-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Add support to use 8 bytes trigger for Tegra186 SOC. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-9-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Set maximum number of UART ports to 8 as older chips have 5 ports and Tergra186 and later chips will have 8 ports. Add this info to chip data. Read device tree compatible of this driver and register uart driver with max ports of matching chip data. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-8-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Chips prior to Tegra186 needed delay of 3 UART clock cycles to avoid data loss. This issue is fixed in Tegra186 and a new flag is added to check if FIFO mode is enabled. chip data updated to check if this flag is available for a chip. Tegra186 has new compatible to enable this flag. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-7-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Report overrun/parity/frame/break errors to top tty layer. Add support to ignore break character if IGNBRK is set. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-5-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shardar Shariff Md 提交于
FIFO reset/flush code implemented now does not follow programming guidelines. RTS line has to be turned off while flushing FIFOs to avoid new transfers. Also check LSR bits UART_LSR_TEMT and UART_LSR_DR to confirm FIFOs are flushed. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-4-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ahung Cheng 提交于
This avoids two race conditions from the UART shutdown sequence both leading to 'Machine check error in AXI2APB' and kernel oops. One was that the clock was disabled before the DMA was terminated making it possible for the DMA callbacks to be called after the clock was disabled. These callbacks could write to the UART registers causing timeout. The second was that the clock was disabled before the UART was completely flagged as closed. This is done after the shutdown is called and a new write could be started after the clock was disabled. tegra_uart_start_pio_tx could be called causing timeout. Given that the baud rate is reset at the end of shutdown sequence, this fix is to examine the baud rate to avoid register access from both race conditions. Besides, terminate the DMA before disabling the clock. Signed-off-by: NAhung Cheng <ahcheng@nvidia.com> Signed-off-by: NShardar Mohammed <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-3-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shardar Shariff Md 提交于
Add support to ignore read characters if CREAD flag is not set. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-2-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
The sequence of arguments which was passed to handle_lsr_errors() didn't match the parameters defined in that function, &lsr was passed to flag and &flag was passed to lsr, this patch fixed that. Fixes: b7396a38 ("tty/serial: Add Spreadtrum sc9836-uart driver support") Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190905074151.5268-1-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Vogtländer 提交于
As documented in the data-sheet, the transmitter must be disabled before activating AutoCTS or auto transmitter flow control. Accordingly, the transmitter must be enabled after AutoCTS or auto transmitter flow control gets deactivated. Signed-off-by: NChristoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Link: https://lore.kernel.org/r/20190904121746.4641-1-c.vogtlaender@sigma-surface-science.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Vogtländer 提交于
Commit 391f93f2 ("serial: core: Rework hw-assisted flow control support") has changed the way the AutoCTS mode is handled. According to that change, serial drivers which enable H/W AutoCTS mode must set UPSTAT_AUTORTS, UPSTAT_AUTOCTS and UPSTAT_AUTOXOFF to prevent the serial core from inadvertently disabling RX or TX. This patch adds proper handling of UPSTAT_AUTORTS, UPSTAT_AUTOCTS and UPSTAT_AUTOXOFF flags. Signed-off-by: NChristoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Link: https://lore.kernel.org/r/20190904121141.4570-1-c.vogtlaender@sigma-surface-science.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 9月, 2019 15 次提交
-
-
由 kbuild test robot 提交于
drivers/tty/serial/fsl_linflexuart.c:907:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: b953815b819b ("tty: serial: Add linflexuart driver for S32V234") CC: Stefan-gabriel Mirea <stefan-gabriel.mirea@nxp.com> Signed-off-by: Nkbuild test robot <lkp@intel.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20190825142837.zt3hpa22c7iofg3v@48261080c7f1Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Stefan-gabriel Mirea 提交于
The "fsl,s32-linflexuart" compatible string is too generic. Make it SoC specific. Signed-off-by: NStefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com> Link: https://lore.kernel.org/r/20190823191115.18490-4-stefan-gabriel.mirea@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
The sprd serial console can work with only 26M fixed clock, but the probe() is returning fail if the clock "enable" is not configured in device tree. This patch will fix the problem to let the uart device which is used for console can be initialized even missing "enable" clock configured in devicetree. We should make sure the debug function as available as we can. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-4-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
Use console_initcall to save the console index we selected on the command line to sprd_console before probe finished. Thus we can make different processes to the uart devices during initialization according to whether it is used for console. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-3-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
When calling sprd_console_setup(), sprd_uart_port probably is NULL, we should check that first instead of checking its items directly. Also we should check membase to avoid accessing uart device before its initialization finished. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-2-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Richard Genoud 提交于
Since commit 18dfef9c ("serial: atmel: convert to irq handling provided mctrl-gpio"), the GPIOs interrupts are handled by mctrl_gpio_irq_handle(). So, atmel_get_lines_status() can be completely killed and replaced by : atmel_uart_readl(port, ATMEL_US_CSR); Suggested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NRichard Genoud <richard.genoud@gmail.com> Link: https://lore.kernel.org/r/20190826071752.30396-1-richard.genoud@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
This should help to avoid unnecessary gaps in transmission while adding little overhead due to low default Tx threshold level (2 bytes). Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-6-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): avoid writing baud rate divider registers when the values to be written are the same as current. Any writing seems to restart transmission/receiving logic in the hardware, that leads to data breakage even when rate doesn't in fact change. E.g., user switches RTS/CTS handshake and suddenly gets broken bytes. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-5-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): disabling individual interrupt requests in UART for duration of the routine is pointless. Get rid of it. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-4-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): stopping receiver and transmitter does harm when something that doesn't touch transmission format/rate changes, such as RTS/CTS handshake. OTOH, it does no good on baud rate or format change, as synchronization on upper-level protocols is still required to do it right. Therefore, just stop doing it. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-3-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): remove busy-waiting "drain Tx FIFO" loop. Worse yet, it was potentially unbounded wait due to RTS/CTS (hardware) handshake. Let user space ensure draining is done before termios change, if draining is needed in the first place. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-2-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kundrát 提交于
A recent change split the insertion loop into two parts. The first part accessed bytes 0, 1, ... (rxlen - 2), and the second part by mistake took offset `rxlen` instead of the correct `rxlen - 1`. So one byte was not stored, and the final access wrote past the end of the rx_buf. Fixes: 9c12d739 (tty: max310x: Split uart characters insertion loop) Signed-off-by: NJan Kundrát <jan.kundrat@cesnet.cz> Reviewed-by: NSerge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/13ea227620aaad8a7231d42ed03a8508297d4eb3.1567027079.git.jan.kundrat@cesnet.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wei Yongjun 提交于
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20190827114614.102037-1-weiyongjun1@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ralf Ramsauer 提交于
There may be setups, where legacy interrupts are not available. This is the caese, e.g., when Linux runs as guest (aka. non-root cell) of the partitioning hypervisor Jailhouse. There, only MSI(-X) interrupts are available for guests. But the 8250_pci driver currently only supports legacy ints. So let's enable MSI(-X) interrupts. Nevertheless, this needs to handled with care: while many 8250 devices actually claim to support MSI(-X) interrupts it should not be enabled be default. I had at least one device in my hands with broken MSI implementation. So better introduce a whitelist with devices that are known to support MSI(-X) interrupts. I tested all devices mentioned in the patch. Signed-off-by: NRalf Ramsauer <ralf.ramsauer@oth-regensburg.de> Link: https://lore.kernel.org/r/20190812112152.693622-1-ralf.ramsauer@oth-regensburg.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ji-Ze Hong (Peter Hong) 提交于
Fintek F81504A/508A/512A is PCIE to 4/8/12 UARTs device. It's support IO/MMIO/PCIE conf to access all functions. The old F81504/508/512 is only support IO. Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com> Link: https://lore.kernel.org/r/1565933249-23076-1-git-send-email-hpeter+linux_kernel@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-