svn commit: r231611 - stable/8/sys/dev/pci

John Baldwin jhb at FreeBSD.org
Mon Feb 13 19:52:19 UTC 2012


Author: jhb
Date: Mon Feb 13 19:52:18 2012
New Revision: 231611
URL: http://svn.freebsd.org/changeset/base/231611

Log:
  MFC 230340:
  Properly return success once a matching VPD entry is found in
  pci_get_vpd_readonly_method().  Previously the loop was always running
  to completion and falling through to failing with ENXIO.

Modified:
  stable/8/sys/dev/pci/pci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/dev/pci/pci.c
==============================================================================
--- stable/8/sys/dev/pci/pci.c	Mon Feb 13 19:51:59 2012	(r231610)
+++ stable/8/sys/dev/pci/pci.c	Mon Feb 13 19:52:18 2012	(r231611)
@@ -1076,11 +1076,9 @@ pci_get_vpd_readonly_method(device_t dev
 		if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword,
 		    sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) {
 			*vptr = cfg->vpd.vpd_ros[i].value;
+			return (0);
 		}
 
-	if (i != cfg->vpd.vpd_rocnt)
-		return (0);
-
 	*vptr = NULL;
 	return (ENXIO);
 }


More information about the svn-src-all mailing list