WSL2-Linux-Kernel/drivers/tty/serial
Thomas Pfaff 7deb39ed8d serial_core: fix uart PORT_UNKNOWN handling
While porting a RS485 driver from 2.6.29 to 3.14, i noticed that the serial tty
driver could break it by using uart ports that it does not own :

1. uart_change_pm ist called during uart_open and calls the uart pm function
   without checking for PORT_UNKNOWN.
   The fix is to move uart_change_pm from uart_open to uart_port_startup.
2. The return code from the uart request_port call in uart_set_info is not
   handled properly, leading to the situation that the serial driver also
   thinks it owns the uart ports.
   This can triggered by doing following actions :

   setserial /dev/ttyS0 uart none    # release the uart ports
   modprobe lirc-serial              # or any other device that uses the uart
   setserial /dev/ttyS0 uart 16550   # gives no error and the uart tty driver
                                     # can use the ports as well

Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-24 15:38:22 -07:00
..
8250 serial: 8250: Fix thread unsafe __dma_tx_complete function 2014-04-24 15:18:02 -07:00
cpm_uart
jsm
21285.c
68328serial.c
Kconfig serial: timberdale: Depend on X86_32 2014-04-16 14:17:44 -07:00
Makefile
altera_jtaguart.c
altera_uart.c
amba-pl010.c
amba-pl011.c serial: amba-pl011: fix regression, causing an Oops on rmmod 2014-04-16 14:31:13 -07:00
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c ARM: SoC: cleanups for 3.15 2014-04-05 13:51:19 -07:00
bcm63xx_uart.c tty: serial: bcm63xx_uart: add support for DT probing 2014-02-28 16:27:18 -08:00
bfin_sport_uart.c
bfin_sport_uart.h
bfin_uart.c
clps711x.c Revert "serial: clps711x: Give a chance to perform useful tasks during wait loop" 2014-04-16 14:17:44 -07:00
crisv10.c tty: serial: crisv10: Drop remaining code for CRISv10 CPU simulator 2014-02-15 12:16:21 -08:00
crisv10.h
dz.c
dz.h
efm32-uart.c serial: efm32: use $vendor,$device scheme for compatible string 2014-04-16 14:17:43 -07:00
fsl_lpuart.c serial: fsl_lpuart: add DMA support 2014-02-18 12:50:26 -08:00
icom.c
icom.h
ifx6x60.c
ifx6x60.h
imx.c serial: imx: Remove init() and exit() platform callbacks 2014-02-28 16:36:45 -08:00
ioc3_serial.c
ioc4_serial.c
ip22zilog.c
ip22zilog.h
kgdb_nmi.c
kgdboc.c
lantiq.c
lpc32xx_hs.c
m32r_sio.c
m32r_sio.h
m32r_sio_reg.h
max310x.c serial: max310x: Add missing #include <linux/uaccess.h> 2014-03-17 16:13:23 -07:00
max3100.c
mcf.c
mfd.c
mpc52xx_uart.c
mpsc.c
mrst_max3110.c
mrst_max3110.h
msm_serial.c msm_serial: Add support for poll_{get,put}_char() 2014-02-12 11:34:23 -08:00
msm_serial.h msm_serial: Add support for poll_{get,put}_char() 2014-02-12 11:34:23 -08:00
msm_serial_hs.c
msm_smd_tty.c
mux.c
mxs-auart.c
netx-serial.c
nwpserial.c
of_serial.c
omap-serial.c serial: omap: Fix missing pm_runtime_resume handling by simplifying code 2014-04-16 14:19:13 -07:00
pch_uart.c serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n 2014-02-13 09:17:31 -08:00
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c
pxa.c
rp2.c
sa1100.c
samsung.c serial: samsung: Change barrier() to cpu_relax() in console output 2014-04-24 15:38:22 -07:00
samsung.h
sb1250-duart.c
sccnxp.c
serial-tegra.c
serial_core.c serial_core: fix uart PORT_UNKNOWN handling 2014-04-24 15:38:22 -07:00
serial_ks8695.c
serial_txx9.c
sh-sci.c TTY/Serial driver update for 3.15-rc1 2014-04-01 16:55:57 -07:00
sh-sci.h
sirfsoc_uart.c serial: sirf: move to use generic dma dt-binding to get dma channels 2014-02-13 10:36:25 -08:00
sirfsoc_uart.h serial: sirf: move to use generic dma dt-binding to get dma channels 2014-02-13 10:36:25 -08:00
sn_console.c
st-asc.c serial: st-asc: Fix SysRq char handling 2014-04-16 14:17:44 -07:00
suncore.c
sunhv.c sparc: serial: Clean up the locking for -rt 2014-03-06 16:32:25 -05:00
sunsab.c sparc: serial: Clean up the locking for -rt 2014-03-06 16:32:25 -05:00
sunsab.h
sunsu.c sparc: serial: Clean up the locking for -rt 2014-03-06 16:32:25 -05:00
sunzilog.c sparc: serial: Clean up the locking for -rt 2014-03-06 16:32:25 -05:00
sunzilog.h
tilegx.c
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c
zs.c
zs.h