lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Serial-Core: USB-Serial port current issues.
On Wed, 21 Jun 2006 17:43:36 +0100
Russell King <rmk+lkml@arm.linux.org.uk> wrote:

| In the uart_update_mctrl() case, the purpose of the locking is to
| prevent two concurrent changes to the modem control state resulting
| in an inconsistency between the hardware and the software state. If
| it's provable that it is always called from process context (and
| it isn't called from a lock_kernel()-section or the lock_kernel()
| section doesn't mind a rescheduling point being introduced there),
| there's no problem converting that to a mutex.

Ok, then I can submit my debug patch to answer these questions.

might_sleep() can catch the lock_kernel()-section case right?

| With get_mctrl(), the situation is slightly more complicated, because
| we need to atomically update tty->hw_stopped in some circumstances
| (that may also be modified from irq context.) Therefore, to give
| the driver a consistent locking picture, the spinlock is _always_
| held.

Is it too bad (wrong?) to only protect the tty->hw_stopped update
by the spinlock? Then the call to get_mctrl() could be protected by
a mutex, or is it messy?

--
Luiz Fernando N. Capitulino
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-21 23:17    [W:0.099 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site