From owner-svn-src-head@FreeBSD.ORG Tue Oct 22 14:10:01 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12415C5C; Tue, 22 Oct 2013 14:10:01 +0000 (UTC) (envelope-from nwhitehorn@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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F37772DBB; Tue, 22 Oct 2013 14:10:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9MEA0jd031022; Tue, 22 Oct 2013 14:10:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9MEA0n7031020; Tue, 22 Oct 2013 14:10:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201310221410.r9MEA0n7031020@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 22 Oct 2013 14:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256900 - head/sys/dev/cfi 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.14 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: Tue, 22 Oct 2013 14:10:01 -0000 Author: nwhitehorn Date: Tue Oct 22 14:10:00 2013 New Revision: 256900 URL: http://svnweb.freebsd.org/changeset/base/256900 Log: Set BUS_PROBE_NOWILDCARD on this attachment as a stopgap. Unconditionally poking at registers in unknown devices is not the best probe mechanism. This should be reverted and a better solution found later. Modified: head/sys/dev/cfi/cfi_bus_nexus.c Modified: head/sys/dev/cfi/cfi_bus_nexus.c ============================================================================== --- head/sys/dev/cfi/cfi_bus_nexus.c Tue Oct 22 14:08:57 2013 (r256899) +++ head/sys/dev/cfi/cfi_bus_nexus.c Tue Oct 22 14:10:00 2013 (r256900) @@ -50,14 +50,25 @@ __FBSDID("$FreeBSD$"); static int cfi_nexus_probe(device_t dev) { + return (BUS_PROBE_NOWILDCARD); +} + +static int +cfi_nexus_attach(device_t dev) +{ + int error; + + error = cfi_probe(dev); + if (error != 0) + return (error); - return cfi_probe(dev); + return cfi_attach(dev); } static device_method_t cfi_nexus_methods[] = { /* device interface */ DEVMETHOD(device_probe, cfi_nexus_probe), - DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_attach, cfi_nexus_attach), DEVMETHOD(device_detach, cfi_detach), {0, 0}