diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2010-05-03 17:22:06 -0400 |
---|---|---|
committer | Krzysztof Hałasa <khc@pm.waw.pl> | 2011-02-06 10:49:48 -0500 |
commit | 3c3a3b4c12bdda8dd098fcdd4499a298548d6f31 (patch) | |
tree | e283e6385de58720ce5a6f4b003ef33623b61139 /arch/arm/mach-ixp4xx | |
parent | ebf53826e105f488f4f628703a108e98940d1dc5 (diff) |
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: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index bfdbe4b5a3cc..852f7c9f87d0 100644 --- 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) | |||
265 | qmgr_queue_descs[queue], queue); | 265 | qmgr_queue_descs[queue], queue); |
266 | qmgr_queue_descs[queue][0] = '\x0'; | 266 | qmgr_queue_descs[queue][0] = '\x0'; |
267 | #endif | 267 | #endif |
268 | |||
269 | while ((addr = qmgr_get_entry(queue))) | ||
270 | printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", | ||
271 | queue, addr); | ||
272 | |||
268 | __raw_writel(0, &qmgr_regs->sram[queue]); | 273 | __raw_writel(0, &qmgr_regs->sram[queue]); |
269 | 274 | ||
270 | used_sram_bitmap[0] &= ~mask[0]; | 275 | used_sram_bitmap[0] &= ~mask[0]; |
@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue) | |||
275 | spin_unlock_irq(&qmgr_lock); | 280 | spin_unlock_irq(&qmgr_lock); |
276 | 281 | ||
277 | module_put(THIS_MODULE); | 282 | module_put(THIS_MODULE); |
278 | |||
279 | while ((addr = qmgr_get_entry(queue))) | ||
280 | printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", | ||
281 | queue, addr); | ||
282 | } | 283 | } |
283 | 284 | ||
284 | static int qmgr_init(void) | 285 | static int qmgr_init(void) |