Subject: Re: what blocks splserial?
To: Daniel Brewer <danielb@cat.co.za>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 08/18/2003 21:14:56
On Mon, Aug 18, 2003 at 04:47:03PM +0200, Daniel Brewer wrote:
> Hi
>
> We have a serial piggy-back add-on card to one of our PCI card and we're
> seeing some oddities with the interrupts.
>
> The serial add-on causes the PCI card to generate interrupts as necessary.
> In the attach function for the pci card, we use bus_space_subregion and
> config_found_sm to attach the 4 extra serial com devices. There is a
> transparent channel through the PCI card to the serial add-on, so the
> registers on the serial device are mapped directly into the register memory
> space on the PCI card. We've written a test program that writes and reads
> data to all 4 serial ports on the add-on card (mapped to tty02-tty05).
>
> Everything works great under normal operation. But, we've noticed that
> running the test program and a compile at the same time, can sometimes cause
> the loss of a few characters. Digging deeper, we've measured the time
> between when the card raises the interrupt line and when the driver accesses
> the registers on the serial card to handle the interrupt is sometimes really
> long when compiling and reading/writing to the com ports (up to about
> 7ms!!!). At 115200 baud, that's quite a few characters.
>
> The com devices are using the IPL_SERIAL level interrupts and access the
> serial-port registers. The PCI device's driver is responding to IPL_TTY
> level interrupts, and it is the device that will actually clear the
> interrupt pin on the PCI device's controller chip. So, what could block the
> IPL_SERIAL level interrupts for several milliseconds while a compile is
> occurring?
I don't understand... is your interrupt handler registered with
IPL_SERIAL or IPL_TTY ?
Also you don't say on which port you're working. IPLs don't have the same
priority on all ports.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 24 ans d'experience feront toujours la difference
--