Skip to content

Commit

Permalink
IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.
Browse files Browse the repository at this point in the history
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: Krzysztof Hałasa <khc@pm.waw.pl>
  • Loading branch information
Krzysztof Hałasa committed Feb 6, 2011
1 parent ebf5382 commit 3c3a3b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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)
Expand Down

0 comments on commit 3c3a3b4

Please sign in to comment.