Commit 3c3a3b4c authored by Krzysztof Hałasa's avatar Krzysztof Hałasa

IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.

Queues should be empty when released, if not, there is a safety valve.
Make sure the queue is usable after it triggers.
Signed-off-by: default avatarKrzysztof Hałasa <khc@pm.waw.pl>
parent ebf53826
...@@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue) ...@@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue)
qmgr_queue_descs[queue], queue); qmgr_queue_descs[queue], queue);
qmgr_queue_descs[queue][0] = '\x0'; qmgr_queue_descs[queue][0] = '\x0';
#endif #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]); __raw_writel(0, &qmgr_regs->sram[queue]);
used_sram_bitmap[0] &= ~mask[0]; used_sram_bitmap[0] &= ~mask[0];
...@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue) ...@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue)
spin_unlock_irq(&qmgr_lock); spin_unlock_irq(&qmgr_lock);
module_put(THIS_MODULE); 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) static int qmgr_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment