[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclinux-dev
Subject:    RE: [uClinux-dev] serial crash when console is moved. FIXED!
From:       "Jordan Fuerst" <jfuerst () freewave ! com>
Date:       2005-11-18 15:43:19
Message-ID: 294F2324D4D16240B5E2826F8EF43B182E0A27 () MAIL ! freewave ! local
[Download RAW message or body]

This patch fixed the problem. I have let things run overnight and
compared to the 10 minute failure time previously I would say it is
fixed.


Regards,

Jordan

-----Original Message-----
From: uclinux-dev-bounces@uclinux.org
[mailto:uclinux-dev-bounces@uclinux.org] On Behalf Of Greg Ungerer
Sent: Tuesday, November 15, 2005 7:33 PM
To: uClinux development list
Subject: Re: [uClinux-dev] serial crash when console is moved.

Hi Jordan,

Jordan Fuerst wrote:
> I recently moved my console over to ttyS1. I am using ttyS0 to run a
> serial program that is constantly exchanging serial data with a TAP
> driver.
> 
> I have four symptoms... on first boot the program that interacts with
> ttyS0 starts up from inittab. 
> 
> 1) If I let everything run and don't interact with the console on port
1
> than after about 10 minutes I get the following errors:
> 
> Bad magic number for tty struct (4:64) in tty_poll
> Bad magic number for tty struct (4:64) in tty_write
> 
> 2) If instead of letting everything run; I instead interact with the
> console at the same time as the program running on port 0 then I get a
> different error:
> 
> Arch/m68knommu/platform/5307/inits.c(51): default handler vec=79
[0x4f]
> 
> 3) If I do not run the program on port 0 then I do not experience
either
> of these problems.
> 
> 4) If I access the console through telnet then I only experience error
> #1. 
> 
> What do I need to do to track down this error? I looked in the inits.c
> file and see the line that outputs this error, however I don't know
what
> triggers it. Any suggestions on tracking the problem are greatly
> appreciated. Where are the default handlers (I.E. vector 79) declared
in
> uClinux?

The default handlers are setup in 
linux-2.6.x/arch/m68knommu/platform/5307/ints.c
at least for ColdFire platforms anyway.


> I am running 2.6 kernel on the MCF5275

Can you try this patch to linux-2.6.x/drivers/serial/mcfserial.c:

--- mcfserial.c 28 Oct 2005 06:25:50 -0000      1.47
+++ mcfserial.c 16 Nov 2005 02:27:12 -0000
@@ -1525,7 +1525,7 @@

         icrp = (volatile unsigned char *) (MCF_MBAR + MCFICM_INTC0 +
                 MCFINTC_ICR0 + MCFINT_UART0 + info->line);
-       *icrp = 0x33; /* UART0 with level 6, priority 3 */
+       *icrp = 0x33 - info->line; /* UART0 with level 6 */

         imrp = (volatile unsigned long *) (MCF_MBAR + MCFICM_INTC0 +
                 MCFINTC_IMRL);


I recall that you are not supposed to set different interrupts
to the same level and priority. This may be causing the problems
here.

If that doesn't fix it then you most likely need to be looking
around this part of the mcfserial.c code.

Regards
Greg




------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
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
_______________________________________________
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic