From owner-freebsd-current@FreeBSD.ORG Wed Apr 10 14:43:14 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C8B3AFD9; Wed, 10 Apr 2013 14:43:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id A6B2B25A; Wed, 10 Apr 2013 14:43:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0DD74B915; Wed, 10 Apr 2013 10:43:14 -0400 (EDT) From: John Baldwin To: lev@freebsd.org Subject: Re: Intel D2500CC motherboard and strange RS232/UART behavior Date: Wed, 10 Apr 2013 10:20:34 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <229402991.20130407172016@serebryakov.spb.ru> <201304091658.22810.jhb@freebsd.org> <1659145198.20130410102838@serebryakov.spb.ru> In-Reply-To: <1659145198.20130410102838@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Message-Id: <201304101020.34214.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Apr 2013 10:43:14 -0400 (EDT) Cc: Adrian Chadd , freebsd-current@freebsd.org, Poul-Henning Kamp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 14:43:14 -0000 On Wednesday, April 10, 2013 2:28:38 am Lev Serebryakov wrote: > Hello, John. > You wrote 10 =E0=EF=F0=E5=EB=FF 2013 =E3., 0:58:22: >=20 > >> 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 =3D bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_= irid, > RF_ACTIVE | RF_SHAREABLE); >=20 > 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?) =2D-=20 John Baldwin