Date: Tue, 22 Oct 2013 14:10:00 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256900 - head/sys/dev/cfi Message-ID: <201310221410.r9MEA0n7031020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310221410.r9MEA0n7031020>