From: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
To: Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Linus Walleij
<linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
Grzegorz Sygieda
<grzegorz.sygieda-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org>,
Lukasz Baj <lukasz.baj-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] SPI: fix in PL022 stop queue procedure
Date: Fri, 21 May 2010 00:28:30 +0200 [thread overview]
Message-ID: <1274394510-18467-1-git-send-email-linus.walleij@stericsson.com> (raw)
From: Grzegorz Sygieda <grzegorz.sygieda-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org>
This fix prevents queue being marked as "stopped", if data exists
in the queue list.
Signed-off-by: Grzegorz Sygieda <grzegorz.sygieda-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Lukasz Baj <lukasz.baj-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
---
drivers/spi/amba-pl022.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index e9aeee1..ba9663f 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1148,7 +1148,6 @@ static int stop_queue(struct pl022 *pl022)
* A wait_queue on the pl022->busy could be used, but then the common
* execution path (pump_messages) would be required to call wake_up or
* friends on every SPI message. Do this instead */
- pl022->run = QUEUE_STOPPED;
while (!list_empty(&pl022->queue) && pl022->busy && limit--) {
spin_unlock_irqrestore(&pl022->queue_lock, flags);
msleep(10);
@@ -1157,6 +1156,7 @@ static int stop_queue(struct pl022 *pl022)
if (!list_empty(&pl022->queue) || pl022->busy)
status = -EBUSY;
+ else pl022->run = QUEUE_STOPPED;
spin_unlock_irqrestore(&pl022->queue_lock, flags);
--
1.6.3.3
------------------------------------------------------------------------------
reply other threads:[~2010-05-20 22:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1274394510-18467-1-git-send-email-linus.walleij@stericsson.com \
--to=linus.walleij-0is4wlfg1ojsueelwk9/pw@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=grzegorz.sygieda-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org \
--cc=lukasz.baj-++hxYGjEMp0AvxtiuMwx3w@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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;
as well as URLs for NNTP newsgroup(s).