svn commit: r246610 - stable/9/sys/dev/wbwd

Xin LI delphij at FreeBSD.org
Sun Feb 10 07:36:24 UTC 2013


Author: delphij
Date: Sun Feb 10 07:36:23 2013
New Revision: 246610
URL: http://svnweb.freebsd.org/changeset/base/246610

Log:
  MFC r245297:
  
  Add ID for Nuvoton WPCM450RA0BX found on Supermicro X9SCA-F motherboards.
  
  While I'm there, also make this driver to attach to devices that have
  an unknown device ID.

Modified:
  stable/9/sys/dev/wbwd/wbwd.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/wbwd/wbwd.c
==============================================================================
--- stable/9/sys/dev/wbwd/wbwd.c	Sun Feb 10 07:23:23 2013	(r246609)
+++ stable/9/sys/dev/wbwd/wbwd.c	Sun Feb 10 07:36:23 2013	(r246610)
@@ -179,6 +179,12 @@ struct winbond_vendor_device_id {
 		.device_rev	= 0x73,
 		.descr		= "Winbond 83627DHG-P",   
 	},
+	{
+		.vendor_id	= 0x5ca3,
+		.device_id	= 0xc3,
+		.device_rev	= 0x33,
+		.descr		= "Nuvoton WPCM450RA0BX",   
+	},
 };
 
 static void
@@ -597,6 +603,9 @@ wb_probe_enable(device_t dev, int probe)
 			goto cleanup;
 		}
 
+		if (dev_id == 0xff && dev_rev == 0xff)
+			goto cleanup;
+
 		for (j = 0; j < sizeof(wb_devs) / sizeof(*wb_devs); j++) {
 			if (wb_devs[j].device_id == dev_id &&
 			    wb_devs[j].device_rev == dev_rev) {
@@ -606,6 +615,16 @@ wb_probe_enable(device_t dev, int probe)
 				break;
 			}
 		}
+
+		if (!found) {
+			if (probe && dev != NULL) {
+				device_set_desc(dev, "Unknown Winbond/Nuvoton model");
+				device_printf(dev, "DevID 0x%02x DevRev 0x%02x, "
+				    "please report this.\n", dev_id, dev_rev);
+			}
+			found++;
+		}
+
 		if (probe && found && bootverbose && dev != NULL)
 			device_printf(dev, "%s EFER 0x%02x ID 0x%02x Rev 0x%02x"
 			     " CR26 0x%02x (probing)\n", device_get_desc(dev),


More information about the svn-src-all mailing list