svn commit: r294616 - head/sys/geom
Adrian Chadd
adrian at FreeBSD.org
Sat Jan 23 05:26:31 UTC 2016
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 <sgalabov at gmail.com>
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);
More information about the svn-src-head
mailing list