svn commit: r190135 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm

Robert Noland rnoland at FreeBSD.org
Thu Mar 19 22:51:57 PDT 2009


Author: rnoland
Date: Fri Mar 20 05:51:54 2009
New Revision: 190135
URL: http://svn.freebsd.org/changeset/base/190135

Log:
  Merge 189915
  
  Add support for matching solely on vendor id.
  
  We will use this method with nouveau

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/drm/drm_drv.c

Modified: stable/7/sys/dev/drm/drm_drv.c
==============================================================================
--- stable/7/sys/dev/drm/drm_drv.c	Fri Mar 20 05:50:42 2009	(r190134)
+++ stable/7/sys/dev/drm/drm_drv.c	Fri Mar 20 05:51:54 2009	(r190135)
@@ -182,7 +182,10 @@ int drm_probe(device_t kdev, drm_pci_id_
 
 	id_entry = drm_find_description(vendor, device, idlist);
 	if (id_entry != NULL) {
-		device_set_desc(kdev, id_entry->name);
+		if (!device_get_desc(kdev)) {
+			DRM_DEBUG("desc : %s\n", device_get_desc(kdev));
+			device_set_desc(kdev, id_entry->name);
+		}
 		return 0;
 	}
 
@@ -290,7 +293,8 @@ drm_pci_id_list_t *drm_find_description(
 	
 	for (i = 0; idlist[i].vendor != 0; i++) {
 		if ((idlist[i].vendor == vendor) &&
-		    (idlist[i].device == device)) {
+		    ((idlist[i].device == device) ||
+		    (idlist[i].device == 0))) {
 			return &idlist[i];
 		}
 	}


More information about the svn-src-stable-7 mailing list