Re: nvidia.ko freezes system in -current

From: Hendrik Hasenbein <hhasenbe_at_techfak.uni-bielefeld.de>
Date: Sun, 31 Aug 2003 18:31:21 +0200
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

--- src/nvidia_pci.c.orig	Wed May 28 18:51:52 2003
+++ src/nvidia_pci.c	Sun Aug 31 17:34:19 2003
_at__at_ -29,17 +29,26 _at__at_
     
     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)
Received on Sun Aug 31 2003 - 07:31:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC