linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.
Date: Sun, 16 Jan 2011 00:12:11 +0100	[thread overview]
Message-ID: <m3pqrxhid0.fsf_-_@intrepid.localdomain> (raw)
In-Reply-To: <m38vylixqw.fsf@intrepid.localdomain> (Krzysztof Halasa's message of "Sat, 15 Jan 2011 23:54:31 +0100")

Queues should be empty when released, if not, there is a safety valve.
Make sure the queue is usable after it triggers.

--- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
@@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue)
 	       qmgr_queue_descs[queue], queue);
 	qmgr_queue_descs[queue][0] = '\x0';
 #endif
+
+	while ((addr = qmgr_get_entry(queue)))
+		printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
+		       queue, addr);
+
 	__raw_writel(0, &qmgr_regs->sram[queue]);
 
 	used_sram_bitmap[0] &= ~mask[0];
@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue)
 	spin_unlock_irq(&qmgr_lock);
 
 	module_put(THIS_MODULE);
-
-	while ((addr = qmgr_get_entry(queue)))
-		printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
-		       queue, addr);
 }
 
 static int qmgr_init(void)

-- 
Krzysztof Halasa

  reply	other threads:[~2011-01-15 23:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 16:48 IXP4xx current status Krzysztof Halasa
2011-01-15 17:06 ` Russell King - ARM Linux
2011-01-15 22:54   ` Krzysztof Halasa
2011-01-15 23:12     ` Krzysztof Halasa [this message]
2011-01-15 23:13     ` [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions Krzysztof Halasa

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=m3pqrxhid0.fsf_-_@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=linux-arm-kernel@lists.infradead.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).