From owner-svn-src-head@FreeBSD.ORG Sat Jun 6 15:51:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97F6E78; Sat, 6 Jun 2015 15:51:13 +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 ABC401DF6; Sat, 6 Jun 2015 15:51:13 +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 t56FpD2O014382; Sat, 6 Jun 2015 15:51:13 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56FpCbX013048; Sat, 6 Jun 2015 15:51:12 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061551.t56FpCbX013048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 15:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284078 - head/sys/dev/pci 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: Sat, 06 Jun 2015 15:51:14 -0000 Author: marcel Date: Sat Jun 6 15:51:11 2015 New Revision: 284078 URL: https://svnweb.freebsd.org/changeset/base/284078 Log: Don't return -10000 as the probe priority. That's lower than what BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -10000 in the first place. Differential Revision: D2705 Modified: head/sys/dev/pci/eisa_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/ignore_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/eisa_pci.c ============================================================================== --- head/sys/dev/pci/eisa_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/eisa_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/hostb_pci.c ============================================================================== --- head/sys/dev/pci/hostb_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/hostb_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (-10000); + return (BUS_PROBE_GENERIC); } return (ENXIO); } Modified: head/sys/dev/pci/ignore_pci.c ============================================================================== --- head/sys/dev/pci/ignore_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/ignore_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/isa_pci.c ============================================================================== --- head/sys/dev/pci/isa_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/isa_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/pci_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); }