From owner-freebsd-current@FreeBSD.ORG Wed Apr 10 06:28:44 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 8C0D8BDE; Wed, 10 Apr 2013 06:28:44 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 513556EC; Wed, 10 Apr 2013 06:28:43 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:900d:c887:884e:713b]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 21B454AC57; Wed, 10 Apr 2013 10:28:42 +0400 (MSK) Date: Wed, 10 Apr 2013 10:28:38 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1659145198.20130410102838@serebryakov.spb.ru> To: John Baldwin Subject: Re: Intel D2500CC motherboard and strange RS232/UART behavior In-Reply-To: <201304091658.22810.jhb@freebsd.org> References: <229402991.20130407172016@serebryakov.spb.ru> <201304091608.09257.jhb@freebsd.org> <105818341.20130410004451@serebryakov.spb.ru> <201304091658.22810.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Adrian Chadd , freebsd-current@freebsd.org, Poul-Henning Kamp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org 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 06:28:44 -0000 Hello, John. You wrote 10 =E0=EF=F0=E5=EB=FF 2013 =E3., 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? ISA interrupt sharing IS NOT so simple. sio contains a lot of obscure code to work. 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_ir= id, RF_ACTIVE | RF_SHAREABLE); It is here. --=20 // Black Lion AKA Lev Serebryakov