Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 2019 04:50:09 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349352 - in head: etc/mtree include lib lib/libnandfs sbin sbin/camcontrol sbin/nandfs sbin/newfs_nandfs share/man/man4 share/man/man5 share/mk stand stand/arm/uboot stand/common stand...
Message-ID:  <201906250450.x5P4o9oR015946@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Jun 25 04:50:09 2019
New Revision: 349352
URL: https://svnweb.freebsd.org/changeset/base/349352

Log:
  Remove NAND and NANDFS support
  
  NANDFS has been broken for years. Remove it. The NAND drivers that
  remain are for ancient parts that are no longer relevant. They are
  polled, have terrible performance and just for ancient arm
  hardware. NAND parts have evolved significantly from this early work
  and little to none of it would be relevant should someone need to
  update to support raw nand. This code has been off by default for
  years and has violated the vnode protocol leading to panics since it
  was committed.
  
  Numerous posts to arch@ and other locations have found no actual users
  for this software.
  
  Relnotes:	Yes
  No Objection From: arch@
  Differential Revision: https://reviews.freebsd.org/D20745

Deleted:
  head/lib/libnandfs/Makefile
  head/lib/libnandfs/Makefile.depend
  head/lib/libnandfs/libnandfs.h
  head/lib/libnandfs/nandfs.c
  head/sbin/nandfs/Makefile
  head/sbin/nandfs/Makefile.depend
  head/sbin/nandfs/lssnap.c
  head/sbin/nandfs/mksnap.c
  head/sbin/nandfs/nandfs.8
  head/sbin/nandfs/nandfs.c
  head/sbin/nandfs/nandfs.h
  head/sbin/nandfs/rmsnap.c
  head/sbin/newfs_nandfs/Makefile
  head/sbin/newfs_nandfs/Makefile.depend
  head/sbin/newfs_nandfs/newfs_nandfs.8
  head/sbin/newfs_nandfs/newfs_nandfs.c
  head/share/man/man4/nand.4
  head/share/man/man4/nandsim.4
  head/share/man/man5/nandfs.5
  head/stand/libsa/nandfs.c
  head/sys/arm/freescale/vybrid/vf_nfc.c
  head/sys/dev/nand/nand.c
  head/sys/dev/nand/nand.h
  head/sys/dev/nand/nand_bbt.c
  head/sys/dev/nand/nand_cdev.c
  head/sys/dev/nand/nand_dev.h
  head/sys/dev/nand/nand_ecc_pos.h
  head/sys/dev/nand/nand_generic.c
  head/sys/dev/nand/nand_geom.c
  head/sys/dev/nand/nand_id.c
  head/sys/dev/nand/nand_if.m
  head/sys/dev/nand/nandbus.c
  head/sys/dev/nand/nandbus.h
  head/sys/dev/nand/nandbus_if.m
  head/sys/dev/nand/nandsim.c
  head/sys/dev/nand/nandsim.h
  head/sys/dev/nand/nandsim_chip.c
  head/sys/dev/nand/nandsim_chip.h
  head/sys/dev/nand/nandsim_ctrl.c
  head/sys/dev/nand/nandsim_log.c
  head/sys/dev/nand/nandsim_log.h
  head/sys/dev/nand/nandsim_swap.c
  head/sys/dev/nand/nandsim_swap.h
  head/sys/dev/nand/nfc_fsl.c
  head/sys/dev/nand/nfc_fsl.h
  head/sys/dev/nand/nfc_if.m
  head/sys/dev/nand/nfc_mv.c
  head/sys/dev/nand/nfc_rb.c
  head/sys/fs/nandfs/bmap.c
  head/sys/fs/nandfs/bmap.h
  head/sys/fs/nandfs/nandfs.h
  head/sys/fs/nandfs/nandfs_alloc.c
  head/sys/fs/nandfs/nandfs_bmap.c
  head/sys/fs/nandfs/nandfs_buffer.c
  head/sys/fs/nandfs/nandfs_cleaner.c
  head/sys/fs/nandfs/nandfs_cpfile.c
  head/sys/fs/nandfs/nandfs_dat.c
  head/sys/fs/nandfs/nandfs_dir.c
  head/sys/fs/nandfs/nandfs_fs.h
  head/sys/fs/nandfs/nandfs_ifile.c
  head/sys/fs/nandfs/nandfs_mount.h
  head/sys/fs/nandfs/nandfs_segment.c
  head/sys/fs/nandfs/nandfs_subr.c
  head/sys/fs/nandfs/nandfs_subr.h
  head/sys/fs/nandfs/nandfs_sufile.c
  head/sys/fs/nandfs/nandfs_vfsops.c
  head/sys/fs/nandfs/nandfs_vnops.c
  head/sys/modules/nand/Makefile
  head/sys/modules/nandfs/Makefile
  head/sys/modules/nandsim/Makefile
  head/usr.sbin/bhyve/audio.c
  head/usr.sbin/bhyve/audio.h
  head/usr.sbin/bhyve/hda_codec.c
  head/usr.sbin/bhyve/hda_reg.h
  head/usr.sbin/bhyve/hdac_reg.h
  head/usr.sbin/bhyve/pci_hda.c
  head/usr.sbin/bhyve/pci_hda.h
  head/usr.sbin/nandsim/Makefile
  head/usr.sbin/nandsim/Makefile.depend
  head/usr.sbin/nandsim/nandsim.8
  head/usr.sbin/nandsim/nandsim.c
  head/usr.sbin/nandsim/nandsim_cfgparse.c
  head/usr.sbin/nandsim/nandsim_cfgparse.h
  head/usr.sbin/nandsim/nandsim_rcfile.c
  head/usr.sbin/nandsim/nandsim_rcfile.h
  head/usr.sbin/nandsim/sample.conf
  head/usr.sbin/nandtool/Makefile
  head/usr.sbin/nandtool/Makefile.depend
  head/usr.sbin/nandtool/nand_erase.c
  head/usr.sbin/nandtool/nand_info.c
  head/usr.sbin/nandtool/nand_read.c
  head/usr.sbin/nandtool/nand_readoob.c
  head/usr.sbin/nandtool/nand_write.c
  head/usr.sbin/nandtool/nand_writeoob.c
  head/usr.sbin/nandtool/nandtool.8
  head/usr.sbin/nandtool/nandtool.c
  head/usr.sbin/nandtool/nandtool.h
  head/usr.sbin/nandtool/usage.h
