Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 1999 09:34:20 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Erwan Arzur <erwan@netvalue.fr>
Cc:        freebsd-current@freebsd.org
Subject:   Re: xl0: couldn't map interrupt ?
Message-ID:  <14144.6406.402515.478941@grasshopper.cs.duke.edu>
In-Reply-To: <373FE057.FAE8FC5B@netvalue.fr>
References:  <373FE057.FAE8FC5B@netvalue.fr>

next in thread | previous in thread | raw e-mail | index | archive | help

Erwan Arzur writes:
 > Recently cvsupped (as of today, and since around may 10) -current
 > kernels fail to attach my 3C905-TX nic.
<...>
 > ata-pci1: <Unknown PCI IDE controller> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14144.6406.402515.478941>