From owner-svn-src-all@FreeBSD.ORG Thu Jan 19 21:38:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0141065670; Thu, 19 Jan 2012 21:38:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A1468FC18; Thu, 19 Jan 2012 21:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0JLcJIA008878; Thu, 19 Jan 2012 21:38:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0JLcJru008876; Thu, 19 Jan 2012 21:38:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201201192138.q0JLcJru008876@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Jan 2012 21:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230340 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2012 21:38:19 -0000 Author: jhb Date: Thu Jan 19 21:38:19 2012 New Revision: 230340 URL: http://svn.freebsd.org/changeset/base/230340 Log: 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. PR: kern/164313 Submitted by: Chuck Tuffli chuck tuffli net MFC after: 1 week Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Jan 19 20:31:29 2012 (r230339) +++ head/sys/dev/pci/pci.c Thu Jan 19 21:38:19 2012 (r230340) @@ -1136,11 +1136,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); }