From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Damm Date: Mon, 02 May 2011 20:48:31 +0000 Subject: Re: sci spurious irq on sh7203 Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org Hi Federico, On Tue, May 3, 2011 at 3:11 AM, Federico Fuga wrote: > Hi All, > > I am working on a sh7203 based board, running the linux-sh kernel 2.6.37 [3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5] > I am experiencing a bug when using the sci0 as a console. > The serial port is working as expected, except when more than a certain number of characters are sent to the console; in this case, the kernels traps many spurious interrupts that triggers the __report_bad_irq() function and disables the IRQ vector 192. > I append a snapshot of the console output. > As you can see, I modified some kernel sources to output the status of some register - also not related to SCI. > I modified the sh_sci.c source to trigger an output of the irq registers when no irq routine is serviced - basically a flag that change state when sci_tx_interrupt or similar function are called from inside sci_mpxed_interrupt. > So I noted that the error is triggered when > > ssr_status000060 > scr_status000078 > err_enabled000040 > > The strange thing is that the irq is triggered for TEND flag and TX FIFO Empty even if TIE is disabled. > I was investigating both tx and rx interrupt routines, but I see nothing strange happening. But it seems something related to Receiving too many characters (a stream of 15 bytes do not triggers the problem; 16+ bytes almost always triggers the problem), since Sending seems to work fine. > I also tried to update sh-sci.c/h and some other header file (in arch/... and include/linux/...) to the latest version, and compile, but the problem persists. > Actually I cannot test any other serial port for this problem, but I hope I can make this test soon. > Thank you in advance. As usual with these things, please try to test on latest upstream if possible. Your issue may be solved already and if so is a matter of backporting. I don't recall any recent sh7203 serial fixes though. You may want to try to test without earlyprintk. From your description it sounds like your issue may be related to TX errors (overrun), perhaps the TX error interrupt is enabled even though TIE is disabled? Thanks, / magnus