linux-uconsole/drivers/tty/serial
Peng Fan d207bc81a0 tty: serial: pch_uart: correct usage of dma_unmap_sg
commit 74887542fd upstream.

Per Documentation/DMA-API-HOWTO.txt,
To unmap a scatterlist, just call:
	dma_unmap_sg(dev, sglist, nents, direction);

.. note::

	The 'nents' argument to the dma_unmap_sg call must be
	the _same_ one you passed into the dma_map_sg call,
	it should _NOT_ be the 'count' value _returned_ from the
	dma_map_sg call.

However in the driver, priv->nent is directly assigned with value
returned from dma_map_sg, and dma_unmap_sg use priv->nent for unmap,
this breaks the API usage.

So introduce a new entry orig_nent to remember 'nents'.

Fixes: da3564ee02 ("pch_uart: add multi-scatter processing")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1573623259-6339-1-git-send-email-peng.fan@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:09 +01:00
..
8250 serial: 8250: Fix serial8250 initialization crash 2019-12-05 09:21:06 +01:00
cpm_uart tty: serial: cpm_uart - fix init when SMC is relocated 2019-07-31 07:26:57 +02:00
jsm tty: serial: jsm: remove redundant pointer ch 2018-07-13 15:36:32 +02:00
21285.c
altera_jtaguart.c
altera_uart.c serial: altera: set RRDY flag also without irq 2018-02-28 13:30:09 +01:00
amba-pl010.c
amba-pl011.c serial: pl011: Fix DMA ->flush_buffer() 2019-12-13 08:51:00 +01:00
amba-pl011.h
apbuart.c
apbuart.h
ar933x_uart.c serial: ar933x_uart: Fix build failure with disabled console 2019-05-04 09:20:13 +02:00
arc_uart.c serial: arc_uart: Fix out-of-bounds access through DT alias 2018-02-28 15:29:59 +01:00
atmel_serial.c tty/serial: atmel: fix out of range clock divider handling 2020-01-04 19:13:44 +01:00
atmel_serial.h
bcm63xx_uart.c
clps711x.c
digicolor-usart.c tty/serial: digicolor: Fix digicolor-usart already registered warning 2019-07-31 07:26:59 +02:00
dz.c
dz.h
earlycon-arm-semihost.c
earlycon.c earlycon: Remove hardcoded port->uartclk initialization in of_setup_earlycon 2018-05-14 13:41:05 +02:00
efm32-uart.c
fsl_lpuart.c tty: serial: fsl_lpuart: use the sg count from dma_map_sg 2019-12-13 08:50:59 +01:00
icom.c
icom.h
ifx6x60.c serial: ifx6x60: add missed pm_runtime_disable 2019-12-13 08:51:01 +01:00
ifx6x60.h
imx.c tty: serial: imx: use the sg count from dma_map_sg 2020-01-17 19:47:09 +01:00
ioc3_serial.c
ioc4_serial.c
ip22zilog.c
ip22zilog.h
Kconfig tty: serial: drop ATH79 specific SoC symbols 2018-05-14 13:51:12 +02:00
kgdb_nmi.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
kgdboc.c Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc 2019-04-03 06:26:26 +02:00
lantiq.c
lpc32xx_hs.c
Makefile TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
max310x.c serial: max310x: Fix tx_empty() callback 2019-12-05 09:20:40 +01:00
max3100.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mcf.c
men_z135_uart.c
meson_uart.c tty: serial: meson: fix typo in the "stop bit" register definition 2017-11-28 15:32:33 +01:00
mpc52xx_uart.c
mps2-uart.c
mpsc.c
msm_serial.c tty: serial: msm_serial: Fix lockup for sysrq and oops 2020-01-09 10:19:06 +01:00
mux.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mvebu-uart.c serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference 2019-04-03 06:26:25 +02:00
mxs-auart.c serial: mxs-auart: Fix potential infinite loop 2019-11-20 18:46:54 +01:00
netx-serial.c
omap-serial.c tty: omap-serial: Fix initial on-boot RTS GPIO level 2018-01-09 16:45:17 +01:00
owl-uart.c tty: serial: owl: Fix the link time qualifier of 'owl_uart_exit()' 2019-11-06 13:05:49 +01:00
pch_uart.c tty: serial: pch_uart: correct usage of dma_unmap_sg 2020-01-17 19:47:09 +01:00
pic32_uart.c serial: set suppress_bind_attrs flag only if builtin 2019-01-26 09:32:34 +01:00
pic32_uart.h
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
pxa.c serial: pxa: Fix an error handling path in 'serial_pxa_probe()' 2018-06-28 21:07:54 +09:00
qcom_geni_serial.c tty: serial: qcom_geni_serial: Fix softlock 2019-12-13 08:52:27 +01:00
rp2.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
sa1100.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
samsung.c serial: samsung: Enable baud clock for UART reset procedure in resume 2019-11-20 18:46:53 +01:00
samsung.h
sb1250-duart.c
sc16is7xx.c sc16is7xx: Fix for "Unexpected interrupt: 8" 2019-11-06 13:05:15 +01:00
sccnxp.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
serial-tegra.c
serial_core.c tty: link tty and port before configuring it as console 2020-01-14 20:07:05 +01:00
serial_ks8695.c
serial_mctrl_gpio.c serial: mctrl_gpio: Check for NULL pointer 2019-11-06 13:05:52 +01:00
serial_mctrl_gpio.h
serial_txx9.c
sh-sci.c serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback 2019-12-05 09:20:23 +01:00
sh-sci.h serial: sh-sci: Support for HSCIF RX sampling point adjustment 2018-04-23 10:08:18 +02:00
sirfsoc_uart.c serial: sirf: Fix out-of-bounds access through DT alias 2018-02-28 15:30:00 +01:00
sirfsoc_uart.h
sn_console.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
sprd_serial.c serial: sprd: correct the wrong sequence of arguments 2019-09-21 07:16:45 +02:00
st-asc.c tty: serial: simplify getting .drvdata 2018-04-22 17:29:43 +02:00
stm32-usart.c serial: stm32: fix initialization of RS485 mode 2018-03-15 17:39:43 +01:00
stm32-usart.h serial: stm32: add support for RS485 hardware control mode 2018-03-14 13:35:37 +01:00
suncore.c drivers/tty: add missing of_node_put() 2018-12-21 14:15:18 +01:00
sunhv.c sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg 2019-06-22 08:15:14 +02:00
sunsab.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sunsab.h
sunsu.c serial/sunsu: fix refcount leak 2019-01-13 09:51:03 +01:00
sunzilog.c
sunzilog.h
timbuart.c
timbuart.h
uartlite.c serial: uartlite: fix exit path null pointer 2019-10-17 13:45:00 -07:00
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c serial: uartps: Fix suspend functionality 2019-11-20 18:46:53 +01:00
zs.c
zs.h