Date: Thu, 4 Jan 2001 15:59:57 +0000 (GMT) From: "Matthew C. Forman" <mcf@forman.homeip.net> To: freebsd-hackers@freebsd.org Subject: Allocating an IRQ on PCI Message-ID: <Pine.BSF.4.21.0101041542560.13751-100000@theo.forman.homeip.net>
next in thread | raw e-mail | index | archive | help
Hi all, I want to allocate an IRQ for a PCI device driver. Normally this is easy enough, since the BIOS would reserve it for me, then I would just have to bus_alloc_resource and not even care which IRQ line it's using. Thing is, here the BIOS hasn't allocated an IRQ, so I'll need to bus_set_resource in my probe to get one. To complicate matters, the device's interrupt generator is pretty flexible, and can generate an interrupt on (almost) any IRQ line. I have to tell it which IRQ to use when I know which one has been allocated. I can see two possibilities to get this working: 1. Hardwire it, by using bus_set_resource with a specific IRQ. This isn't nice, as it'll fail if someone else's setup is already using the one I pick (or some other device attach will fail later on). 2. Find out what IRQs are free and set and allocate one of those. This is nicer than 1), but then if some poor device attach later on in boot was expecting to use that IRQ, it'll break. Does anyone know of a sensible & portable way around this? Perhaps IRQ sharing could save me in some way... Thanks in advance, Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101041542560.13751-100000>