From owner-freebsd-current@FreeBSD.ORG Sun Aug 31 09:31:43 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FEEE16A4BF for ; Sun, 31 Aug 2003 09:31:43 -0700 (PDT) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C77443FE9 for ; Sun, 31 Aug 2003 09:31:41 -0700 (PDT) (envelope-from hhasenbe@techfak.uni-bielefeld.de) Received: from fwd10.aul.t-online.de by mailout04.sul.t-online.com with smtp id 19tV70-0003df-02; Sun, 31 Aug 2003 18:31:34 +0200 Received: from techfak.uni-bielefeld.de (XLRDVvZdYeP0W+6B10yvTVJbcAmH8T-OTraiTNPvsAt3klHsSBvTZx@[80.130.183.141]) by fmrl10.sul.t-online.com with esmtp id 19tV6q-0AQl1s0; Sun, 31 Aug 2003 18:31:24 +0200 Message-ID: <3F5222D9.8020404@techfak.uni-bielefeld.de> Date: Sun, 31 Aug 2003 18:31:21 +0200 From: Hendrik Hasenbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030610 X-Accept-Language: German, de, en MIME-Version: 1.0 To: Andrew Atrens References: <200308281540.h7SFeUV22668@accms33.physik.rwth-aachen.de> <20030828201301.GA14685@gattaca.yadt.co.uk> <3F4F57FA.4030605@techfak.uni-bielefeld.de> <3F4F5F80.8050205@nortelnetworks.com> <3F4F6978.3000301@techfak.uni-bielefeld.de> <3F4F765E.3080104@nortelnetworks.com> In-Reply-To: <3F4F765E.3080104@nortelnetworks.com> Content-Type: multipart/mixed; boundary="------------010408070600020605000904" X-Seen: false X-ID: XLRDVvZdYeP0W+6B10yvTVJbcAmH8T-OTraiTNPvsAt3klHsSBvTZx@t-dialin.net cc: danfe@regency.nsu.ru cc: freebsd-current@freebsd.org Subject: Re: nvidia.ko freezes system in -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 16:31:43 -0000 This is a multi-part message in MIME format. --------------010408070600020605000904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Andrew Atrens wrote: > The nvidia probe code gets invoked for every pci device discovered on > the bus. The can't-attach-memory-resource thing essentially means that > the driver is trying to attach to a device that isn't a graphics card. Ok. That seems to be the cause for the death of fsck on boot, too. Because I use the x11/nvidia-driver port I created a patch. It is lacking a lot of IDs, because it is the reverse approach to Andrew's. Hendrik --------------010408070600020605000904 Content-Type: text/plain; name="patch-aa" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-aa" --- src/nvidia_pci.c.orig Wed May 28 18:51:52 2003 +++ src/nvidia_pci.c Sun Aug 31 17:34:19 2003 @@ -29,17 +29,26 @@ vendor = pci_get_vendor(dev); device = pci_get_device(dev); - + if (vendor != NVIDIA_VENDORID || device < 0x0020) return ENXIO; - if (rm_get_device_name(device, NV_DEVICE_NAME_LENGTH, name) - != RM_OK) { - strcpy(name, "Unknown"); - } + switch ( device ) { + case 0x0281: + if (rm_get_device_name(device, NV_DEVICE_NAME_LENGTH, name) + != RM_OK) { + strcpy(name, "Unknown"); + } - device_set_desc_copy(dev, name); - return 0; + device_set_desc_copy(dev, name); + return 0; + break; + default: + if (pci_get_class(dev) == PCIC_DISPLAY) + device_printf(dev, "Unknown ID\nIf you are sure your device works with this driver\nplease post the ID"); + return ENXIO; + break; + } } int nvidia_pci_attach(device_t dev) --------------010408070600020605000904--