From owner-freebsd-current Mon May 17 6:34:39 1999 Delivered-To: freebsd-current@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 0140814F8E for ; Mon, 17 May 1999 06:34:36 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.1/8.9.1) with ESMTP id JAA28405; Mon, 17 May 1999 09:34:34 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.9.3/8.9.1) id JAA38688; Mon, 17 May 1999 09:34:20 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 17 May 1999 09:34:20 -0400 (EDT) To: Erwan Arzur Cc: freebsd-current@freebsd.org Subject: Re: xl0: couldn't map interrupt ? In-Reply-To: <373FE057.FAE8FC5B@netvalue.fr> References: <373FE057.FAE8FC5B@netvalue.fr> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14144.6406.402515.478941@grasshopper.cs.duke.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Erwan Arzur writes: > Recently cvsupped (as of today, and since around may 10) -current > kernels fail to attach my 3C905-TX nic. <...> > ata-pci1: irq 10 at device 5.0 on pci1 > ata-pci1: Busmastering DMA supported <..> > xl0: <3Com 3c905-TX Fast Etherlink XL> irq 10 at device 8.0 on pci1 > pci_map_int: can't allocate interrupt > xl0: couldn't map interrupt The problem has nothing to do with the xl driver, actually the ata driver is to blame. The ata driver doesn't want to place nice & share IRQs, and by the time the xl driver gets a chance to alloc irq10 the ata driver has reserved it totally. The following should fix it (beware, its against a slightly less-than-current version of ata-all.c; should it fail to apply, just replace the RF_SHAREABLE arguments to bus_alloc_resource with RF_SHAREABLE | RF_ACTIVE in ata_pciattach(). S=F8ren's told me that he'll be fixing this in his next commit. Drew -----------------------------------------------------------------------= ------- Andrew Gallatin, Sr Systems Programmer=09http://www.cs.duke.edu/~gallat= in Duke University=09=09=09=09Email: gallatin@cs.duke.edu Department of Computer Science=09=09Phone: (919) 660-6590 Index: /sys/dev/ata/ata-all.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v retrieving revision 1.11 diff -u -b -B -r1.11 ata-all.c --- ata-all.c 1999/04/22 08:07:44 1.11 +++ ata-all.c 1999/05/16 00:40:13 @@ -312,7 +312,8 @@ int rid =3D 0; void *ih; =20 - irq =3D bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,= RF_ACTIVE); + irq =3D bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,= + RF_SHAREABLE | RF_ACTIVE); if (sysctrl) bus_setup_intr(dev, irq, promise_intr, scp, &ih); else @@ -337,7 +338,8 @@ int rid =3D 0; void *ih; =20 - irq =3D bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,= RF_ACTIVE); + irq =3D bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,= + RF_SHAREABLE | RF_ACTIVE); if (!sysctrl) bus_setup_intr(dev, irq, ataintr, scp, &ih); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message