From owner-cvs-all@FreeBSD.ORG Sat Jan 3 05:20:40 2004 Return-Path: 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 705CC16A4CE; Sat, 3 Jan 2004 05:20:40 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21EA543D45; Sat, 3 Jan 2004 05:20:31 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i03DKU0B036941; Sat, 3 Jan 2004 05:20:30 -0800 (PST) (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i03DKUAr036932; Sat, 3 Jan 2004 05:20:30 -0800 (PST) (envelope-from wpaul) Message-Id: <200401031320.i03DKUAr036932@repoman.freebsd.org> From: Bill Paul Date: Sat, 3 Jan 2004 05:20:30 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/ndis kern_ndis.c subr_ndis.c src/sys/dev/if_ndis if_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 03 Jan 2004 13:20:40 -0000 wpaul 2004/01/03 05:20:30 PST FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c subr_ndis.c sys/dev/if_ndis if_ndis.c Log: In if_ndis.c:ndis_attach(), temporarily set the IFF_UP flag while calling the haltfunc. If an interrupt is triggered by the init or halt func, the IFF_UP flag must be set in order for us to be able to service it. In kern_ndis.c: implement a handler for NdisMSendResourcesAvailable() (currently does nothing since we don't really need it). In subr_ndis.c: - Correct ndis_init_string() and ndis_unicode_to_ansi(), which were both horribly broken. - Implement NdisImmediateReadPciSlotInformation() and NdisImmediateWritePciSlotInformation(). - Implement NdisBufferLength(). - Work around my first confirmed NDIS driver bug. The SMC 9462 gigE driver (natsemi 83820-based copper) incorrectly creates a spinlock in its DriverEntry() routine and then destroys it in its MiniportHalt() handler. This is wrong: spinlocks should be created in MiniportInit(). In a Windows environment, this is often not a problem because DriverEntry()/MiniportInit() are called once when the system boots and MiniportHalt() or the shutdown handler is called when the system halts. With this stuff in place, this driver now seems to work: ndis0: port 0xe000-0xe0ff mem 0xda000000-0xda000fff irq 10 at device 9.0 on pci0 ndis0: assign PCI resources... ndis_open_file("FLASH9.hex", 18446744073709551615) ndis0: Ethernet address: 00:04:e2:0e:d3:f0 Revision Changes Path 1.19 +9 -0 src/sys/compat/ndis/kern_ndis.c 1.22 +48 -12 src/sys/compat/ndis/subr_ndis.c 1.20 +3 -1 src/sys/dev/if_ndis/if_ndis.c