From owner-svn-src-all@freebsd.org Sat Jan 23 05:26:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4396BA8D5A4; Sat, 23 Jan 2016 05:26:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 10E721E23; Sat, 23 Jan 2016 05:26:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0N5QUsk074468; Sat, 23 Jan 2016 05:26:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0N5QUKA074467; Sat, 23 Jan 2016 05:26:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201601230526.u0N5QUKA074467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 23 Jan 2016 05:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294616 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 23 Jan 2016 05:26:31 -0000 Author: adrian Date: Sat Jan 23 05:26:29 2016 New Revision: 294616 URL: https://svnweb.freebsd.org/changeset/base/294616 Log: Teach the flashmap code about the SPI flash. PR: kern/206227 Submitted by: Stanislav Galabov Modified: head/sys/geom/geom_flashmap.c Modified: head/sys/geom/geom_flashmap.c ============================================================================== --- head/sys/geom/geom_flashmap.c Sat Jan 23 04:18:44 2016 (r294615) +++ head/sys/geom/geom_flashmap.c Sat Jan 23 05:26:29 2016 (r294616) @@ -190,8 +190,12 @@ g_flashmap_taste(struct g_class *mp, str size = sizeof(device_t); if (g_io_getattr("NAND::device", cp, &size, &dev)) { size = sizeof(device_t); - if (g_io_getattr("CFI::device", cp, &size, &dev)) - break; + if (g_io_getattr("CFI::device", cp, &size, &dev)) { + size = sizeof(device_t); + if (g_io_getattr("SPI::device", cp, &size, + &dev)) + break; + } } nslices = g_flashmap_load(dev, &head);