WSL2-Linux-Kernel/drivers/tty/serial/8250
Ilpo Järvinen f58c252e30 serial: 8250: fix XOFF/XON sending when DMA is used
When 8250 UART is using DMA, x_char (XON/XOFF) is never sent
to the wire. After this change, x_char is injected correctly.

Create uart_xchar_out() helper for sending the x_char out and
accounting related to it. It seems that almost every driver
does these same steps with x_char. Except for 8250, however,
almost all currently lack .serial_out so they cannot immediately
take advantage of this new helper.

The downside of this patch is that it might reintroduce
the problems some devices faced with mixed DMA/non-DMA transfer
which caused revert f967fc8f16 (Revert "serial: 8250_dma:
don't bother DMA with small transfers"). However, the impact
should be limited to cases with XON/XOFF (that didn't work
with DMA capable devices to begin with so this problem is not
very likely to cause a major issue, if any at all).

Fixes: 9ee4b83e51 ("serial: 8250: Add support for dmaengine")
Reported-by: Gilles Buloz <gilles.buloz@kontron.com>
Tested-by: Gilles Buloz <gilles.buloz@kontron.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220314091432.4288-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-18 13:30:54 +01:00
..
8250.h serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_alpha.c serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_aspeed_vuart.c serial: 8250_aspeed_vuart: replace snprintf with sysfs_emit 2022-02-25 10:35:36 +01:00
8250_bcm2835aux.c serial: 8250_bcm2835aux: Add ACPI support 2022-02-08 11:09:00 +01:00
8250_bcm7271.c serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure 2022-01-06 15:53:49 +01:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_core.c serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_dma.c serial: 8250: fix XOFF/XON sending when DMA is used 2022-03-18 13:30:54 +01:00
8250_dw.c serial: 8250_dw: Add StarFive JH7100 quirk 2021-11-25 18:33:45 +01:00
8250_dwlib.c serial: 8250_lpss: Extract dw8250_do_set_termios() for common use 2021-10-10 15:22:34 +02:00
8250_dwlib.h serial: 8250_lpss: Extract dw8250_do_set_termios() for common use 2021-10-10 15:22:34 +02:00
8250_early.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
8250_em.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
8250_exar.c serial: 8250_exar: derive nr_ports from PCI ID for Acces I/O cards 2022-01-31 14:30:25 +01:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fintek.c serial: 8250_fintek: Fix garbled text for console 2021-12-15 21:51:07 +01:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c serial: 8250_fsl: Move fsl8250_data to ACPI section 2021-09-22 16:59:13 +02:00
8250_gsc.c serial: parisc: GSC: fix build when IOSAPIC is not set 2022-02-14 19:34:42 +01:00
8250_hp300.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
8250_ioc3.c Fix up remaining devm_ioremap_nocache() in SGI IOC3 8250 UART driver 2020-02-08 14:19:39 -08:00
8250_lpc18xx.c tty: Remove dev_err() usage after platform_get_irq() 2019-09-04 12:43:49 +02:00
8250_lpss.c serial: 8250_lpss: Balance reference count for PCI DMA device 2022-02-25 10:36:31 +01:00
8250_men_mcb.c 8250-men-mcb: fix signed/unsigned confusion 2020-06-27 16:12:45 +02:00
8250_mid.c serial: 8250_mid: Balance reference count for PCI DMA device 2022-02-25 10:35:59 +01:00
8250_mtk.c serial: 8250_mtk: make two read-only arrays static const 2022-03-18 13:13:56 +01:00
8250_of.c serial: 8250: of: Fix mapped region size when using reg-offset property 2022-01-26 14:50:52 +01:00
8250_omap.c tty: serial: make use of UART_LCR_WLEN() + tty_get_char_size() 2022-02-28 21:49:06 +01:00
8250_pci.c tty: Add support for Brainboxes UC cards. 2022-01-26 14:49:29 +01:00
8250_pericom.c serial: 8250_pericom: Revert "Re-enable higher baud rates" 2022-02-04 15:32:05 +01:00
8250_pnp.c serial: 8250: remove duplicated BRI0A49 and BDP3336 entries 2021-09-22 16:59:13 +02:00
8250_port.c serial: 8250: fix XOFF/XON sending when DMA is used 2022-03-18 13:30:54 +01:00
8250_pxa.c serial: 8250_pxa: Switch to use platform_get_irq() 2020-06-27 16:12:56 +02:00
8250_tegra.c serial: 8250_tegra: mark acpi_device_id as unused with !ACPI 2022-03-18 13:18:25 +01:00
8250_uniphier.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig serial: 8250: Correct Kconfig help text for blacklisted PCI devices 2022-02-25 10:33:50 +01:00
Makefile serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
serial_cs.c serial_cs: Add Option International GSM-Ready 56K/ISDN modem 2021-06-16 09:20:29 +02:00