]> git.baikalelectronics.ru Git - kernel.git/commit
serial: MPSC: Remove race between Rx stop & restart
authorCarlos Sanchez <carlos.sanchez@gecoinc.com>
Tue, 31 Jul 2007 07:38:59 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:41 +0000 (15:39 -0700)
commitb473cad63cefd90559dd083a9a5fc09f854f23a2
treeb0928bdda2320b4ac81b4f350aed9d0006efc732
parent7c609da22bfc39a625120ae8a92fed789d1838db
serial: MPSC: Remove race between Rx stop & restart

The patch in commit ID f8f0fae38828430b0400aa2f1443308ca517cde6 stops (aborts)
the MPSC's receive engine just before restarting it.  Unfortunately, it
doesn't wait for the abort to complete before restarting it which creates a
race between the abort and the restart.  If the restart occurs first, the
in-progress abort stops it again and the rx engine remains stopped.

Instead, do the abort when the SDMA engine is being stopped.  Make sure to
wait for the abort to complete before continuing.

Signed-off-by: Carlos Sanchez <carlos.sanchez@gecoinc.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/mpsc.c