Date: Tue, 9 Mar 2004 13:25:34 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Yevgen Muntyan <muntyan@tamu.edu> Cc: freebsd-current@FreeBSD.org Subject: Re: Can't assign irq for integrated wireless NIC Message-ID: <200403091325.34299.jhb@FreeBSD.org> In-Reply-To: <200403081743.57194.muntyan@tamu.edu> References: <200402291903.20499.muntyan@tamu.edu> <200403081546.23492.jhb@FreeBSD.org> <200403081743.57194.muntyan@tamu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403091325.34299.jhb>