[PATCH] ppc32: fix cpm_uart_int() missing interrupts
Guillaume Autran
gautran at mrv.com
Fri May 20 06:26:59 EST 2005
You are right, moving the event clearing statement is much easier and
cleaner. Let the interrupt be the loop.
Thanks Dan !
Dan Malek wrote:
>
> On May 19, 2005, at 3:34 PM, Guillaume Autran wrote:
>
>> Is it better like this ?
>
>
> Yes, but now I see one problem with it. :-)
>
> We have to clear all events even though we may not
> handle all of them. Your while loop filters only the events
> we process, but there could be others causing the interrupt
> which will never get cleared. In this case we end up with
> an infinite interrupt loop where we don't process anything,
> but we don't make the interrupt go away, either. It may be
> easier to forget the loop, just read/clear the event register
> up front, then process based on the events based upon
> what we found. It's what we tend to do in the other drivers.
>
> The functions called to do the rx/tx processing have loops
> in them to process all of the data they find, so it isn't likely
> you have left anything behind. If you want to try to save
> the interrupt overhead, change it to do/while, check again
> at the end before the exit.
>
> Thanks.
>
>
> -- Dan
>
--
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: gautran at mrv.com
=======================================
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpm_uart_core.patch
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050519/cbf30c55/attachment.txt
More information about the Linuxppc-embedded
mailing list