Re: [PATCH] tty: serial: imx.c: Reset UART before activating interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2 Jul 2015 12:42:51 -0300
Fabio Estevam <festevam@xxxxxxxxx> wrote:

> Hi David,
> 
> On Thu, Jul 2, 2015 at 11:29 AM, David Jander <david@xxxxxxxxxxx> wrote:
> > If the UART has been in use before this driver was loaded, IRQs might be
> > active and get fired as soon as we set the handler, which will crash
> > in the spin_lock_irqsave(&sport->port.lock, flags) because port.lock is
> > not initialized until the port is added at the end of probe.
> 
> Would the following patch fix the issue in your case?
> http://www.spinics.net/lists/linux-serial/msg17873.html

This patch indeed addresses the same problem as I had: Starting a kernel with
kexec.
Unfortunately my kernel does not start if I use this patch instead of mine.
Please note, that in my situation I invoke 'kexec -e' at a moment where two
uarts are still open (active) and data coming in on one of them, so I think
disabling interrupts is not enough. I also need to disable the UART and reset
its internal state-machine.
I guess it is much more fail-safe to make sure the UART is properly reset,
because the driver seems to assume this.

Best regards,

-- 
David Jander
Protonic Holland.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux