mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/12] serial_core: Handle TIOC[GS]RS485 ioctls.
Date: Thu, 09 Oct 2014 15:16:32 +0100	[thread overview]
Message-ID: <1412864192.28467.72.camel@acox1-desk.ger.corp.intel.com> (raw)
In-Reply-To: <CAPybu_3b6epYcQ1c0L0E1so7BNJ7DndA4E2nHDfj8OYjR3u0Zw@mail.gmail.com>

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



  reply	other threads:[~2014-10-09 14:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1412798258-23655-1-git-send-email-ricardo.ribalda@gmail.com>
2014-10-08 19:57 ` [PATCH 01/12] serial/max310x: Remove obsolete #ifset TIOC[SG]RS485 Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 02/12] serial/sc16is7xx: " Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 03/12] serial_core: Handle TIOC[GS]RS485 ioctls Ricardo Ribalda Delgado
2014-10-08 20:11   ` Alan Cox
2014-10-08 20:43     ` Ricardo Ribalda Delgado
2014-10-08 23:29       ` Alan Cox
2014-10-09  8:07     ` Ricardo Ribalda Delgado
2014-10-09 14:16       ` Alan Cox [this message]
2014-11-05 19:37         ` Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 04/12] serial/8250: Copy RS485 fields to serial_core Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 05/12] 8250/fintek: Use rs485 handler from serial_core Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 06/12] serial/8250: Remove obsolete handling of rs485 ioctls Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 07/12] serial/sc16is7xx: Use the rs485 functions on serial_core Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 08/12] serial/mcf: " Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 09/12] serial/atmel: " Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 10/12] serial/omap: " Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 11/12] drivers/max310: " Ricardo Ribalda Delgado
2014-10-08 19:57 ` [PATCH 12/12] serial_core: Remove call to driver-specific TIO[GS]RS485] Ricardo Ribalda Delgado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412864192.28467.72.camel@acox1-desk.ger.corp.intel.com \
    --to=alan@linux.intel.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=ricardo.ribalda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®