From owner-svn-src-head@FreeBSD.ORG Mon Jun 22 01:11:25 2015 Return-Path: Delivered-To: svn-src-head@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AEADD97; Mon, 22 Jun 2015 01:11:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 854CBEF0; Mon, 22 Jun 2015 01:11:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5M0YUUG087648; Mon, 22 Jun 2015 00:34:30 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5M0YU34087647; Mon, 22 Jun 2015 00:34:30 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506220034.t5M0YU34087647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 22 Jun 2015 00:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284689 - head/sys/dev/proto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 01:11:25 -0000 Author: marcel Date: Mon Jun 22 00:34:29 2015 New Revision: 284689 URL: https://svnweb.freebsd.org/changeset/base/284689 Log: Change the probe to what was intended: attach to devices with a type 0 header and not to function 0 devices. Modified: head/sys/dev/proto/proto_bus_pci.c Modified: head/sys/dev/proto/proto_bus_pci.c ============================================================================== --- head/sys/dev/proto/proto_bus_pci.c Mon Jun 22 00:30:34 2015 (r284688) +++ head/sys/dev/proto/proto_bus_pci.c Mon Jun 22 00:34:29 2015 (r284689) @@ -64,8 +64,7 @@ proto_pci_probe(device_t dev) { struct sbuf *sb; - /* For now we only attach to function 0 devices. */ - if (pci_get_function(dev) != 0) + if ((pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) != 0) return (ENXIO); sb = sbuf_new_auto();