From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: John Ogness <john.ogness@linutronix.de>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tony Lindgren <tony@atomide.com>,
linux-omap@vger.kernel.org, nsekhar@ti.com, nm@ti.com,
linux-serial@vger.kernel.org,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH 3/3] serial: 8250: omap: restore registers on shutdown
Date: Thu, 06 Aug 2015 14:31:27 +0200 [thread overview]
Message-ID: <55C3539F.4070403@linutronix.de> (raw)
In-Reply-To: <55C352A8.3070102@hurleysoftware.com>
On 08/06/2015 02:27 PM, Peter Hurley wrote:
> Hi Sebastian,
Hi Peter,
> On 08/04/2015 07:58 AM, Sebastian Andrzej Siewior wrote:
>> On 08/03/2015 09:32 PM, Peter Hurley wrote:
>>
>>>> You mean a function in 8250-dma API which does what I did just here
>>>> with the wait_event() and the wake_up in the callback? That way I could
>>>> move the termios_wait into the dma struct instead of keeping in the
>>>> omap specific part. I am also not sure if OMAP is the only one that may
>>>> hang here or the other people just didn't notice it yet.
>>>
>>> Exactly; and we need to fix DMA wrt x_char anyway.
>>>
>>> Going back to the dmaengine api, I think something like this might work
>>> (as a first approximation):
>>>
>>> dma_sync_wait(dma->txchan, dma->tx_cookie);
>>> dmaengine_pause(dma->txchan);
>>>
>>> /* remainder of set_termios */
>>>
>>> dmaengine_resume(dma->txchan);
>>>
>>> We could require 8250 core dma to support pause/resume.
>>
>> I would prefer the waitqueue approach.
>> You can't do this while holding the port lock. The lock is taken with
>> irqs off so may not see the transfer completing.
>> Why do you pause the channel? It may not work without an active
>> descriptor and a start without "resume" should work. Also you must
>> ensure that DMA's complete callback does not start another transfer if
>> there is something queued up (that is why I had the tx_running dance).
>> I am not sure if a transfer that is active and then paused will not
>> trigger the hang bug if we change the termios in between.
>
> I'll look at/test this this weekend, ok?
Sure. I'm currently re-spinning the patches so have everything in
proper pieces. While at it I will take a look at x_char.
> Regards,
> Peter Hurley
>
Sebastian
next prev parent reply other threads:[~2015-08-06 12:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 22:54 [PATCH 3/3] serial: 8250: omap: restore registers on shutdown John Ogness
2015-07-31 0:51 ` Peter Hurley
2015-08-03 16:09 ` Sebastian Andrzej Siewior
2015-08-03 16:34 ` Peter Hurley
2015-08-03 16:54 ` Sebastian Andrzej Siewior
2015-08-03 19:32 ` Peter Hurley
2015-08-04 11:58 ` Sebastian Andrzej Siewior
2015-08-06 12:27 ` Peter Hurley
2015-08-06 12:31 ` Sebastian Andrzej Siewior [this message]
2015-08-06 13:59 ` Sebastian Andrzej Siewior
2015-08-06 18:22 ` Peter Hurley
2015-08-07 0:41 ` Charles Manning
2016-03-02 9:54 ` John Ogness
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=55C3539F.4070403@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=peter@hurleysoftware.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).