Can't assign irq for integrated wireless NIC
John Baldwin
jhb at FreeBSD.org
Tue Mar 9 10:25:38 PST 2004
On Monday 08 March 2004 06:43 pm, Yevgen Muntyan wrote:
> On Monday 08 March 2004 14:46, John Baldwin wrote:
> > Please try this patch and let me know if it works:
>
> Hello,
> It really works!!! Though there are some problems:
>
> 1) if you do not load ndis and if_ndis modules on startup, then it's
> impossible to use them after that: I do
>
> kldload ndis
> kldload if_ndis
>
> and it says the following (see attached "dmesg.bootwithoutmodules"):
>
> ndis0: <HP WLAN 54g W450 Network Adapter> mem 0xd0002000-0xd0003fff at
> device 9. 0 on pci0
> pcib0: matched entry for 0.9.INTA (source \\_SB_.PCI0.ISA_.LNK3)
> pcib0: slot 9 INTA is routed to irq 10
> ndis0: NDIS API version: 5.0
> ndis0: NDIS ERROR: c000138d (unknown error)
> ndis0: NDIS NUMERRORS: 1
> ndis0: argptr: 0xa
> ndis0: init handler failed
> device_probe_and_attach: ndis0 attach returned 6
>
> 2) If you load ndis and if_ndis on startup (I did it from boot loader),
> then device ndis0 is not present (at least in ifconfig output) after system
> starts, but after kldunload-kldload it appears and it works!! See attached
> "dmesg.bootwithmodules".
Ok, Bill Paul found a bug in my patch. Try this one instead (just adds one
more line):
Index: if_ndis_pci.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/if_ndis/if_ndis_pci.c,v
retrieving revision 1.1
diff -u -r1.1 if_ndis_pci.c
--- if_ndis_pci.c 7 Mar 2004 02:49:06 -0000 1.1
+++ if_ndis_pci.c 9 Mar 2004 18:24:00 -0000
@@ -263,6 +263,21 @@
}
/*
+ * Allocate an IRQ if we don't already have one.
+ */
+ if (sc->ndis_irq == NULL) {
+ rid = 0;
+ sc->ndis_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
+ RF_SHAREABLE | RF_ACTIVE);
+ if (sc->ndis_irq == NULL) {
+ device_printf(dev, "couldn't route interrupt\n");
+ error = ENXIO;
+ goto fail;
+ }
+ sc->ndis_rescnt++;
+ }
+
+ /*
* Allocate the parent bus DMA tag appropriate for PCI.
*/
#define NDIS_NSEG_NEW 32
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-current
mailing list