kernel-ark/drivers/serial
Arjan van de Ven d6e679b474 serial: fix wakup races in the mrst_max3110 driver
The mrst_max3110 driver had a set of unsafe wakeup sequences
along the following line:

if (!atomic_read(&foo)) {
  atomic_set(&foo, 1);
  wake_up(worker_thread);
}
and the worker thread would do

if (atomic_read(&foo)) {
  do_work();
  atomic_set(&foo, 0);
}

which can result in various missed wakups due to test-then-set races,
as well as due to clear-after-work instead of clear-before-work.

This patch fixes these races by using the proper bit test-and-set operations,
and by doing clear-before-work.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-10 13:47:39 -07:00
..
cpm_uart Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
jsm include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
8250_accent.c
8250_acorn.c
8250_boca.c
8250_early.c
8250_exar_st16c554.c
8250_fourport.c
8250_gsc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
8250_hp300.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
8250_hub6.c
8250_mca.c
8250_pci.c serial: add support for various Titan PCI cards 2010-06-04 13:37:18 -07:00
8250_pnp.c serial: 8250_pnp - add Fujitsu Wacom device 2010-04-30 09:20:34 -07:00
8250.c serial: add UART_CAP_EFR and UART_CAP_SLEEP flags to 16C950 UARTs definition 2010-08-10 13:47:38 -07:00
8250.h serial: 8250: add IRQ trigger support 2009-09-19 13:13:19 -07:00
21285.c ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock 2010-01-11 15:39:21 +00:00
68328serial.c serial: There's no config CONSOLE 2010-08-10 13:47:38 -07:00
68328serial.h
68360serial.c comment typo fixes: charater => character 2010-07-19 11:21:26 +02:00
altera_jtaguart.c serial: Add driver for the Altera JTAG UART 2010-05-21 09:34:30 -07:00
altera_uart.c serial: altera_uart: Proper section for altera_uart_remove 2010-06-04 13:37:18 -07:00
amba-pl010.c ARM: Fix section build warnings for AMBA drivers 2010-07-27 10:48:43 +01:00
amba-pl011.c ARM: Fix section build warnings for AMBA drivers 2010-07-27 10:48:43 +01:00
apbuart.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
apbuart.h sparc: Support for GRLIB APBUART serial port 2009-11-04 08:44:54 -08:00
atmel_serial.c serial: fix rs485 for atmel_serial on avr32 2010-07-26 11:59:31 -07:00
bcm63xx_uart.c serial: bcm63xx_uart: allow more than one uart to be registered. 2010-03-02 14:43:19 -08:00
bfin_5xx.c serial: bfin_5xx: fix typo in IER check 2010-06-04 13:37:17 -07:00
bfin_sport_uart.c serial: bfin_sport_uart: Use resource size to fix off-by-one error 2010-05-21 09:34:30 -07:00
bfin_sport_uart.h serial: bfin_sport_uart: add support for CTS/RTS via GPIOs 2010-05-21 09:34:27 -07:00
clps711x.c serial: kill off uart_info 2009-09-19 13:13:28 -07:00
crisv10.c CRIS: ioctl for getting RS485 information 2010-08-09 14:10:32 +02:00
crisv10.h
dz.c serial: kill off uart_info 2009-09-19 13:13:28 -07:00
dz.h
icom.c tty: Fix up char drivers request_room usage 2010-03-02 14:43:22 -08:00
icom.h
imx.c serial: imx.c: fix CTS trigger level lower to avoid lost chars 2010-05-13 12:10:56 -07:00
ioc3_serial.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ioc4_serial.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip22zilog.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
ip22zilog.h
Kconfig mrst_max3110: add UART driver for Max3110 on Moorestown 2010-08-10 13:47:39 -07:00
kgdboc.c kgdboc: Add call backs to allow kernel mode switching 2010-08-05 09:22:30 -05:00
m32r_sio_reg.h
m32r_sio.c serial: kill off uart_info 2009-09-19 13:13:28 -07:00
m32r_sio.h
Makefile mrst_max3110: add UART driver for Max3110 on Moorestown 2010-08-10 13:47:39 -07:00
max3100.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mcf.c m68knommu: allow 4 coldfire serial ports 2010-04-21 14:56:00 +10:00
mpc52xx_uart.c powerpc/5200: improve uart baud rate calculation (reach high baud rates, better accuracy) 2010-07-24 18:27:57 -06:00
mpsc.c powerpc/mpsc: Set the port device in the mpsc serial driver 2010-04-07 14:12:36 +10:00
mrst_max3110.c serial: fix wakup races in the mrst_max3110 driver 2010-08-10 13:47:39 -07:00
mrst_max3110.h mrst_max3110: add UART driver for Max3110 on Moorestown 2010-08-10 13:47:39 -07:00
msm_serial.c msm_serial: fix serial on trout 2010-06-04 13:37:16 -07:00
msm_serial.h msm_serial: fix serial on trout 2010-06-04 13:37:16 -07:00
mux.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
netx-serial.c serial: kill off uart_info 2009-09-19 13:13:28 -07:00
nwpserial.c fix comnment/printk typos concerning "empty" 2010-07-12 18:03:50 +02:00
of_serial.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
pmac_zilog.c powerpc/macio: Fix probing of macio devices by using the right of match table 2010-06-02 17:50:38 +10:00
pmac_zilog.h pmac-zilog: add platform driver 2010-02-27 18:31:02 +01:00
pnx8xxx_uart.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
pxa.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
s3c24a0.c ARM: S3C: Update Simtec copyright statements from , to - [2] 2009-12-01 01:33:51 +00:00
s3c2400.c ARM: S3C24XX: serial: Fix section mismatch warnings 2009-07-30 23:56:41 +01:00
s3c2410.c ARM: S3C: Update Simtec copyright statements from , to - [2] 2009-12-01 01:33:51 +00:00
s3c2412.c ARM: S3C2412: SoC has the fractional baud rate register 2010-02-03 01:55:01 +00:00
s3c2440.c ARM: S3C: Update Simtec copyright statements from , to - [2] 2009-12-01 01:33:51 +00:00
s3c6400.c ARM: S3C64XX: serial: Fix section mismatch warning 2009-07-30 23:56:41 +01:00
s5pv210.c ARM: S5PV210: serial: Fix section mismatch warning 2010-05-28 19:40:05 +09:00
sa1100.c ARM: Fix SA1100 Neponset serial section mismatch 2009-09-28 18:06:16 +01:00
samsung.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-03-12 16:04:50 -08:00
samsung.h ARM: SAMSUNG: serial: Modify console initialization. 2010-01-19 17:50:47 +09:00
sb1250-duart.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
sc26xx.c serial: kill off uart_info 2009-09-19 13:13:28 -07:00
serial_core.c serial: Fix crash if the minimum rate of the device is > 9600 baud 2010-01-20 15:03:29 -08:00
serial_cs.c pcmcia: do not use io_req_t when calling pcmcia_request_io() 2010-08-03 09:04:11 +02:00
serial_ks8695.c ARM: 6030/1: KS8695: enable console 2010-04-23 10:01:56 +01:00
serial_lh7a40x.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
serial_txx9.c serial_txx9: use container_of() instead of direct cast 2009-10-01 16:11:15 -07:00
sh-sci.c sh: fix Oops in the serial SCI driver 2010-05-22 17:06:34 +09:00
sh-sci.h SH: fix SCIFA SCASCR register bit definitions 2010-03-23 13:33:45 +09:00
sn_console.c fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
suncore.c sunserial: Don't call add_preferred_console() when console= is specified. 2010-05-25 23:51:17 -07:00
suncore.h serial: suncore: Fix RSC/LOM handling in sunserial_console_termios(). 2009-11-24 14:09:56 -08:00
sunhv.c of/platform: remove all of_bus_type and of_platform_bus_type references 2010-07-24 09:57:52 -06:00
sunsab.c of/platform: remove all of_bus_type and of_platform_bus_type references 2010-07-24 09:57:52 -06:00
sunsab.h
sunsu.c of/platform: remove all of_bus_type and of_platform_bus_type references 2010-07-24 09:57:52 -06:00
sunzilog.c of/platform: remove all of_bus_type and of_platform_bus_type references 2010-07-24 09:57:52 -06:00
sunzilog.h
timbuart.c serial: timbuart: make sure last byte is sent when port is closed 2010-05-21 09:34:29 -07:00
timbuart.h
uartlite.c of/address: Clean up function declarations 2010-08-01 01:42:42 -06:00
ucc_uart.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
vr41xx_siu.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
zs.c serial: move delta_msr_wait into the tty_port 2009-09-19 13:13:31 -07:00
zs.h