From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: John Linn <John.Linn@xilinx.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty/serial: add support for Xilinx PS UART
Date: Wed, 20 Apr 2011 16:35:35 +0100 [thread overview]
Message-ID: <20110420163535.77b5826f@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <bde1ee6b-79a8-46f9-a8a3-38a91e51f1c3@VA3EHSMHS019.ehs.local>
> I see the subtle locking issue you mention.
>
> This looks like a good way to help it, but it's not clear to me what to
> do in an isr
> if the function returns a NULL for the tty. In other places you can say
> the tty
It can happen, you must deal with it.
> It seems easier in this case to just move the tty =
> port->state->port.tty to after
> the lock is acquired.
It can still be NULL.
> I'm sure there's something obvious I'm missing here.
It varies what drivers do but essentially what has occurred is that the
user side of the tty has gone away and you have an IRQ still. Your port
is still around as the lifetime of the port is the lifetime of your
serial driver creating/deleting it, but your tty has gone.
In those cases you need to do whatever needs doing to handle the IRQ and
processing that doesn't require the tty. That varies by device, in many
cases for example you read the data and chuck it rather than stuffing it
into the flip buffer.
Alan
prev parent reply other threads:[~2011-04-20 15:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 20:14 [PATCH] tty/serial: add support for Xilinx PS UART John Linn
2011-04-19 21:15 ` Alan Cox
2011-04-19 21:51 ` John Linn
2011-04-20 9:25 ` Alan Cox
2011-04-20 13:43 ` John Linn
2011-04-19 22:22 ` John Linn
2011-04-19 23:21 ` Greg KH
2011-04-19 23:39 ` John Linn
2011-04-19 23:42 ` Greg KH
2011-04-19 23:47 ` John Linn
2011-04-20 9:39 ` Alan Cox
2011-04-20 15:19 ` John Linn
2011-04-20 15:35 ` Alan Cox [this message]
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=20110420163535.77b5826f@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=John.Linn@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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