lkml.org 
[lkml]   [2014]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/12] serial_core: Handle TIOC[GS]RS485 ioctls.
From
Date
On Thu, 2014-10-09 at 10:07 +0200, Ricardo Ribalda Delgado wrote:
> Hello Alan
>
> >
> > What is the locking between setting/getting/driver use of the config ?
> > This really needs a lock (termios sem I think is perhaps appropriate
> > given when the values are normally referenced).
>
> I tried implementing it with the sermios sem
> ((&(uart_port)->state->port.tty->termios_rwsem)), but some drivers
> access the rs485 structure inside their irq handler. So I have see
> options here
>
> 1) Protect the structure with uart_port->lock spinlock
> 2) Assume that an assignment is atomic on critical sections where I
> cannot hold the rwsem.
>
> I think 1) is more correct. Any issues that I continue in this
> direction? Any better idea?

For uart #1 sounds right to me too.

Alan




\
 
 \ /
  Last update: 2014-10-09 17:01    [W:0.049 / U:1.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site