Re: R: R: How to avoid serial port buffer overruns?

From: Robert Hancock
Date: Fri Aug 18 2006 - 19:14:09 EST


linux-os (Dick Johnson) wrote:
Apparently to handle these kinds of kludges, the kernel
interrupt code was modified so that the device-driver
code needs to returna value to the kernel core code.
If the value is not IRQ_HANDLED, then the ISR will be
called again. If your ISR never returns IRQ_HANDLED,
then the kernel core code will shut you off when it
detects a loop of (last I checked) 10,000 spins.

This isn't to handle the edge-triggered case, that return value is to shut off the interrupt entirely in the case of a device that is asserting its interrupt but no driver claims to be handling it. Otherwise the interrupt storm could cause the machine to simply lock up. It doesn't just disable that ISR either, the interrupt line is disabled in the interrupt controller which may disable other devices using that line.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@xxxxxxxxxxxxx
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/