Subject: bottom handler

From: Mark van Doesburg <[email-masked]>
Date: Sun, 11 Oct 1998 20:04:06 +0200

Apperently the serial interrupt stays asserted all the time. The following
code is from the serial driver:

static void rs285_tx_int(int irq, void *dev_id, struct pt_regs *regs)
{
	static int i;
	if(++i>500000) {
		leds_event(red_toggle);
		i=0;
	}
	while(!(*CSR_UARTFLG&0x20)) {
		if(x_char) {
			*CSR_UARTDR=x_char;
			x_char=0;
			continue;
		}
		if(putp==getp) {
			*CSR_IRQ_DISABLE=0x8;
			break;
		}
		*CSR_UARTDR=*getp;
		if(++getp>=wbuf+sizeof(wbuf))
			getp=wbuf;
	}
	*CSR_IRQ_DISABLE=0x8;
}

As you can see the interrupt for the tx interrupt is turned off in this
interrupt. The interrupt handler however continues to be called as i can
see the red led blinking.

Does anyone know if the CSR_IRQ_* registers of the 21285 are modified
somewhere in the interrupt code, so the change i make gets undone ?

(is this an incorrect way to disable the irq ?)

Mark.
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Sun, 11 Oct 1998 21:51:32 +0100

>(is this an incorrect way to disable the irq ?)

Yes, you need to use disable_irq() rather than poking at the registers 
yourself.  On the way into the interrupt routine the kernel masks out the 
interrupting device using the CSRs so that other interrupts can still get in; 
when your handler returns it re-enables them, so your change is lost.

p.