From owner-freebsd-drivers@FreeBSD.ORG Sun Oct 14 21:25:05 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5312E16A419 for ; Sun, 14 Oct 2007 21:25:05 +0000 (UTC) (envelope-from marcin@studio4plus.com) Received: from pe78.opole.sdi.tpnet.pl (pe78.opole.sdi.tpnet.pl [217.96.240.78]) by mx1.freebsd.org (Postfix) with ESMTP id C913313C448 for ; Sun, 14 Oct 2007 21:25:04 +0000 (UTC) (envelope-from marcin@studio4plus.com) Received: from [89.79.52.87] (helo=[192.168.0.102]) by pe78.opole.sdi.tpnet.pl with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1IhAgI-0006jQ-Hn for freebsd-drivers@freebsd.org; Sun, 14 Oct 2007 23:07:38 +0200 Message-ID: <471284EF.2010009@studio4plus.com> Date: Sun, 14 Oct 2007 23:06:55 +0200 From: Marcin Simonides User-Agent: Thunderbird 2.0.0.6 (X11/20070828) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: NDIS: intel 4965 panic X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2007 21:25:05 -0000 I've tried using an XP ndis wrapper for my intel 4965 wifi adapter. After loading the driver the device is recognized and then kernel panics during driver attachement. I'm using RELENG6 that has been updated a couple of months ago. I'll probably update it soon and then try again. This is the most important (AFAIK) information (I had to put this information down on a piece of paper, so it's not complete, I'll try to figure out a way to dump ddb output to a file): First an error from NDIS is printed: NDIS API version: 5.1 NDIS ERROR: 4000167c (internal error) then the kernel paniced: Fatal trap 12: page fault while in kernel mode fault code = supervisor read, page not present stopped at device_get_softc+0x6 movl 0x48(%eax),%eax the backtrace shows: device_get_softc NdisMAllocateSharedMemory _end [...] NETw4x32_sys_drv_data_start NETw4x32_sys is the module name. I've seen in the pr database that there are many similar problems (i.e. ndis wrapper not working with certain drivers). Should I send a PR related to this particular wifi card I have? Is there any more information that I could provide to help the developers with enabling support for more wifi cards? (I'll try to take a peek into the driver code but as I've never done any kernel programming this may yield no useful results). Thanks for your time :) -- Marcin Simonides From owner-freebsd-drivers@FreeBSD.ORG Tue Oct 16 22:41:16 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60EC516A419 for ; Tue, 16 Oct 2007 22:41:16 +0000 (UTC) (envelope-from almarrie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id F1CB813C44B for ; Tue, 16 Oct 2007 22:41:15 +0000 (UTC) (envelope-from almarrie@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so223969uge for ; Tue, 16 Oct 2007 15:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=slZlXKlpyby5wj7lnH79hON/6se+Q4lLTh+SiAt3TgI=; b=ADlee34goV875fjUcnvXuo24eL1axbXlS4FT6ICrV8pI+KNy1Vce75kX1p9N9kXpCZ/7RN0HPt1pYGWIWdkAxfsbSsAVKuHnhXoZCZZ6ishtM6AGgeSjma0WU6QZ0UYsYTbtgi4CM7Hg/7pp/T7YyQZ4XIyubE8tr48iC+Hb7K8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eJON+IJBXlBvqx2oyuhDaPLR5LCGbEko2gHYYyopT4zLNVLo1um8Wr/WC1dWjjQK4E49Mxo1SJ84wNucG77JhpW6AWT1IqCP7AuYa7n2Adi3BaftaX/IepT78/6ZF6eazohXIDeFdvXFS3v1xH+53mQETjU4bh4dbYI5Ppz/8O8= Received: by 10.86.9.8 with SMTP id 8mr6223170fgi.1192572786478; Tue, 16 Oct 2007 15:13:06 -0700 (PDT) Received: by 10.86.2.1 with HTTP; Tue, 16 Oct 2007 15:13:06 -0700 (PDT) Message-ID: <499c70c0710161513r2d43e55fj3f9caf4155a5100d@mail.gmail.com> Date: Wed, 17 Oct 2007 01:13:06 +0300 From: "Abdullah Ibn Hamad Al-Marri" To: "Marcin Simonides" In-Reply-To: <471284EF.2010009@studio4plus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <471284EF.2010009@studio4plus.com> Cc: freebsd-drivers@freebsd.org Subject: Re: NDIS: intel 4965 panic X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 22:41:16 -0000 On 10/15/07, Marcin Simonides wrote: > I've tried using an XP ndis wrapper for my intel 4965 wifi adapter. > After loading the driver the device is recognized and then kernel panics > during driver attachement. > > I'm using RELENG6 that has been updated a couple of months ago. I'll > probably update it soon and then try again. > > This is the most important (AFAIK) information (I had to put this > information down on a piece of paper, so it's not complete, I'll try to > figure out a way to dump ddb output to a file): > > First an error from NDIS is printed: > NDIS API version: 5.1 > NDIS ERROR: 4000167c (internal error) > > then the kernel paniced: > > Fatal trap 12: page fault while in kernel mode > fault code = supervisor read, page not present > > stopped at device_get_softc+0x6 movl 0x48(%eax),%eax > > the backtrace shows: > device_get_softc > NdisMAllocateSharedMemory > _end > [...] > NETw4x32_sys_drv_data_start > > NETw4x32_sys is the module name. > > > I've seen in the pr database that there are many similar problems (i.e. > ndis wrapper not working with certain drivers). Should I send a PR > related to this particular wifi card I have? > > Is there any more information that I could provide to help the > developers with enabling support for more wifi cards? > (I'll try to take a peek into the driver code but as I've never done any > kernel programming this may yield no useful results). > > Thanks for your time :) > -- > Marcin Simonides Having it to work would be interesting ;) -- Regards, -Abdullah Ibn Hamad Al-Marri Arab Portal http://www.WeArab.Net/ From owner-freebsd-drivers@FreeBSD.ORG Thu Oct 18 16:32:28 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8918116A418 for ; Thu, 18 Oct 2007 16:32:28 +0000 (UTC) (envelope-from marcin@studio4plus.com) Received: from pe78.opole.sdi.tpnet.pl (pe78.opole.sdi.tpnet.pl [217.96.240.78]) by mx1.freebsd.org (Postfix) with ESMTP id 062AE13C455 for ; Thu, 18 Oct 2007 16:32:27 +0000 (UTC) (envelope-from marcin@studio4plus.com) Received: from [89.79.52.87] (helo=[192.168.0.102]) by pe78.opole.sdi.tpnet.pl with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1IiYIJ-000KIA-1q for freebsd-drivers@freebsd.org; Thu, 18 Oct 2007 18:32:26 +0200 Message-ID: <47178A8B.1050205@studio4plus.com> Date: Thu, 18 Oct 2007 18:32:11 +0200 From: Marcin Simonides User-Agent: Thunderbird 2.0.0.6 (X11/20070828) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org References: <471284EF.2010009@studio4plus.com> In-Reply-To: <471284EF.2010009@studio4plus.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: NDIS: intel 4965 panic X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 16:32:28 -0000 Marcin Simonides wrote: > I've tried using an XP ndis wrapper for my intel 4965 wifi adapter. > After loading the driver the device is recognized and then kernel panics > during driver attachement. [...] Previously I didn't mention that there are some functions missing from the FreeBSD's NDIS api. These are: NdisIMCopySendPerPacketInfo strncat KeQuerySystemTime KeBugCheckEx KeTickCount With the help of NDIS reference and Linux ndiswrapper I have been able to implement all but KeBugCheckEx (they are all rather simple but I can't be 100% sure they're correct and exported appropriately). Now I'm able to load the driver and don't get any of the "ntoskrnl dummy called..." messages which probably means that there are no missing functions the driver tries to call. Unfortunately I'm still left with the: ndis0: NDIS ERROR: 40001b7c (unknown error) error message and the device doesn't work. ifconfig ndis0 shows: ndis0: flags=8806 mtu 1500 ether 00:13:e8:64:aa:f7 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel 1 authmode OPEN privacy OFF txpowmax 100 bmiss 7 protmode CTS The LED indicating whether WLAN is on doesn't light up. Calling ifconfig ndis0 up results with the following kernel messages: ndis0: NDIS ERROR: 40001b7c (unknown error) ndis0: NDIS NUMERRORS: 2 ndis0: argptr: 0x56524457 ndis0: argptr: 0xdd And that's all I have been able to achieve so far :) I'll try to read some more of NDIS specification, locate the source of the aforementioned error message and generally try to blindly find something. Maybe someone has some suggestions? Maybe I should also try to post my questions to some other list? The diff of my changes: http://marcin.studio4plus.com/ndis/ndis.diff All changes are confined to the /usr/src/sys/compat/ndis directory. The functions I have added are implemented in a quick and dirty way :) -- Marcin Simonides