u-boot-brain/drivers/serial
Pali Rohár 7f840c1b26 serial: usbtty: Send urb data in correct order
Function next_urb() selects the last urb data buffer from linked list to
which next data from usbtty's puts function should be appended.

But to check if TX data still exists it is needed to look at the first urb
data buffer from linked list. So check for endpoint->tx_urb (first from the
linked list) instead of current_urb (the last from the linked list).

Successful call to udc_endpoint_write() may invalidate active urb and
allocate new urb in queue which invalidates pointer returned by next_urb()
function.

So call next_urb() prior putting data into urb buffer and call it every
time after using udc_endpoint_write() function to prevent sending data from
usbtty's puts function in incorrect order.

This patch fixes issue that usbtty code does not transmit data when they
are waiting in the tx queue.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
2021-03-03 04:12:45 +01:00
..
altera_jtag_uart.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
altera_uart.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
arm_dcc.c serial: Remove DM_FLAG_PRE_RELOC flag in various drivers 2018-11-14 09:16:28 -08:00
atmel_usart.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
atmel_usart.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig serial: s5p: Allow independent selection 2021-02-23 15:43:21 +09:00
lpc32xx_hsuart.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
Makefile serial: s5p: Allow independent selection 2021-02-23 15:43:21 +09:00
ns16550.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sandbox.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_ar933x.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_arc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_bcm283x_mu.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_bcm283x_pl011.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_bcm6345.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_coreboot.c serial: Update NS16550_t and struct NS16550 2021-01-05 12:24:40 -07:00
serial_cortina.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_efi.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_intel_mid.c serial: Update NS16550_t and struct NS16550 2021-01-05 12:24:40 -07:00
serial_linflexuart.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_lpuart.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_mcf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_meson.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
serial_mpc8xx.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_msm.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_mt7620.c serial: add uart driver for MediaTek MT7620 SoC 2021-01-24 21:39:26 +01:00
serial_mtk.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_mvebu_a3700.c serial: a3720: Implement pending method for output direction 2021-01-27 13:12:51 +01:00
serial_mxc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_ns16550.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_nulldev.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
serial_omap.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
serial_owl.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_pic32.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_pl01x_internal.h dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_pl01x.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_pxa.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_rockchip.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
serial_s5p.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_sh.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_sh.h sh: sh3: Remove CPU support 2019-05-10 22:43:18 +02:00
serial_sifive.c Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
serial_sti_asc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_stm32.c serial: stm32: define LOG_CATEGORY 2021-01-13 09:52:58 +01:00
serial_stm32.h dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_uniphier.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_xen.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_xuartlite.c Xilinx changes for v2021.04 2021-01-06 07:57:33 -05:00
serial_zynq.c clk: zynq: Add dummy clock enable function 2021-02-23 14:56:59 +01:00
serial-uclass.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
usbtty.c serial: usbtty: Send urb data in correct order 2021-03-03 04:12:45 +01:00
usbtty.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00