From: Paul Fulghum <paulkf@microgate.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] synclink_gt fix transmit race and timeout
Date: Tue, 23 Jun 2009 10:16:01 -0500 [thread overview]
Message-ID: <1245770161.3701.42.camel@x2.microgate.com> (raw)
In-Reply-To: <20090622231937.2d32898e.akpm@linux-foundation.org>
On Mon, 2009-06-22 at 23:19 -0700, Andrew Morton wrote:
> On Tue, 16 Jun 2009 14:44:11 -0500 Paul Fulghum <paulkf@microgate.com> wrote:
>
> > Fix race condition when adding transmit data to active DMA buffer ring
> > that can cause transmit stall.
> It's not a terribly good changelog, sorry.
> It fails to describe the race condition?
I attempted to say what was done in the change log and
let the patch describe the details of how it was done.
But I can see that might not be enough.
How's this? :
If after adding transmit data to the transmit DMA ring the
transmit DMA controller has become inactive before reading
the new data and the serial transmitter is still active sending
data already in the transmit FIFO and/or shift register,
then wait for the serial transmitter to become idle before
reactivating the transmit DMA controller.
Otherwise the transmit DMA controller may present the
new data to the serial transmitter in a small timing window
just as the serial transmitter transitions to the idle state.
Hitting this window results in the serial transmitter entering
an inconsistent state where it does not process the new data
and does not signal the transition to the idle state.
>From the driver perspective, this condition appears as an
active transmit DMA controller (correct) with unsent DMA buffers
(correct) and an active serial transmitter (wrong), even though
no data is actually being sent. When all the DMA buffers are full,
no further data is accepted from a user application calling
write() until a timeout occurs and the transmitter and
DMA controller are reset.
--
If this is good enough, I will resubmit the patch with
the updated change log.
--
Paul Fulghum
Microgate Systems, Ltd
next prev parent reply other threads:[~2009-06-23 15:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 19:44 [PATCH] synclink_gt fix transmit race and timeout Paul Fulghum
2009-06-23 6:19 ` Andrew Morton
2009-06-23 15:16 ` Paul Fulghum [this message]
2009-06-23 16:27 ` Andrew Morton
2009-06-23 17:55 ` Paul Fulghum
2009-06-23 17:02 ` Andrew Morton
2009-06-23 18:29 ` Paul Fulghum
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=1245770161.3701.42.camel@x2.microgate.com \
--to=paulkf@microgate.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@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