[PATCH] ppc32: fix cpm_uart_int() missing interrupts

Guillaume Autran gautran at mrv.com
Fri May 20 03:59:40 EST 2005


This is a patch to fix a problem that occurs at high baud rates in the 
cpm uart interrupt handling.

In cpm_uart_int(), the existing code reads the event register, processes 
the events, and then clears bits in the event register before returning. 
The problem here is that sometimes event processing generates new events 
quite quickly (i.e. at higher baud rates, the transmit interrupt handler 
puts another character into an SCC's transmit buffer and the SCC clears 
the READY bit almost immediately). In this case, the second interrupt 
can be missed because the scc_scce event register gets cleared after 
processing the first. The port can get hung.

The fix adds a while loop. It reads the event register saving its value 
in the local variable 'events' (as before) then clears the event 
register in the device immediately. It processes the events and tests 
the event register again handling new events that might get generated 
during handling.

Any comment ?

Guillaume.

-- 

=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: gautran at mrv.com
======================================= 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050519/76f1107a/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpm_uart_core.patch
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050519/76f1107a/attachment.txt 


More information about the Linuxppc-embedded mailing list