Modified:
  head/etc/mtree/BSD.include.dist
  head/include/Makefile
  head/lib/Makefile
  head/sbin/Makefile
  head/sbin/camcontrol/camcontrol.c
  head/share/man/man4/Makefile
  head/share/man/man5/Makefile
  head/share/mk/bsd.libnames.mk
  head/share/mk/src.libnames.mk
  head/share/mk/src.opts.mk
  head/stand/arm/uboot/conf.c
  head/stand/arm/uboot/version
  head/stand/common/part.c
  head/stand/common/part.h
  head/stand/i386/loader/conf.c
  head/stand/libsa/Makefile
  head/stand/libsa/stand.h
  head/stand/loader.mk
  head/stand/mips/uboot/conf.c
  head/stand/mips/uboot/version
  head/sys/arm/conf/DB-78XXX
  head/sys/arm/conf/DB-88F6XXX
  head/sys/arm/conf/DREAMPLUG-1001
  head/sys/arm/conf/NOTES.armv5
  head/sys/arm/conf/SHEEVAPLUG
  head/sys/arm/conf/VYBRID
  head/sys/arm/mv/files.arm7
  head/sys/arm/mv/files.mv
  head/sys/cam/ata/ata_all.c
  head/sys/cam/ata/ata_all.h
  head/sys/cam/ata/ata_xpt.c
  head/sys/cam/scsi/scsi_da.c
  head/sys/conf/files
  head/sys/conf/files.powerpc
  head/sys/conf/kern.opts.mk
  head/sys/fs/smbfs/smbfs_io.c
  head/sys/geom/geom_flashmap.c
  head/sys/modules/Makefile
  head/sys/sys/param.h
  head/targets/pseudo/userland/Makefile.depend
  head/targets/pseudo/userland/lib/Makefile.depend
  head/usr.bin/vtfontcvt/vtfontcvt.c
  head/usr.sbin/Makefile
  head/usr.sbin/bhyve/Makefile
  head/usr.sbin/bhyve/bhyve.8

Modified: head/etc/mtree/BSD.include.dist
==============================================================================
--- head/etc/mtree/BSD.include.dist	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/etc/mtree/BSD.include.dist	Tue Jun 25 04:50:09 2019	(r349352)
@@ -138,8 +138,6 @@
             mpilib
             ..
         ..
-        nand
-        ..
         nvme
         ..
         ofw
@@ -183,8 +181,6 @@
         fdescfs
         ..
         msdosfs
-        ..
-        nandfs
         ..
         nfs
         ..

Modified: head/include/Makefile
==============================================================================
--- head/include/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/include/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -48,7 +48,7 @@ LSUBDIRS=	cam/ata cam/mmc cam/nvme cam/scsi \
 	dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \
 	dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \
 	dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \
-	fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \
+	fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \
 	fs/procfs fs/smbfs fs/udf fs/unionfs \
 	geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
 	geom/mirror geom/mountver geom/multipath geom/nop \
@@ -158,7 +158,7 @@ copies: .PHONY .META
 		done; \
 	fi
 .endfor
