On Thu, Jul 15, 2010 at 04:53:45PM +0600, Alexey Goncharov wrote:
> Guys, i've just figured out a strange behaviour of the serial driver. As  
> I mentioned above in my previous letter, irq count is going up fast  
> enough (serial tx period is ~100 ms now). I started to debug 8250.c and  
> append debug strings to different functions and to  
> serial8250_backup_timeout function in particular. The debug string from  
> this function appears in the console. So.. right after that i started to  
> adjust timeouts in the following strings related to the polling mode of  
> the driver:
>
> mod_timer(&up->timer, jiffies + poll_timeout(up->port.timeout) + HZ/5);
>
> mod_timer(&up->timer, jiffies + poll_timeout(up->port.timeout) + HZ/5);
>
> I've changed the division rate from 5 to 50: HZ/5 -> HZ/50.
>
> <Actung> Right after that data becomes to appear on the pin in (0;20 ms]  
> range. It seems that driver works in polling-mode despite the fact that  
> irq are being counted properly.
>
> My next question is to the person who is familiar with the working  
> principles of this driver: what settings should i do to make irqs work  
> properly in this case (16550A driver and lpc2468 processor)?

Well according to
http://www.linux.org/docs/ldp/howto/Serial-HOWTO-18.html, if you have
an IRQ problem, the driver will still work using slow polling.  If you
set the IRQ to 0, it will use fast polling instead (because 0 means irq
disabled), but use more CPU.

So I still suspect you have the IRQs wrong somehow.  Perhaps they are
inverted, or you have them swapped, or something else is wrong with
the setup.  The fact you are seeing them count up means at least something
is driving the IRQ lines (but doesn't tell you if they are the right
device of course).  Have you verified that traffic on one port is causing
the count for that port's IRQ to go up?  If you send one character at
a time, hopefully you should see the IRQ go up once per character.
At higher speeds you hopefully won't see quite that many IRQs.

So double check your platform setup code to make sure you have the IRQs
configured correctly (polarity, edge versus level trigger, etc).

-- 
Len Sorensen
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to