[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] [patch] valid data left in rx fifo: no more interrupts
At Mon, 12 Jul 2004 09:29:55 +1000,
John Williams wrote:
>
> Hi Yashi,
>
> Yasushi SHOJI wrote:
>
> > In the course of reading interrupt handler in microblaze arch, I found
> > a bug in xmbserial.c
>
> [snip]
>
> > what we sould do is to drop any data in the RX FIFO when flip buffer
> > is full, instead of breaking out from while loop.
> >
> > Attached patch is a minimal patch to fix the problem; No error
> > handling yet.
>
> I finally had a chance to test this patch, but still get the error of
> the serial driver hanging if you dump a large amount of text into it.
>
> Logically, I think your patch is correct, but I'm wondering if there's
> not something else in there that is causing a problem.
>
> What do you think?
uga, I had been using the following patch for test. this one is taken
from ppc after you told me. this one is needed with prev. patch. it
fixes the symptom but seems ugly.
IMHO, we should have some kind of fix in cvs, so that it works for
others. However, we need to do something about it, wether fix
hardware or software in the right way.
best,
--
yashi
--- linux-suzaku/arch/microblaze/kernel/microblaze_intc.c 2004-07-15 15:19:47.000000000 +0900
+++ linux-suzaku-current/arch/microblaze/kernel/microblaze_intc.c 2004-06-07 00:27:34.000000000 +0900
@@ -19,11 +19,6 @@
#include <asm/microblaze_intc.h>
-
-/* For now, don't ack interrupt until end of interrupt processing */
-/* Same uncertainty exists in PPC xintc driver */
-#define ACKNOWLEDGE_AFTER
-
static void irq_nop (unsigned irq) { }
/* Master enable to start the intc */
@@ -274,18 +269,24 @@
void microblaze_intc_disable_and_ack_irq(unsigned irq)
{
microblaze_intc_disable_irq(irq);
- #if !defined(ACKNOWLEDGE_AFTER)
- microblaze_intc_ack_irq(irq);
- #endif
+ /* if irq is not the timer, ack as fast as we can. this is a
+ * hack to work around serial bug, while I'm working on a
+ * clean fix */
+ if (irq != 0) {
+ microblaze_intc_ack_irq(irq);
+ }
}
void microblaze_intc_end(unsigned irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
microblaze_intc_enable_irq(irq);
- #if defined(ACKNOWLEDGE_AFTER)
- microblaze_intc_ack_irq(irq);
- #endif
+ if (irq == 0) {
+ /* if irq is the timer interrupt, ack now.
+ * for others, we should have acked
+ * already. */
+ microblaze_intc_ack_irq(irq);
+ }
}
}
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/