From owner-cvs-all@FreeBSD.ORG Wed Oct 26 06:52:58 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE74D16A41F; Wed, 26 Oct 2005 06:52:58 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D30543D46; Wed, 26 Oct 2005 06:52:58 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9Q6qwBu090002; Wed, 26 Oct 2005 06:52:58 GMT (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9Q6qwQb090001; Wed, 26 Oct 2005 06:52:58 GMT (envelope-from wpaul) Message-Id: <200510260652.j9Q6qwQb090001@repoman.freebsd.org> From: Bill Paul Date: Wed, 26 Oct 2005 06:52:58 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2005 06:52:58 -0000 wpaul 2005-10-26 06:52:58 UTC FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c Log: Get rid of the timer tracking and reaping code in NdisMInitializeTimer() and ndis_halt_nic(). It's been disabled for some time anyway, and it turns out there's a possible deadlock in NdisMInitializeTimer() when acquiring the miniport block lock to modify the timer list: it's possible for a driver to call NdisMInitializeTimer() when the miniport block lock has already been acquired by an earlier piece of code. You can't acquire the same spinlock twice, so this can deadlock. Also, implement MmMapIoSpace() and MmUnmapIoSpace(), and make NdisMMapIoSpace() and NdisMUnmapIoSpace() use them. There are some drivers that want MmMapIoSpace() and MmUnmapIoSpace() so that they can map arbitrary register spaces not directly associated with their device resources. For example, there's an Atheros driver for a miniPci card (0x168C:0x1014) on the IBM Thinkpad x40 that wants to map some I/O spaces at 0xF00000 and 0xE00000 which are held by the acpi0 device. I don't know what it wants these ranges for, but if it can't map and access them, the MiniportInitialize() method fails. Revision Changes Path 1.89 +0 -23 src/sys/compat/ndis/kern_ndis.c 1.41 +2 -0 src/sys/compat/ndis/ntoskrnl_var.h 1.98 +3 -24 src/sys/compat/ndis/subr_ndis.c 1.78 +113 -0 src/sys/compat/ndis/subr_ntoskrnl.c