From owner-freebsd-current Tue Jun 1 14:47:30 1999 Delivered-To: freebsd-current@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 0F4A7150AD for ; Tue, 1 Jun 1999 14:47:12 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id WAA25080; Tue, 1 Jun 1999 22:46:40 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 1 Jun 1999 22:46:40 +0100 (BST) From: Doug Rabson To: Bruce Evans Cc: current@freebsd.org, newton@atdot.dotat.org Subject: Re: IRQ sharing with newbus In-Reply-To: <199906011936.FAA11098@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 2 Jun 1999, Bruce Evans wrote: > >Under newbus, of course, things look slightly different, so I tried > >this: > > > >device sio2 at isa? port 0x280 flags 0x0201 irq 5 > >device sio3 at isa? port 0x288 flags 0x0201 > >device sio4 at isa? port 0x290 flags 0x0201 > > [ ... ] > >device sio9 at isa? port 0x2b8 flags 0x0201 > > > >Natch: "panic: NULL irq resource!" from nexus_setup_intr() in > >sys/i386/i386/nexus.c while probing sio3 (and I know that sio2 > >is probing successfully - see below). > > This was apparently broken when sio was converted to new-bus. The driver > (actually mainly isa.c) used to simply skip irq allocation for devices > with no irq (COM_MULTIPORT non-master ones and polled ones). This is almost certainly just simple breakage. I'll take a look at the code and see if I can spot something. The slave devices shouldn't be trying to allocate interrupts at all. > > >Assuming (from the panic message) that it wants an IRQ, I've tried this: > > > >device sio2 at isa? port 0x280 flags 0x0201 irq 5 conflicts > >device sio3 at isa? port 0x288 flags 0x0201 irq 5 conflicts > > [ ... ] > >device sio9 at isa? port 0x2b8 flags 0x0201 irq 5 conflicts > > > >Same bat-panic, same bat-probe. > > I don't understand why this doesn't get further, since the RF_SHAREABLE > flag is (incorrectly) specified. sio fast interrupts are particularly > unshareable. sio now forces fast interrupts, although this is wrong for > sio pccard devices. > > >So, guys -- What is the officially blessed way of sharing IRQs under > >newbus? > > It should be almost the same as it used to be: specify RF_SHAREABLE for > allocating shared irq resources; this corresponds to not specifying > INTR_EXCL in the pre-new-bus interface (intr_create()?). I don't think the sio multiport stuff needs to use RF_SHAREABLE - the master device knows how to field interrupts for the slaves (at least thats how I understood it). -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message