Re: Intel D2500CC motherboard and strange RS232/UART behavior

From: John Baldwin <jhb_at_freebsd.org>
Date: Wed, 10 Apr 2013 10:20:34 -0400
On Wednesday, April 10, 2013 2:28:38 am Lev Serebryakov wrote:
> Hello, John.
> You wrote 10 апреля 2013 г., 0:58:22:
> 
> >>   Problem is, that every uart device now is independent from each
> >>   other in good "OOP" style, and it looks like interrupt sharing we
> >>   need one interrupt handler per irq (not per device), which will now
> >>   about several UARTs. Something like "multiport" device, bot not
> >>   exactly.
> JB> No, the interrupt code itself will handle shared interrupts (it will
> JB> call all handlers).  I think in practice that uart is setting
>   And what will happen, if there is two UARTs asserting interrupt in
> same time? First one returns "FILTER_HANDLED", will second handler be
> called?

They are all called in turn.

>   ISA interrupt sharing IS NOT so simple. sio contains a lot of
>  obscure code to work.

INTR_FAST handlers in 4.x didn't use to allow sharing.  That changed
in 6.x or so.

> JB> INTR_EXCL or some such and/or uart doesn't set RF_SHAREABLE when
> JB> allocating the IRQ.  It is probably the latter.  You could try just
> JB> adding RF_SHAREABLE to the bus_alloc_resource_any() for the IRQ to
> JB> uart and see if that fixes it.
>         sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_irid,
>             RF_ACTIVE | RF_SHAREABLE);
> 
> It is here.

Ok, then you need to figure out what is actually failing to install an
interrupt handler (e.g. does bus_alloc_resource or bus_setup_intr fail?)

-- 
John Baldwin
Received on Wed Apr 10 2013 - 12:43:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:36 UTC