-.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS}
+.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS}
 	cd ${SRCTOP}/sys; \
 	${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
 	    ${SDESTDIR}${INCLUDEDIR}/$i
@@ -174,13 +174,6 @@ copies: .PHONY .META
 	cd ${SRCTOP}/sys/dev/bktr; \
 	${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
 	    ${SDESTDIR}${INCLUDEDIR}/dev/bktr
-.if ${MK_NAND} != "no"
-	cd ${SRCTOP}/sys/dev/nand; \
-	${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \
-	    ${SDESTDIR}${INCLUDEDIR}/dev/nand; \
-	${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \
-	    ${SDESTDIR}${INCLUDEDIR}/dev/nand
-.endif
 	cd ${SRCTOP}/sys/dev/evdev; \
 	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \
 	    ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
@@ -268,7 +261,7 @@ symlinks: .PHONY .META
 		${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \
 	done
 .endfor
-.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci:Ndev/veriexec}
+.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec}
 	cd ${SRCTOP}/sys/$i; \
 	for h in *.h; do \
 		${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \
@@ -289,13 +282,6 @@ symlinks: .PHONY .META
 		${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \
 		    ${SDESTDIR}${INCLUDEDIR}/dev/bktr; \
 	done
-.if ${MK_NAND} != "no"
-	cd ${SRCTOP}/sys/dev/nand; \
-	for h in nandsim.h nand_dev.h; do \
-		${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \
-		    ${SDESTDIR}${INCLUDEDIR}/dev/nand; \
-	done
-.endif
 	cd ${SRCTOP}/sys/dev/evdev; \
 	for h in input.h input-event-codes.h uinput.h; do \
 		ln -fs ../../../../sys/dev/evdev/$$h \

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/lib/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -174,7 +174,6 @@ SUBDIR.${MK_GOOGLETEST}+=	googletest
 SUBDIR.${MK_LIBTHR}+=	libthr
 SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
 SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
-SUBDIR.${MK_NAND}+=	libnandfs
 SUBDIR.${MK_NETGRAPH}+=	libnetgraph
 SUBDIR.${MK_NIS}+=	libypclnt
 

Modified: head/sbin/Makefile
==============================================================================
--- head/sbin/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sbin/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -79,8 +79,6 @@ SUBDIR.${MK_IPFILTER}+=	ipf
 SUBDIR.${MK_IPFW}+=	ipfw
 SUBDIR.${MK_IPFW}+=	natd
 SUBDIR.${MK_ISCSI}+=	iscontrol
-SUBDIR.${MK_NAND}+=	nandfs
-SUBDIR.${MK_NAND}+=	newfs_nandfs
 SUBDIR.${MK_NVME}+=	nvmecontrol
 SUBDIR.${MK_OPENSSL}+=	decryptcore
 SUBDIR.${MK_PF}+=	pfctl

Modified: head/sbin/camcontrol/camcontrol.c
==============================================================================
--- head/sbin/camcontrol/camcontrol.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sbin/camcontrol/camcontrol.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -2326,11 +2326,9 @@ ata_do_identify(struct cam_device *device, int retry_c
 		}
 	}
 
-	ident_buf = (struct ata_params *)ptr;
-	ata_param_fixup(ident_buf);
-
 	error = 1;
 	for (i = 0; i < sizeof(struct ata_params) / 2; i++) {
+		ptr[i] = le16toh(ptr[i]);
 		if (ptr[i] != 0)
 			error = 0;
 	}
@@ -2347,6 +2345,26 @@ ata_do_identify(struct cam_device *device, int retry_c
 		free(ptr);
 		return (error);
 	}
+
+	ident_buf = (struct ata_params *)ptr;
+	if (strncmp(ident_buf->model, "FX", 2) &&
+	    strncmp(ident_buf->model, "NEC", 3) &&
+	    strncmp(ident_buf->model, "Pioneer", 7) &&
+	    strncmp(ident_buf->model, "SHARP", 5)) {
+		ata_bswap(ident_buf->model, sizeof(ident_buf->model));
+		ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
+		ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
+		ata_bswap(ident_buf->media_serial, sizeof(ident_buf->media_serial));
+	}
+	ata_btrim(ident_buf->model, sizeof(ident_buf->model));
+	ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
+	ata_btrim(ident_buf->revision, sizeof(ident_buf->revision));
+	ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
+	ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
+	ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
+	ata_btrim(ident_buf->media_serial, sizeof(ident_buf->media_serial));
+	ata_bpack(ident_buf->media_serial, ident_buf->media_serial,
+	    sizeof(ident_buf->media_serial));
 
 	*ident_bufp = ident_buf;
 

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/share/man/man4/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -303,8 +303,6 @@ MAN=	aac.4 \
 	mx25l.4 \
 	mxge.4 \
 	my.4 \
-	nand.4 \
-	nandsim.4 \
 	${_ndis.4} \
 	net80211.4 \
 	netdump.4 \

Modified: head/share/man/man5/Makefile
==============================================================================
--- head/share/man/man5/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/share/man/man5/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -101,10 +101,6 @@ MAN+=	freebsd-update.conf.5
 MAN+=	hesiod.conf.5 
 .endif
 
-.if ${MK_NAND} != "no"
-MAN+=	nandfs.5
-.endif
-
 .if ${MK_PF} != "no"
 MAN+=	pf.conf.5 \
 	pf.os.5

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/share/mk/bsd.libnames.mk	Tue Jun 25 04:50:09 2019	(r349352)
@@ -104,7 +104,6 @@ LIBMLX4?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
 LIBMLX5?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a
 LIBMP?=		${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
 LIBMT?=		${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
-LIBNANDFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a
 LIBNCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
 LIBNCURSESW?=	${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
 LIBNETGRAPH?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a

Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/share/mk/src.libnames.mk	Tue Jun 25 04:50:09 2019	(r349352)
@@ -135,7 +135,6 @@ _LIBRARIES=	\
 		memstat \
 		mp \
 		mt \
-		nandfs \
 		ncurses \
 		ncursesw \
 		netgraph \

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/share/mk/src.opts.mk	Tue Jun 25 04:50:09 2019	(r349352)
@@ -206,7 +206,6 @@ __DEFAULT_NO_OPTIONS = \
     LOADER_FORCE_LE \
     LOADER_VERBOSE \
     LOADER_VERIEXEC_PASS_MANIFEST \
-    NAND \
     OFED_EXTRA \
     OPENLDAP \
     RPCBIND_WARMSTART_SUPPORT \

Modified: head/stand/arm/uboot/conf.c
==============================================================================
--- head/stand/arm/uboot/conf.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/arm/uboot/conf.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -59,9 +59,6 @@ struct fs_ops *file_system[] = {
 #if defined(LOADER_EXT2FS_SUPPORT)
 	&ext2fs_fsops,
 #endif
-#if defined(LOADER_NANDFS_SUPPORT)
-	&nandfs_fsops,
-#endif
 #if defined(LOADER_NFS_SUPPORT)
 	&nfs_fsops,
 #endif

Modified: head/stand/arm/uboot/version
==============================================================================
--- head/stand/arm/uboot/version	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/arm/uboot/version	Tue Jun 25 04:50:09 2019	(r349352)
@@ -3,6 +3,7 @@ $FreeBSD$
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important.  Make sure the current version number is on line 6.
 
+1.3:	Remove NAND FS support.
 1.2:	Extended with NAND FS support.
 1.1:	Flattened Device Tree blob support.
 1.0:	Added storage support. Booting from HDD, USB, etc. is now possible.

Modified: head/stand/common/part.c
==============================================================================
--- head/stand/common/part.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/common/part.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -57,7 +57,6 @@ static const uuid_t gpt_uuid_freebsd_ufs = GPT_ENT_TYP
 static const uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI;
 static const uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD;
 static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT;
-static const uuid_t gpt_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS;
 static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP;
 static const uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS;
 static const uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM;
@@ -91,7 +90,6 @@ static struct parttypes {
 	{ PART_EFI,		"EFI" },
 	{ PART_FREEBSD,		"FreeBSD" },
 	{ PART_FREEBSD_BOOT,	"FreeBSD boot" },
-	{ PART_FREEBSD_NANDFS,	"FreeBSD nandfs" },
 	{ PART_FREEBSD_UFS,	"FreeBSD UFS" },
 	{ PART_FREEBSD_ZFS,	"FreeBSD ZFS" },
 	{ PART_FREEBSD_SWAP,	"FreeBSD swap" },
@@ -141,8 +139,6 @@ gpt_parttype(uuid_t type)
 		return (PART_FREEBSD_SWAP);
 	else if (uuid_equal(&type, &gpt_uuid_freebsd_vinum, NULL))
 		return (PART_FREEBSD_VINUM);
-	else if (uuid_equal(&type, &gpt_uuid_freebsd_nandfs, NULL))
-		return (PART_FREEBSD_NANDFS);
 	else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL))
 		return (PART_FREEBSD);
 	return (PART_UNKNOWN);
@@ -445,8 +441,6 @@ bsd_parttype(uint8_t type)
 {
 
 	switch (type) {
-	case FS_NANDFS:
-		return (PART_FREEBSD_NANDFS);
 	case FS_SWAP:
 		return (PART_FREEBSD_SWAP);
 	case FS_BSDFFS:
@@ -527,8 +521,6 @@ vtoc8_parttype(uint16_t type)
 {
 
 	switch (type) {
-	case VTOC_TAG_FREEBSD_NANDFS:
-		return (PART_FREEBSD_NANDFS);
 	case VTOC_TAG_FREEBSD_SWAP:
 		return (PART_FREEBSD_SWAP);
 	case VTOC_TAG_FREEBSD_UFS:

Modified: head/stand/common/part.h
==============================================================================
--- head/stand/common/part.h	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/common/part.h	Tue Jun 25 04:50:09 2019	(r349352)
@@ -45,7 +45,6 @@ enum partition_type {
 	PART_EFI,
 	PART_FREEBSD,
 	PART_FREEBSD_BOOT,
-	PART_FREEBSD_NANDFS,
 	PART_FREEBSD_UFS,
 	PART_FREEBSD_ZFS,
 	PART_FREEBSD_SWAP,

Modified: head/stand/i386/loader/conf.c
==============================================================================
--- head/stand/i386/loader/conf.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/i386/loader/conf.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -84,9 +84,6 @@ struct fs_ops *file_system[] = {
 #if defined(LOADER_CD9660_SUPPORT)
     &cd9660_fsops,
 #endif
-#if defined(LOADER_NANDFS_SUPPORT)
-    &nandfs_fsops,
-#endif
 #ifdef LOADER_NFS_SUPPORT 
     &nfs_fsops,
 #endif

Modified: head/stand/libsa/Makefile
==============================================================================
--- head/stand/libsa/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/libsa/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -145,9 +145,6 @@ SRCS+=	ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c
 SRCS+=	dosfs.c ext2fs.c
 SRCS+=	splitfs.c
 SRCS+=	pkgfs.c
-.if ${MK_NAND} != "no"
-SRCS+=	nandfs.c
-.endif
 
 # kernel ufs support
 .PATH: ${SRCTOP}/sys/ufs/ffs

Modified: head/stand/libsa/stand.h
==============================================================================
--- head/stand/libsa/stand.h	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/libsa/stand.h	Tue Jun 25 04:50:09 2019	(r349352)
@@ -119,7 +119,6 @@ extern struct fs_ops ufs_fsops;
 extern struct fs_ops tftp_fsops;
 extern struct fs_ops nfs_fsops;
 extern struct fs_ops cd9660_fsops;
-extern struct fs_ops nandfs_fsops;
 extern struct fs_ops gzipfs_fsops;
 extern struct fs_ops bzipfs_fsops;
 extern struct fs_ops dosfs_fsops;

Modified: head/stand/loader.mk
==============================================================================
--- head/stand/loader.mk	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/loader.mk	Tue Jun 25 04:50:09 2019	(r349352)
@@ -99,9 +99,6 @@ CFLAGS+=	-DLOADER_EXT2FS_SUPPORT
 .if ${LOADER_MSDOS_SUPPORT:Uno} == "yes"
 CFLAGS+=	-DLOADER_MSDOS_SUPPORT
 .endif
-.if ${LOADER_NANDFS_SUPPORT:U${MK_NAND}} == "yes"
-CFLAGS+=	-DLOADER_NANDFS_SUPPORT
-.endif
 .if ${LOADER_UFS_SUPPORT:Uyes} == "yes"
 CFLAGS+=	-DLOADER_UFS_SUPPORT
 .endif

Modified: head/stand/mips/uboot/conf.c
==============================================================================
--- head/stand/mips/uboot/conf.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/mips/uboot/conf.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -62,9 +62,6 @@ struct fs_ops *file_system[] = {
 #if defined(LOADER_EXT2FS_SUPPORT)
 	&ext2fs_fsops,
 #endif
-#if defined(LOADER_NANDFS_SUPPORT)
-	&nandfs_fsops,
-#endif
 #if defined(LOADER_NFS_SUPPORT)
 	&nfs_fsops,
 #endif

Modified: head/stand/mips/uboot/version
==============================================================================
--- head/stand/mips/uboot/version	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/stand/mips/uboot/version	Tue Jun 25 04:50:09 2019	(r349352)
@@ -3,6 +3,7 @@ $FreeBSD$
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important.  Make sure the current version number is on line 6.
 
+1.3:	Remove NAND FS support.
 1.2:	Extended with NAND FS support.
 1.1:	Flattened Device Tree blob support.
 1.0:	Added storage support. Booting from HDD, USB, etc. is now possible.

Modified: head/sys/arm/conf/DB-78XXX
==============================================================================
--- head/sys/arm/conf/DB-78XXX	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/DB-78XXX	Tue Jun 25 04:50:09 2019	(r349352)
@@ -74,9 +74,6 @@ device		ds133x
 # SATA
 device		mvs
 
-# NAND
-device		nand
-
 # GPIO
 device		gpio
 

Modified: head/sys/arm/conf/DB-88F6XXX
==============================================================================
--- head/sys/arm/conf/DB-88F6XXX	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/DB-88F6XXX	Tue Jun 25 04:50:09 2019	(r349352)
@@ -78,9 +78,6 @@ device		twsi
 # SATA
 device		mvs
 
-# NAND
-device		nand
-
 # GPIO
 device		gpio
 

Modified: head/sys/arm/conf/DREAMPLUG-1001
==============================================================================
--- head/sys/arm/conf/DREAMPLUG-1001	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/DREAMPLUG-1001	Tue Jun 25 04:50:09 2019	(r349352)
@@ -157,14 +157,6 @@ options 	ALTQ_PRIQ		# Priority Queueing
 options 	ALTQ_NOPCC		# Required if the TSC is unusable
 #options 	ALTQ_DEBUG
 
-# To use this configuration with the (rare) model 1001N (nand flash),
-# create a kernel config file that looks like this:
-#
-# include DREAMPLUG-1001
-# nomakeoptions	FDT_DTS_FILE
-# makeoptions	FDT_DTS_FILE=dreamplug-1001N.dts
-# device 	nand
-
 # Flattened Device Tree
 options 	FDT			# Configure using FDT/DTB data
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/conf/NOTES.armv5
==============================================================================
--- head/sys/arm/conf/NOTES.armv5	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/NOTES.armv5	Tue Jun 25 04:50:09 2019	(r349352)
@@ -31,8 +31,3 @@ options 	ARM_MANY_BOARD
 options 	SOC_MV_DISCOVERY
 options 	SOC_MV_KIRKWOOD
 options 	SOC_MV_ORION
-
-# Add devices which are specific to various arm platforms...
-
-device		nand
-

Modified: head/sys/arm/conf/SHEEVAPLUG
==============================================================================
--- head/sys/arm/conf/SHEEVAPLUG	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/SHEEVAPLUG	Tue Jun 25 04:50:09 2019	(r349352)
@@ -72,9 +72,6 @@ device		scbus
 device		pass
 device		da
 
-# NAND
-device		nand
-
 # GPIO
 device		gpio
 

Modified: head/sys/arm/conf/VYBRID
==============================================================================
--- head/sys/arm/conf/VYBRID	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/conf/VYBRID	Tue Jun 25 04:50:09 2019	(r349352)
@@ -37,7 +37,6 @@ options 	PLATFORM		# Platform based SoC
 #options 	BOOTP_WIRED_TO=ffec0
 
 #options 	ROOTDEVNAME=\"nfs:10.5.0.1:/tftpboot/cosmic\"
-#options 	ROOTDEVNAME=\"nandfs:/dev/gnand0s.root\"
 options 	ROOTDEVNAME=\"ufs:/dev/da0\"
 
 options 	MUTEX_NOINLINE
@@ -79,8 +78,6 @@ device		pass
 #device		ata
 #device		atadisk
 #device		mvs
-
-device		nand
 
 # Serial ports
 device		uart

Modified: head/sys/arm/mv/files.arm7
==============================================================================
--- head/sys/arm/mv/files.arm7	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/mv/files.arm7	Tue Jun 25 04:50:09 2019	(r349352)
@@ -29,7 +29,6 @@ dev/iicbus/twsi/mv_twsi.c	optional	twsi
 dev/mge/if_mge.c		optional	mge
 dev/neta/if_mvneta_fdt.c	optional	neta fdt
 dev/neta/if_mvneta.c		optional	neta mdio mii
-dev/nand/nfc_mv.c		optional	nand
 dev/mvs/mvs_soc.c		optional	mvs
 dev/uart/uart_dev_ns8250.c	optional	uart
 dev/uart/uart_dev_snps.c	optional	uart

Modified: head/sys/arm/mv/files.mv
==============================================================================
--- head/sys/arm/mv/files.mv	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/arm/mv/files.mv	Tue Jun 25 04:50:09 2019	(r349352)
@@ -26,7 +26,6 @@ dev/iicbus/twsi/mv_twsi.c	optional	twsi
 dev/mge/if_mge.c		optional	mge
 dev/neta/if_mvneta_fdt.c	optional	neta fdt
 dev/neta/if_mvneta.c		optional	neta mdio mii
-dev/nand/nfc_mv.c		optional	nand
 dev/mvs/mvs_soc.c		optional	mvs
 dev/uart/uart_dev_ns8250.c	optional	uart
 dev/uart/uart_dev_snps.c	optional	uart

Modified: head/sys/cam/ata/ata_all.c
==============================================================================
--- head/sys/cam/ata/ata_all.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/cam/ata/ata_all.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -1238,28 +1238,3 @@ ata_zac_mgmt_in(struct ccb_ataio *ataio, uint32_t retr
 		ataio->aux = auxiliary;
 	}
 }
-
-void
-ata_param_fixup(struct ata_params *ident_buf)
-{
-	int16_t *ptr;
-
-	for (ptr = (int16_t *)ident_buf;
-	     ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) {
-		*ptr = le16toh(*ptr);
-	}
-	if (strncmp(ident_buf->model, "FX", 2) &&
-	    strncmp(ident_buf->model, "NEC", 3) &&
-	    strncmp(ident_buf->model, "Pioneer", 7) &&
-	    strncmp(ident_buf->model, "SHARP", 5)) {
-		ata_bswap(ident_buf->model, sizeof(ident_buf->model));
-		ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
-		ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
-	}
-	ata_btrim(ident_buf->model, sizeof(ident_buf->model));
-	ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
-	ata_btrim(ident_buf->revision, sizeof(ident_buf->revision));
-	ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
-	ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
-	ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
-}

Modified: head/sys/cam/ata/ata_all.h
==============================================================================
--- head/sys/cam/ata/ata_all.h	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/cam/ata/ata_all.h	Tue Jun 25 04:50:09 2019	(r349352)
@@ -135,7 +135,6 @@ void	ata_read_log(struct ccb_ataio *ataio, uint32_t re
 		     uint16_t block_count, uint32_t protocol,
 		     uint8_t *data_ptr, uint32_t dxfer_len, uint32_t timeout);
 
-void	ata_param_fixup(struct ata_params *ident_buf);
 void	ata_bswap(int8_t *buf, int len);
 void	ata_btrim(int8_t *buf, int len);
 void	ata_bpack(int8_t *src, int8_t *dst, int len);

Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/cam/ata/ata_xpt.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -893,13 +893,14 @@ noerror:
 	case PROBE_IDENTIFY:
 	{
 		struct ccb_pathinq cpi;
+		int16_t *ptr;
 		int veto = 0;
 
-		/*
-		 * Convert to host byte order, and fix the strings.
-		 */
 		ident_buf = &softc->ident_data;
-		ata_param_fixup(ident_buf);
+		for (ptr = (int16_t *)ident_buf;
+		     ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) {
+			*ptr = le16toh(*ptr);
+		}
 
 		/*
 		 * Allow others to veto this ATA disk attachment.  This
@@ -911,6 +912,20 @@ noerror:
 			goto device_fail;
 		}
 
+		if (strncmp(ident_buf->model, "FX", 2) &&
+		    strncmp(ident_buf->model, "NEC", 3) &&
+		    strncmp(ident_buf->model, "Pioneer", 7) &&
+		    strncmp(ident_buf->model, "SHARP", 5)) {
+			ata_bswap(ident_buf->model, sizeof(ident_buf->model));
+			ata_bswap(ident_buf->revision, sizeof(ident_buf->revision));
+			ata_bswap(ident_buf->serial, sizeof(ident_buf->serial));
+		}
+		ata_btrim(ident_buf->model, sizeof(ident_buf->model));
+		ata_bpack(ident_buf->model, ident_buf->model, sizeof(ident_buf->model));
+		ata_btrim(ident_buf->revision, sizeof(ident_buf->revision));
+		ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision));
+		ata_btrim(ident_buf->serial, sizeof(ident_buf->serial));
+		ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial));
 		/* Device may need spin-up before IDENTIFY become valid. */
 		if ((ident_buf->specconf == 0x37c8 ||
 		     ident_buf->specconf == 0x738c) &&

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/cam/scsi/scsi_da.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -64,9 +64,6 @@ __FBSDID("$FreeBSD$");
 #include <cam/cam_ccb.h>
 #include <cam/cam_periph.h>
 #include <cam/cam_xpt_periph.h>
-#ifdef _KERNEL
-#include <cam/cam_xpt_internal.h>
-#endif /* _KERNEL */
 #include <cam/cam_sim.h>
 #include <cam/cam_iosched.h>
 
@@ -3616,8 +3613,16 @@ out:
 			break;
 		}
 
-		ata_params = &periph->path->device->ident_data;
+		ata_params = (struct ata_params*)
+			malloc(sizeof(*ata_params), M_SCSIDA,M_NOWAIT|M_ZERO);
 
+		if (ata_params == NULL) {
+			xpt_print(periph->path, "Couldn't malloc ata_params "
+			    "data\n");
+			/* da_free_periph??? */
+			break;
+		}
+
 		scsi_ata_identify(&start_ccb->csio,
 				  /*retries*/da_retry_count,
 				  /*cbfcnp*/dadone_probeata,
@@ -5187,7 +5192,7 @@ dadone_probeata(struct cam_periph *periph, union ccb *
 	struct da_softc *softc;
 	u_int32_t  priority;
 	int continue_probe;
-	int error;
+	int error, i;
 	int16_t *ptr;
 
 	CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_probeata\n"));
@@ -5205,7 +5210,8 @@ dadone_probeata(struct cam_periph *periph, union ccb *
 	if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
 		uint16_t old_rate;
 
-		ata_param_fixup(ata_params);
+		for (i = 0; i < sizeof(*ata_params) / 2; i++)
+			ptr[i] = le16toh(ptr[i]);
 		if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM &&
 		    (softc->quirks & DA_Q_NO_UNMAP) == 0) {
 			dadeleteflag(softc, DA_DELETE_ATA_TRIM, 1);
@@ -5289,6 +5295,7 @@ dadone_probeata(struct cam_periph *periph, union ccb *
 		}
 	}
 
+	free(ata_params, M_SCSIDA);
 	if ((softc->zone_mode == DA_ZONE_HOST_AWARE)
 	 || (softc->zone_mode == DA_ZONE_HOST_MANAGED)) {
 		/*

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/conf/files	Tue Jun 25 04:50:09 2019	(r349352)
@@ -1708,7 +1708,7 @@ dev/fdt/fdt_clock_if.m		optional fdt fdt_clock
 dev/fdt/fdt_common.c		optional fdt
 dev/fdt/fdt_pinctrl.c		optional fdt fdt_pinctrl
 dev/fdt/fdt_pinctrl_if.m	optional fdt fdt_pinctrl
-dev/fdt/fdt_slicer.c		optional fdt cfi | fdt nand | fdt mx25l | fdt n25q | fdt at45d
+dev/fdt/fdt_slicer.c		optional fdt cfi | fdt mx25l | fdt n25q | fdt at45d
 dev/fdt/fdt_static_dtb.S	optional fdt fdt_dtb_static \
 	dependency	"${FDT_DTS_FILE:T:R}.dtb"
 dev/fdt/simplebus.c		optional fdt
@@ -2457,21 +2457,6 @@ dev/mxge/mxge_ethp_z8e.c	optional mxge pci
 dev/mxge/mxge_rss_eth_z8e.c	optional mxge pci
 dev/mxge/mxge_rss_ethp_z8e.c	optional mxge pci
 dev/my/if_my.c			optional my
-dev/nand/nand.c			optional nand
-dev/nand/nand_bbt.c		optional nand
-dev/nand/nand_cdev.c		optional nand
-dev/nand/nand_generic.c		optional nand
-dev/nand/nand_geom.c		optional nand
-dev/nand/nand_id.c		optional nand
-dev/nand/nandbus.c		optional nand
-dev/nand/nandbus_if.m		optional nand
-dev/nand/nand_if.m		optional nand
-dev/nand/nandsim.c		optional nandsim nand
-dev/nand/nandsim_chip.c		optional nandsim nand
-dev/nand/nandsim_ctrl.c		optional nandsim nand
-dev/nand/nandsim_log.c		optional nandsim nand
-dev/nand/nandsim_swap.c		optional nandsim nand
-dev/nand/nfc_if.m		optional nand
 dev/netmap/if_ptnet.c		optional netmap inet
 dev/netmap/netmap.c		optional netmap
 dev/netmap/netmap_bdg.c		optional netmap
@@ -3499,20 +3484,6 @@ fs/msdosfs/msdosfs_iconv.c	optional msdosfs_iconv
 fs/msdosfs/msdosfs_lookup.c	optional msdosfs
 fs/msdosfs/msdosfs_vfsops.c	optional msdosfs
 fs/msdosfs/msdosfs_vnops.c	optional msdosfs
-fs/nandfs/bmap.c		optional nandfs
-fs/nandfs/nandfs_alloc.c	optional nandfs
-fs/nandfs/nandfs_bmap.c		optional nandfs
-fs/nandfs/nandfs_buffer.c	optional nandfs
-fs/nandfs/nandfs_cleaner.c	optional nandfs
-fs/nandfs/nandfs_cpfile.c	optional nandfs
-fs/nandfs/nandfs_dat.c		optional nandfs
-fs/nandfs/nandfs_dir.c		optional nandfs
-fs/nandfs/nandfs_ifile.c	optional nandfs
-fs/nandfs/nandfs_segment.c	optional nandfs
-fs/nandfs/nandfs_subr.c		optional nandfs
-fs/nandfs/nandfs_sufile.c	optional nandfs
-fs/nandfs/nandfs_vfsops.c	optional nandfs
-fs/nandfs/nandfs_vnops.c	optional nandfs
 fs/nfs/nfs_commonkrpc.c		optional nfscl | nfsd
 fs/nfs/nfs_commonsubs.c		optional nfscl | nfsd
 fs/nfs/nfs_commonport.c		optional nfscl | nfsd
@@ -3600,7 +3571,7 @@ geom/geom_disk.c		standard
 geom/geom_dump.c		standard
 geom/geom_event.c		standard
 geom/geom_fox.c			optional geom_fox
-geom/geom_flashmap.c		optional fdt cfi | fdt nand | fdt mx25l | mmcsd | fdt n25q | fdt at45d
+geom/geom_flashmap.c		optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d
 geom/geom_io.c			standard
 geom/geom_kern.c		standard
 geom/geom_map.c			optional geom_map

Modified: head/sys/conf/files.powerpc
==============================================================================
--- head/sys/conf/files.powerpc	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/conf/files.powerpc	Tue Jun 25 04:50:09 2019	(r349352)
@@ -43,8 +43,6 @@ dev/iicbus/max6690.c		optional	max6690 powermac
 dev/iicbus/ofw_iicbus.c		optional	iicbus aim
 dev/ipmi/ipmi.c			optional	ipmi
 dev/ipmi/ipmi_opal.c		optional	powernv ipmi
-dev/nand/nfc_fsl.c		optional	nand mpc85xx
-dev/nand/nfc_rb.c		optional	nand mpc85xx
 # Most ofw stuff below is brought in by conf/files for options FDT, but
 # we always want it, even on non-FDT platforms.
 dev/fdt/simplebus.c		standard

Modified: head/sys/conf/kern.opts.mk
==============================================================================
--- head/sys/conf/kern.opts.mk	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/conf/kern.opts.mk	Tue Jun 25 04:50:09 2019	(r349352)
@@ -52,7 +52,6 @@ __DEFAULT_YES_OPTIONS = \
 __DEFAULT_NO_OPTIONS = \
     EXTRA_TCP_STACKS \
     KERNEL_RETPOLINE \
-    NAND \
     OFED \
     RATELIMIT
 

Modified: head/sys/fs/smbfs/smbfs_io.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_io.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/fs/smbfs/smbfs_io.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -375,6 +375,9 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct uc
 		 */
 		if (error == EINTR
 		    || (!error && (bp->b_flags & B_NEEDCOMMIT))) {
+			int s;
+
+			s = splbio();
 			bp->b_flags &= ~(B_INVAL|B_NOCACHE);
 			if ((bp->b_flags & B_ASYNC) == 0)
 			    bp->b_flags |= B_EINTR;
@@ -384,6 +387,7 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct uc
 			}
 			if ((bp->b_flags & B_ASYNC) == 0)
 			    bp->b_flags |= B_EINTR;
+			splx(s);
 		} else {
 			if (error) {
 				bp->b_ioflags |= BIO_ERROR;

Modified: head/sys/geom/geom_flashmap.c
==============================================================================
--- head/sys/geom/geom_flashmap.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/geom/geom_flashmap.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -43,8 +43,6 @@ __FBSDID("$FreeBSD$");
 #include <geom/geom_flashmap.h>
 #include <geom/geom_slice.h>
 
-#include <dev/nand/nand_dev.h>
-
 struct g_flashmap_slice {
 	off_t		sl_start;
 	off_t		sl_end;
@@ -65,7 +63,6 @@ static struct {
 	{ "MMC::device",	NULL }
 };
 
-static g_ioctl_t g_flashmap_ioctl;
 static g_taste_t g_flashmap_taste;
 
 static int g_flashmap_load(device_t dev, struct g_provider *pp,
@@ -127,26 +124,6 @@ g_flashmap_modify(struct g_flashmap *gfp, struct g_geo
 	return (0);
 }
 
-static int
-g_flashmap_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag,
-    struct thread *td)
-{
-	struct g_consumer *cp;
-	struct g_geom *gp;
-
-	if (cmd != NAND_IO_GET_CHIP_PARAM)
-		return (ENOIOCTL);
-
-	cp = LIST_FIRST(&pp->geom->consumer);
-	if (cp == NULL)
-		return (ENOIOCTL);
-	gp = cp->provider->geom;
-	if (gp->ioctl == NULL)
-		return (ENOIOCTL);
-
-	return (gp->ioctl(cp->provider, cmd, data, fflag, td));
-}
-
 static struct g_geom *
 g_flashmap_taste(struct g_class *mp, struct g_provider *pp, int flags)
 {
@@ -245,7 +222,6 @@ static struct g_class g_flashmap_class = {
 	.name = FLASHMAP_CLASS_NAME,
 	.version = G_VERSION,
 	.taste = g_flashmap_taste,
-	.ioctl = g_flashmap_ioctl,
 };
 
 DECLARE_GEOM_CLASS(g_flashmap_class, g_flashmap);

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/modules/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -255,8 +255,6 @@ SUBDIR=	\
 	${_mwlfw} \
 	mxge \
 	my \
-	${_nandfs} \
-	${_nandsim} \
 	${_nctgpio} \
 	${_ndis} \
 	${_netgraph} \
@@ -487,11 +485,6 @@ _mthca=		mthca
 _mlx4ib=	mlx4ib
 _mlx5ib=	mlx5ib
 .endif
-.endif
-
-.if ${MK_NAND} != "no" || defined(ALL_MODULES)
-_nandfs=	nandfs
-_nandsim=	nandsim
 .endif
 
 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/sys/sys/param.h	Tue Jun 25 04:50:09 2019	(r349352)
@@ -60,7 +60,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300033	/* Master, propagated to newvers */
+#define __FreeBSD_version 1300034	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

Modified: head/targets/pseudo/userland/Makefile.depend
==============================================================================
--- head/targets/pseudo/userland/Makefile.depend	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/targets/pseudo/userland/Makefile.depend	Tue Jun 25 04:50:09 2019	(r349352)
@@ -772,15 +772,6 @@ DIRDEPS+= \
 DIRDEPS+=	usr.sbin/efidp
 .endif
 
-.if ${MK_NAND} != "no"
-DIRDEPS+= \
-	sbin/nandfs \
-	sbin/newfs_nandfs \
-	usr.sbin/nandsim \
-	usr.sbin/nandtool \
-
-.endif
-
 DIRDEPS.amd64= \
 	sbin/bsdlabel \
 	sbin/fdisk \

Modified: head/targets/pseudo/userland/lib/Makefile.depend
==============================================================================
--- head/targets/pseudo/userland/lib/Makefile.depend	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/targets/pseudo/userland/lib/Makefile.depend	Tue Jun 25 04:50:09 2019	(r349352)
@@ -215,10 +215,6 @@ DIRDEPS+= \
 DIRDEPS+= stand/libsa32
 .endif
 
-.if ${MK_NAND} != "no"
-DIRDEPS+= lib/libnandfs
-.endif
-
 .if ${MK_CASPER} != "no"
 DIRDEPS+= \
 	lib/libcasper/libcasper \

Modified: head/usr.bin/vtfontcvt/vtfontcvt.c
==============================================================================
--- head/usr.bin/vtfontcvt/vtfontcvt.c	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/usr.bin/vtfontcvt/vtfontcvt.c	Tue Jun 25 04:50:09 2019	(r349352)
@@ -335,11 +335,9 @@ parse_bdf(FILE *fp, unsigned int map_idx)
 					break;
 				}
 			}
-		} else if (strncmp(ln, "FONTBOUNDINGBOX ", 16) == 0) {
-			if (sscanf(ln + 16, "%d %d %d %d", &fbbw, &fbbh, &fbbox,
-			    &fbboy) != 4)
-				errx(1, "invalid FONTBOUNDINGBOX at line %u",
-				    linenum);
+		} else if (strncmp(ln, "FONTBOUNDINGBOX ", 16) == 0 &&
+		    sscanf(ln + 16, "%d %d %d %d", &fbbw, &fbbh, &fbbox,
+		    &fbboy) == 4) {
 			set_width(fbbw);
 			set_height(fbbh);
 			break;
@@ -355,9 +353,8 @@ parse_bdf(FILE *fp, unsigned int map_idx)
 		linenum++;
 		ln[length - 1] = '\0';
 
-		if (strncmp(ln, "DWIDTH ", 7) == 0) {
-			if (sscanf(ln + 7, "%d %d", &dwidth, &dwy) != 2)
-				errx(1, "invalid DWIDTH at line %u", linenum);
+		if (strncmp(ln, "DWIDTH ", 7) == 0 &&
+		    sscanf(ln + 7, "%d %d", &dwidth, &dwy) == 2) {
 			if (dwy != 0 || (dwidth != fbbw && dwidth * 2 != fbbw))
 				errx(1, "bitmap with unsupported DWIDTH %d %d at line %u",
 				    dwidth, dwy, linenum);

Modified: head/usr.sbin/Makefile
==============================================================================
--- head/usr.sbin/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/usr.sbin/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -166,8 +166,6 @@ SUBDIR.${MK_NS_CACHING}+=	nscd
 SUBDIR.${MK_LPR}+=	lpr
 SUBDIR.${MK_MAN_UTILS}+=	manctl
 SUBDIR.${MK_MLX5TOOL}+=	mlx5tool
-SUBDIR.${MK_NAND}+=	nandsim
-SUBDIR.${MK_NAND}+=	nandtool
 SUBDIR.${MK_NETGRAPH}+=	flowctl
 SUBDIR.${MK_NETGRAPH}+=	ngctl
 SUBDIR.${MK_NETGRAPH}+=	nghook

Modified: head/usr.sbin/bhyve/Makefile
==============================================================================
--- head/usr.sbin/bhyve/Makefile	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/usr.sbin/bhyve/Makefile	Tue Jun 25 04:50:09 2019	(r349352)
@@ -16,7 +16,6 @@ BHYVE_SYSDIR?=${SRCTOP}
 SRCS=	\
 	atkbdc.c		\
 	acpi.c			\
-	audio.c			\
 	bhyvegc.c		\
 	bhyverun.c		\
 	block_if.c		\
@@ -28,7 +27,6 @@ SRCS=	\
 	dbgport.c		\
 	fwctl.c			\
 	gdb.c			\
-	hda_codec.c		\
 	inout.c			\
 	ioapic.c		\
 	mem.c			\
@@ -38,7 +36,6 @@ SRCS=	\
 	pci_ahci.c		\
 	pci_e82545.c		\
 	pci_emul.c		\
-	pci_hda.c		\
 	pci_fbuf.c		\
 	pci_hostbridge.c	\
 	pci_irq.c		\

Modified: head/usr.sbin/bhyve/bhyve.8
==============================================================================
--- head/usr.sbin/bhyve/bhyve.8	Tue Jun 25 02:35:22 2019	(r349351)
+++ head/usr.sbin/bhyve/bhyve.8	Tue Jun 25 04:50:09 2019	(r349352)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 24, 2019
+.Dd December 11, 2018
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -248,8 +248,6 @@ Raw framebuffer device attached to VNC server.
 eXtensible Host Controller Interface (xHCI) USB controller.
 .It Li nvme
 NVM Express (NVMe) controller.
-.It Li hda
-High Definition Audio Controller.
 .El
 .It Op Ar conf
 This optional parameter describes the backend for device emulations.
@@ -476,16 +474,6 @@ Max number of concurrent I/O requests.
 Sector size (defaults to blockif sector size).
 .It Li ser
 Serial number with maximum 20 characters.
-.El
-.Pp
-HD Audio devices:
-.Bl -tag -width 10n
-.It Li play
-Playback device, typically
-.Ar /dev/dsp0 .
-.It Li rec
-Recording device, typically
-.Ar /dev/dsp0 .
 .El
 .El
 .It Fl S



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906250450.x5P4o9oR015946>