svn commit: r328962 - in user/jeff/numa: . bin/sh contrib/gcc/config/mips contrib/gdb/gdb/tui contrib/libreadline etc etc/rc.d gnu/lib gnu/lib/libreadline gnu/usr.bin/gdb gnu/usr.bin/gdb/gdb gnu/us...

Jeff Roberson jeff at FreeBSD.org
Wed Feb 7 00:50:45 UTC 2018


Author: jeff
Date: Wed Feb  7 00:50:40 2018
New Revision: 328962
URL: https://svnweb.freebsd.org/changeset/base/328962

Log:
  Merge from head.

Added:
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_sprom.c
     - copied unchanged from r328957, head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_sprom.c
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_sprom.h
     - copied unchanged from r328957, head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_sprom.h
  user/jeff/numa/sys/i386/i386/sigtramp.s
     - copied unchanged from r328957, head/sys/i386/i386/sigtramp.s
Deleted:
  user/jeff/numa/contrib/libreadline/
  user/jeff/numa/gnu/lib/libreadline/
  user/jeff/numa/gnu/usr.bin/gdb/gdbtui/
  user/jeff/numa/sys/dev/bwn/if_bwn_bhnd.c
  user/jeff/numa/sys/dev/bwn/if_bwn_chipid.h
  user/jeff/numa/sys/dev/bwn/if_bwn_siba.c
  user/jeff/numa/sys/dev/bwn/if_bwn_siba.h
  user/jeff/numa/sys/dev/bwn/if_bwn_siba_compat.c
  user/jeff/numa/sys/dev/bwn/if_bwn_siba_compat.h
  user/jeff/numa/sys/dev/siba/
  user/jeff/numa/sys/modules/bwn_pci/
  user/jeff/numa/sys/modules/siba_bwn/
Modified:
  user/jeff/numa/Makefile
  user/jeff/numa/Makefile.inc1
  user/jeff/numa/ObsoleteFiles.inc
  user/jeff/numa/bin/sh/mkbuiltins
  user/jeff/numa/bin/sh/mktokens
  user/jeff/numa/contrib/gcc/config/mips/mips.h
  user/jeff/numa/contrib/gdb/gdb/tui/tui-io.c
  user/jeff/numa/etc/rc
  user/jeff/numa/etc/rc.d/cleanvar
  user/jeff/numa/gnu/lib/Makefile
  user/jeff/numa/gnu/usr.bin/gdb/Makefile
  user/jeff/numa/gnu/usr.bin/gdb/Makefile.inc
  user/jeff/numa/gnu/usr.bin/gdb/gdb/Makefile
  user/jeff/numa/gnu/usr.bin/gdb/kgdb/Makefile
  user/jeff/numa/sbin/etherswitchcfg/etherswitchcfg.c
  user/jeff/numa/share/man/man4/bwn.4
  user/jeff/numa/share/man/man7/arch.7
  user/jeff/numa/share/man/man8/rc.subr.8
  user/jeff/numa/share/man/man9/bus_map_resource.9
  user/jeff/numa/share/mk/src.libnames.mk
  user/jeff/numa/stand/common/load_elf_obj.c
  user/jeff/numa/sys/cam/ata/ata_da.c
  user/jeff/numa/sys/cam/ata/ata_pmp.c
  user/jeff/numa/sys/cam/ata/ata_xpt.c
  user/jeff/numa/sys/cam/cam_periph.c
  user/jeff/numa/sys/cam/cam_periph.h
  user/jeff/numa/sys/cam/ctl/scsi_ctl.c
  user/jeff/numa/sys/cam/mmc/mmc_da.c
  user/jeff/numa/sys/cam/mmc/mmc_xpt.c
  user/jeff/numa/sys/cam/nvme/nvme_da.c
  user/jeff/numa/sys/cam/nvme/nvme_xpt.c
  user/jeff/numa/sys/cam/scsi/scsi_cd.c
  user/jeff/numa/sys/cam/scsi/scsi_da.c
  user/jeff/numa/sys/cam/scsi/scsi_enc.c
  user/jeff/numa/sys/cam/scsi/scsi_pass.c
  user/jeff/numa/sys/cam/scsi/scsi_pt.c
  user/jeff/numa/sys/cam/scsi/scsi_sa.c
  user/jeff/numa/sys/cam/scsi/scsi_sg.c
  user/jeff/numa/sys/cam/scsi/scsi_xpt.c
  user/jeff/numa/sys/conf/files
  user/jeff/numa/sys/conf/files.i386
  user/jeff/numa/sys/dev/bhnd/bhnd_ids.h
  user/jeff/numa/sys/dev/bwn/if_bwn.c
  user/jeff/numa/sys/dev/bwn/if_bwn_misc.h
  user/jeff/numa/sys/dev/bwn/if_bwn_pci.c
  user/jeff/numa/sys/dev/bwn/if_bwn_phy_common.c
  user/jeff/numa/sys/dev/bwn/if_bwn_phy_common.h
  user/jeff/numa/sys/dev/bwn/if_bwn_phy_g.c
  user/jeff/numa/sys/dev/bwn/if_bwn_phy_lp.c
  user/jeff/numa/sys/dev/bwn/if_bwn_phy_n.c
  user/jeff/numa/sys/dev/bwn/if_bwn_util.c
  user/jeff/numa/sys/dev/bwn/if_bwnreg.h
  user/jeff/numa/sys/dev/bwn/if_bwnvar.h
  user/jeff/numa/sys/dev/etherswitch/arswitch/arswitch.c
  user/jeff/numa/sys/dev/etherswitch/arswitch/arswitchreg.h
  user/jeff/numa/sys/dev/etherswitch/arswitch/arswitchvar.h
  user/jeff/numa/sys/dev/etherswitch/etherswitch.h
  user/jeff/numa/sys/dev/mpr/mpr.c
  user/jeff/numa/sys/dev/mpr/mpr_sas.c
  user/jeff/numa/sys/dev/mpr/mpr_user.c
  user/jeff/numa/sys/dev/mpr/mprvar.h
  user/jeff/numa/sys/dev/mps/mps.c
  user/jeff/numa/sys/dev/mps/mps_sas.c
  user/jeff/numa/sys/dev/mps/mps_user.c
  user/jeff/numa/sys/dev/mps/mpsvar.h
  user/jeff/numa/sys/fs/ext2fs/ext2_lookup.c
  user/jeff/numa/sys/fs/tmpfs/tmpfs_subr.c
  user/jeff/numa/sys/geom/mirror/g_mirror.c
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.h
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_ppr.c
  user/jeff/numa/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_tables.c
  user/jeff/numa/sys/i386/i386/locore.s
  user/jeff/numa/sys/kern/imgact_elf.c
  user/jeff/numa/sys/kern/kern_malloc.c
  user/jeff/numa/sys/kern/link_elf_obj.c
  user/jeff/numa/sys/kern/subr_clock.c
  user/jeff/numa/sys/kern/subr_fattime.c
  user/jeff/numa/sys/kern/subr_vmem.c
  user/jeff/numa/sys/kern/vfs_bio.c
  user/jeff/numa/sys/mips/mips/machdep.c
  user/jeff/numa/sys/modules/Makefile
  user/jeff/numa/sys/modules/bwn/Makefile
  user/jeff/numa/sys/modules/dtb/allwinner/Makefile
  user/jeff/numa/sys/sys/bus_dma.h
  user/jeff/numa/sys/sys/clock.h
  user/jeff/numa/sys/ufs/ffs/ffs_alloc.c
  user/jeff/numa/sys/ufs/ffs/ffs_vfsops.c
  user/jeff/numa/sys/ufs/ufs/ufs_vnops.c
  user/jeff/numa/sys/vm/uma.h
  user/jeff/numa/sys/vm/uma_core.c
  user/jeff/numa/sys/vm/uma_int.h
  user/jeff/numa/sys/vm/vm_init.c
  user/jeff/numa/sys/vm/vm_page.c
  user/jeff/numa/sys/vm/vm_page.h
  user/jeff/numa/sys/vm/vm_radix.c
  user/jeff/numa/targets/pseudo/userland/gnu/Makefile.depend
  user/jeff/numa/tools/build/mk/OptionalObsoleteFiles.inc
  user/jeff/numa/usr.bin/find/Makefile
  user/jeff/numa/usr.bin/find/find.h
  user/jeff/numa/usr.bin/find/function.c
  user/jeff/numa/usr.bin/find/ls.c
  user/jeff/numa/usr.bin/find/operator.c
  user/jeff/numa/usr.bin/find/option.c
Directory Properties:
  user/jeff/numa/   (props changed)
  user/jeff/numa/contrib/gcc/   (props changed)
  user/jeff/numa/contrib/gdb/   (props changed)
  user/jeff/numa/gnu/lib/   (props changed)
  user/jeff/numa/gnu/usr.bin/gdb/   (props changed)

Modified: user/jeff/numa/Makefile
==============================================================================
--- user/jeff/numa/Makefile	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/Makefile	Wed Feb  7 00:50:40 2018	(r328962)
@@ -352,7 +352,7 @@ _guard: .PHONY
 	@false
 
 STARTTIME!= LC_ALL=C date
-CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo
+CHECK_TIME!= cmp=`mktemp`; find ${.CURDIR}/sys/sys/param.h -newer "$$cmp" && rm "$$cmp"; echo
 .if !empty(CHECK_TIME)
 .error check your date/time: ${STARTTIME}
 .endif

Modified: user/jeff/numa/Makefile.inc1
==============================================================================
--- user/jeff/numa/Makefile.inc1	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/Makefile.inc1	Wed Feb  7 00:50:40 2018	(r328962)
@@ -463,7 +463,7 @@ TMPPATH=	${STRICTTMPPATH}:${PATH}
 # when in the middle of installing over this system.
 #
 .if make(distributeworld) || make(installworld) || make(stageworld)
-INSTALLTMP!=	/usr/bin/mktemp -d -u -t install
+INSTALLTMP!=	mktemp -d -u -t install
 .endif
 
 .if make(stagekernel) || make(distributekernel)

Modified: user/jeff/numa/ObsoleteFiles.inc
==============================================================================
--- user/jeff/numa/ObsoleteFiles.inc	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/ObsoleteFiles.inc	Wed Feb  7 00:50:40 2018	(r328962)
@@ -38,10 +38,11 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180206: remove gdbtui
+OLD_FILES+=usr/bin/gdbtui
 # 20180201: Obsolete forth files
 OLD_FILES+=boot/efi.4th
 OLD_FILES+=boot/pcibios.4th
-
 # 20180114: new clang import which bumps version from 5.0.1 to 6.0.0.
 OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h
 OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/asan_interface.h

Modified: user/jeff/numa/bin/sh/mkbuiltins
==============================================================================
--- user/jeff/numa/bin/sh/mkbuiltins	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/bin/sh/mkbuiltins	Wed Feb  7 00:50:40 2018	(r328962)
@@ -34,7 +34,7 @@
 #	@(#)mkbuiltins	8.2 (Berkeley) 5/4/95
 # $FreeBSD$
 
-temp=`/usr/bin/mktemp -t ka`
+temp=`mktemp -t ka`
 havehist=1
 if [ "X$1" = "X-h" ]; then
 	havehist=0

Modified: user/jeff/numa/bin/sh/mktokens
==============================================================================
--- user/jeff/numa/bin/sh/mktokens	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/bin/sh/mktokens	Wed Feb  7 00:50:40 2018	(r328962)
@@ -38,7 +38,7 @@
 # token marks the end of a list.  The third column is the name to print in
 # error messages.
 
-temp=`/usr/bin/mktemp -t ka`
+temp=`mktemp -t ka`
 cat > $temp <<\!
 TEOF	1	end of file
 TNL	0	newline

Modified: user/jeff/numa/contrib/gcc/config/mips/mips.h
==============================================================================
--- user/jeff/numa/contrib/gcc/config/mips/mips.h	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/contrib/gcc/config/mips/mips.h	Wed Feb  7 00:50:40 2018	(r328962)
@@ -2721,6 +2721,7 @@ while (0)
 	nop\n\
 1:	.cpload $31\n\
 	.set reorder\n\
+	.local " USER_LABEL_PREFIX #FUNC "\n\
 	jal " USER_LABEL_PREFIX #FUNC "\n\
 	" TEXT_SECTION_ASM_OP);
 #endif /* Switch to #elif when we're no longer limited by K&R C.  */
@@ -2733,6 +2734,7 @@ while (0)
 	nop\n\
 1:	.set reorder\n\
 	.cpsetup $31, $2, 1b\n\
+	.local " USER_LABEL_PREFIX #FUNC "\n\
 	jal " USER_LABEL_PREFIX #FUNC "\n\
 	" TEXT_SECTION_ASM_OP);
 #endif

Modified: user/jeff/numa/contrib/gdb/gdb/tui/tui-io.c
==============================================================================
--- user/jeff/numa/contrib/gdb/gdb/tui/tui-io.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/contrib/gdb/gdb/tui/tui-io.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -397,7 +397,7 @@ static void
 tui_rl_display_match_list (char **matches, int len, int max)
 {
   typedef int QSFUNC (const void *, const void *);
-  extern int _rl_qsort_string_compare (const void*, const void*);
+  extern int _rl_qsort_string_compare (char **, char **);
   extern int _rl_print_completions_horizontally;
   
   int count, limit, printed_len;

Modified: user/jeff/numa/etc/rc
==============================================================================
--- user/jeff/numa/etc/rc	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/etc/rc	Wed Feb  7 00:50:40 2018	(r328962)
@@ -141,10 +141,10 @@ if [ -e ${firstboot_sentinel} ]; then
 	if [ -e ${firstboot_sentinel}-reboot ]; then
 		chflags -R 0 ${firstboot_sentinel}-reboot
 		rm -rf ${firstboot_sentinel}-reboot
-    		checkyesno root_rw_mount && mount -ur /
+    		checkyesno root_rw_mount || mount -ur /
 		kill -INT 1
 	fi
-    	checkyesno root_rw_mount && mount -ur /
+    	checkyesno root_rw_mount || mount -ur /
 fi
 
 echo ''

Modified: user/jeff/numa/etc/rc.d/cleanvar
==============================================================================
--- user/jeff/numa/etc/rc.d/cleanvar	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/etc/rc.d/cleanvar	Wed Feb  7 00:50:40 2018	(r328962)
@@ -19,34 +19,6 @@ stop_cmd=":"
 extra_commands="reload"
 reload_cmd="${name}_start"
 
-purgedir()
-{
-	local dir file
-
-	if [ $# -eq 0 ]; then
-		purgedir .
-	else
-		for dir
-		do
-		(
-			cd "$dir" && for file in .* *
-			do
-				# Skip over logging sockets
-				[ -S "$file" -a "$file" = "log" ] && continue
-				[ -S "$file" -a "$file" = "logpriv" ] && continue
-				[ ."$file" = .. -o ."$file" = ... ] && continue
-				if [ -d "$file" -a ! -L "$file" ]
-				then
-					purgedir "$file"
-				else
-					rm -f -- "$file"
-				fi
-			done
-		)
-		done
-	fi
-}
-
 cleanvar_prestart()
 {
 	# These files must be removed only the first time this script is run
@@ -58,14 +30,17 @@ cleanvar_prestart()
 cleanvar_start()
 {
 	if [ -d /var/run -a ! -f /var/run/clean_var ]; then
-		purgedir /var/run
+		# Skip over logging sockets
+		find /var/run \( -type f -or -type s ! -name log -and ! -name logpriv \) -delete
 		>/var/run/clean_var
 	fi
 	if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
-		purgedir /var/spool/lock
+		find /var/spool/lock -type f -delete
 		>/var/spool/lock/clean_var
 	fi
-	rm -rf /var/spool/uucp/.Temp/*
+	if [ -d /var/spool/uucp/.Temp ]; then
+		find /var/spool/uucp/.Temp -delete
+	fi
 }
 
 load_rc_config $name

Modified: user/jeff/numa/gnu/lib/Makefile
==============================================================================
--- user/jeff/numa/gnu/lib/Makefile	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/gnu/lib/Makefile	Wed Feb  7 00:50:40 2018	(r328962)
@@ -7,7 +7,6 @@ SUBDIR.${MK_DIALOG}+=	libdialog
 SUBDIR.${MK_GCC}+=	libgcov libgomp
 SUBDIR.${MK_SSP}+=	libssp
 SUBDIR.${MK_TESTS}+=	tests
-SUBDIR.${MK_GDB}+=	libreadline
 
 .if ${MK_GNU_GREP} != "no" || ${MK_GNU_GREP_COMPAT} != "no" || \
     ${MK_GDB} != "no"

Modified: user/jeff/numa/gnu/usr.bin/gdb/Makefile
==============================================================================
--- user/jeff/numa/gnu/usr.bin/gdb/Makefile	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/gnu/usr.bin/gdb/Makefile	Wed Feb  7 00:50:40 2018	(r328962)
@@ -5,8 +5,6 @@
 SUBDIR=	libgdb gdb kgdb
 
 .if ${MK_GDB_LIBEXEC} == "no"
-SUBDIR+= gdbtui
-
 .if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c)
 SUBDIR+=gdbserver
 .endif

Modified: user/jeff/numa/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- user/jeff/numa/gnu/usr.bin/gdb/Makefile.inc	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/gnu/usr.bin/gdb/Makefile.inc	Wed Feb  7 00:50:40 2018	(r328962)
@@ -13,11 +13,9 @@ BMAKE_BU= ${BMAKE_ROOT}/binutils
 
 CNTRB_BU= ${SRCTOP}/contrib/binutils
 CNTRB_GDB= ${SRCTOP}/contrib/gdb
-CNTRB_RL= ${SRCTOP}/contrib/libreadline
 
 OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils
 OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb
-OBJ_RL= ${OBJTOP}/gnu/lib/libreadline/readline
 
 # These assignments duplicate much of the functionality of
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
@@ -37,7 +35,7 @@ GDB_CROSS_DEBUGGER=
 .PATH:	${CNTRB_GDB}/gdb ${CNTRB_GDB}/gdb/cli ${CNTRB_GDB}/gdb/mi	\
 	${CNTRB_GDB}/gdb/signals ${CNTRB_GDB}/gdb/tui ${TARGET_SUBDIR}
 
-CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1 -DTUI=1
+CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1
 CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\"
 CFLAGS+= -I.
 CFLAGS+= -I${TARGET_SUBDIR}
@@ -47,7 +45,7 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config
 CFLAGS+= -I${CNTRB_BU}/include
 CFLAGS+= -I${CNTRB_GDB}/include
 CFLAGS+= -I${CNTRB_BU}/bfd
-CFLAGS+= -I${OBJ_RL:H}
+CFLAGS+= -I${SRCTOP}/lib/libedit/edit
 
 GENSRCS+= nm.h tm.h
 

Modified: user/jeff/numa/gnu/usr.bin/gdb/gdb/Makefile
==============================================================================
--- user/jeff/numa/gnu/usr.bin/gdb/gdb/Makefile	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/gnu/usr.bin/gdb/gdb/Makefile	Wed Feb  7 00:50:40 2018	(r328962)
@@ -13,7 +13,7 @@ LDFLAGS+= -Wl,-E
 
 DPADD=	${GDBLIBS} ${BULIBS}
 LDADD=	${GDBLIBS} ${BULIBS}
-LIBADD+=	m readline ncursesw gnuregex
+LIBADD+=	m edit ncursesw gnuregex
 
 .include <bsd.prog.mk>
 CFLAGS+=	-DDEBUGDIR=\"${DEBUGDIR}\"

Modified: user/jeff/numa/gnu/usr.bin/gdb/kgdb/Makefile
==============================================================================
--- user/jeff/numa/gnu/usr.bin/gdb/kgdb/Makefile	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/gnu/usr.bin/gdb/kgdb/Makefile	Wed Feb  7 00:50:40 2018	(r328962)
@@ -10,6 +10,6 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
 
 DPADD=	${GDBLIBS} ${BULIBS}
 LDADD=	${GDBLIBS} ${BULIBS}
-LIBADD+=	m readline ncursesw gnuregex kvm
+LIBADD+=	m edit ncursesw gnuregex kvm
 
 .include <bsd.prog.mk>

Modified: user/jeff/numa/sbin/etherswitchcfg/etherswitchcfg.c
==============================================================================
--- user/jeff/numa/sbin/etherswitchcfg/etherswitchcfg.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sbin/etherswitchcfg/etherswitchcfg.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -556,6 +556,13 @@ print_config(struct cfg *cfg)
 			printf("none\n");
 		}
 	}
+
+	/* Print switch MAC address. */
+	if (cfg->conf.cmd & ETHERSWITCH_CONF_SWITCH_MACADDR) {
+		printf("%s: Switch MAC address: %s\n",
+		    c,
+		    ether_ntoa(&cfg->conf.switch_macaddr));
+	}
 }
 
 static void

Modified: user/jeff/numa/share/man/man4/bwn.4
==============================================================================
--- user/jeff/numa/share/man/man4/bwn.4	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/share/man/man4/bwn.4	Wed Feb  7 00:50:40 2018	(r328962)
@@ -24,26 +24,29 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 11, 2015
+.Dd December 16, 2017
 .Dt BWN 4
 .Os
 .Sh NAME
 .Nm bwn
-.Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver
+.Nd Broadcom BCM43xx SoftMAC IEEE 802.11 wireless network driver
 .Sh SYNOPSIS
-To compile this driver into the kernel,
-place the following lines in your
-kernel configuration file:
+To compile this driver into the kernel, add the following lines to the kernel
+configuration file:
 .Bd -ragged -offset indent
-.Cd "device siba_bwn"
 .Cd "device bwn"
+.Cd "device bhnd"
+.Cd "device bhndb"
+.Cd "device bhndb_pci"
+.Cd "device bcma"
+.Cd "device siba"
+.Cd "device gpio"
 .Cd "device wlan"
 .Cd "device wlan_amrr"
 .Cd "device firmware"
 .Ed
 .Pp
-Alternatively, to load the driver as a
-module at boot time, place the following line in
+To load the driver as a module at boot, add the following lines to
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 if_bwn_load="YES"
@@ -122,9 +125,6 @@ Tunables can be set at the
 prompt before booting the kernel or stored in
 .Xr loader.conf 5 .
 .Bl -tag -width indent
-.It Va hw.bwn.msi_disable
-This tunable disables MSI support on the hardware.
-The default value is 0.
 .It Va hw.bwn.usedma
 This tunable enables DMA operations on the hardware.
 If the value is 0, PIO mode would be used.
@@ -132,10 +132,14 @@ The default value is 1.
 .El
 .Sh SEE ALSO
 .Xr arp 4 ,
+.Xr bcma 4 ,
+.Xr bhnd 4 ,
+.Xr bhndb 4 ,
 .Xr bwi 4 ,
 .Xr cardbus 4 ,
 .Xr intro 4 ,
 .Xr pci 4 ,
+.Xr siba 4 ,
 .Xr wlan 4 ,
 .Xr wlan_amrr 4 ,
 .Xr ifconfig 8 ,
@@ -145,12 +149,20 @@ The
 .Nm
 driver first appeared in
 .Fx 8.1 .
+The driver was updated to support the common Broadcom
+.Xr bhnd 4
+bus interface in
+.Fx 12.0 .
 .Sh AUTHORS
 .An -nosplit
 The
 .Nm
 driver was written by
 .An Weongyo Jeong Aq Mt weongyo at FreeBSD.org .
+Support for
+.Xr bhnd 4
+was added by
+.An Landon Fuller Aq Mt landonf at FreeBSD.org .
 .\".Sh BUGS
 .\"Some card based on the BCM4306 and BCM4309 chips do not work properly
 .\"on channel 1, 2 and 3.

Modified: user/jeff/numa/share/man/man7/arch.7
==============================================================================
--- user/jeff/numa/share/man/man7/arch.7	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/share/man/man7/arch.7	Wed Feb  7 00:50:40 2018	(r328962)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 31, 2018
+.Dd February 5, 2018
 .Dt ARCH 7
 .Os
 .Sh NAME
@@ -416,7 +416,7 @@ imply little endian.
 If we ever were to support the so-called x32 ABI (using 32-bit
 pointers on the amd64 architecture), it would most likely be encoded
 as amd64-x32.
-It is unfortunate that amd64 speifies the 64-bit evolution of the x86
+It is unfortunate that amd64 specifies the 64-bit evolution of the x86
 platform (it matches the 'first rule') as everybody else uses x86_64.
 There is no standard name for the processor: each OS selects its own
 conventions.

Modified: user/jeff/numa/share/man/man8/rc.subr.8
==============================================================================
--- user/jeff/numa/share/man/man8/rc.subr.8	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/share/man/man8/rc.subr.8	Wed Feb  7 00:50:40 2018	(r328962)
@@ -551,7 +551,7 @@ is mounted.
 A list of environment variables to run
 .Va command
 with.
-This will be passed as arguments to
+This will be passed as arguments to the
 .Xr env 1
 utility.
 .It Va ${name}_fib
@@ -583,6 +583,13 @@ as.
 Only supported after
 .Pa /usr
 is mounted.
+.It Va ${name}_limits
+.Xr limits 1
+to apply to
+.Va command .
+This will be passed as arguments to the
+.Xr limits 1
+utility.
 .It Va ${name}_oomprotect
 .Xr protect 1
 .Va command

Modified: user/jeff/numa/share/man/man9/bus_map_resource.9
==============================================================================
--- user/jeff/numa/share/man/man9/bus_map_resource.9	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/share/man/man9/bus_map_resource.9	Wed Feb  7 00:50:40 2018	(r328962)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 20, 2016
+.Dd February 5, 2018
 .Dt BUS_MAP_RESOURCE 9
 .Os
 .Sh NAME
@@ -143,16 +143,16 @@ reads the first 32-bit word:
 .Bd -literal
 	struct resource *r;
 	struct resource_map map;
-	struct resource_map_args args;
+	struct resource_map_request req;
 	uint32_t val;
 	int rid;
 
 	rid = PCIR_BAR(0);
 	r = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE |
 	    RF_UNMAPPED);
-	resource_init_map_request(&args);
-	args.memattr = VM_MEMATTR_WRITE_COMBINING;
-	bus_map_resource(dev, SYS_RES_MEMORY, r, &args, &map);
+	resource_init_map_request(&req);
+	req.memattr = VM_MEMATTR_WRITE_COMBINING;
+	bus_map_resource(dev, SYS_RES_MEMORY, r, &req, &map);
 	val = bus_read_4(&map, 0);
 .Ed
 .Sh SEE ALSO

Modified: user/jeff/numa/share/mk/src.libnames.mk
==============================================================================
--- user/jeff/numa/share/mk/src.libnames.mk	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/share/mk/src.libnames.mk	Wed Feb  7 00:50:40 2018	(r328962)
@@ -44,7 +44,6 @@ _INTERNALLIBS=	\
 		parse \
 		pe \
 		pmcstat \
-		readline \
 		sl \
 		sm \
 		smdb \
@@ -147,7 +146,6 @@ _LIBRARIES=	\
 		procstat \
 		pthread \
 		radius \
-		readline \
 		regex \
 		roken \
 		rpcsec_gss \
@@ -290,7 +288,6 @@ _DP_pam+=	ssh
 .if ${MK_NIS} != "no"
 _DP_pam+=	ypclnt
 .endif
-_DP_readline=	ncursesw
 _DP_roken=	crypt
 _DP_kadm5clnt=	com_err krb5 roken
 _DP_kadm5srv=	com_err hdb krb5 roken
@@ -413,9 +410,6 @@ LIBELFTC?=	${LIBELFTCDIR}/libelftc.a
 
 LIBPEDIR=	${OBJTOP}/lib/libpe
 LIBPE?=		${LIBPEDIR}/libpe.a
-
-LIBREADLINEDIR=	${OBJTOP}/gnu/lib/libreadline/readline
-LIBREADLINE?=	${LIBREADLINEDIR}/libreadline.a
 
 LIBOPENBSDDIR=	${OBJTOP}/lib/libopenbsd
 LIBOPENBSD?=	${LIBOPENBSDDIR}/libopenbsd.a

Modified: user/jeff/numa/stand/common/load_elf_obj.c
==============================================================================
--- user/jeff/numa/stand/common/load_elf_obj.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/stand/common/load_elf_obj.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -282,6 +282,8 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_f
 		switch (shdr[i].sh_type) {
 		case SHT_REL:
 		case SHT_RELA:
+			if ((shdr[shdr[i].sh_info].sh_flags & SHF_ALLOC) == 0)
+				break;
 			lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
 			shdr[i].sh_addr = (Elf_Addr)lastaddr;
 			lastaddr += shdr[i].sh_size;

Modified: user/jeff/numa/sys/cam/ata/ata_da.c
==============================================================================
--- user/jeff/numa/sys/cam/ata/ata_da.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/ata/ata_da.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -911,7 +911,7 @@ adaopen(struct disk *dp)
 	int error;
 
 	periph = (struct cam_periph *)dp->d_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		return(ENXIO);
 	}
 
@@ -1328,7 +1328,7 @@ adaasync(void *callback_arg, u_int32_t code,
 			softc->state = ADA_STATE_LOGDIR;
 		else
 		    break;
-		if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+		if (cam_periph_acquire(periph) != 0)
 			softc->state = ADA_STATE_NORMAL;
 		else
 			xpt_schedule(periph, CAM_PRIORITY_DEV);
@@ -1841,7 +1841,7 @@ adaregister(struct cam_periph *periph, void *arg)
 	 * We'll release this reference once GEOM calls us back (via
 	 * adadiskgonecb()) telling us that our provider has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -1866,7 +1866,7 @@ adaregister(struct cam_periph *periph, void *arg)
 	 * Create our sysctl variables, now that we know
 	 * we have successfully attached.
 	 */
-	if (cam_periph_acquire(periph) == CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) == 0)
 		taskqueue_enqueue(taskqueue_thread, &softc->sysctl_task);
 
 	/*

Modified: user/jeff/numa/sys/cam/ata/ata_pmp.c
==============================================================================
--- user/jeff/numa/sys/cam/ata/ata_pmp.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/ata/ata_pmp.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -315,7 +315,7 @@ pmpasync(void *callback_arg, u_int32_t code,
 		if (code == AC_SENT_BDR || code == AC_BUS_RESET)
 			softc->found = 0; /* We have to reset everything. */
 		if (softc->state == PMP_STATE_NORMAL) {
-			if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
+			if (cam_periph_acquire(periph) == 0) {
 				if (softc->pm_pid == 0x37261095 ||
 				    softc->pm_pid == 0x38261095)
 					softc->state = PMP_STATE_PM_QUIRKS_1;
@@ -343,7 +343,7 @@ pmpsysctlinit(void *context, int pending)
 	char tmpstr[32], tmpstr2[16];
 
 	periph = (struct cam_periph *)context;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return;
 
 	softc = (struct pmp_softc *)periph->softc;

Modified: user/jeff/numa/sys/cam/ata/ata_xpt.c
==============================================================================
--- user/jeff/numa/sys/cam/ata/ata_xpt.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/ata/ata_xpt.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -280,7 +280,6 @@ static cam_status
 proberegister(struct cam_periph *periph, void *arg)
 {
 	union ccb *request_ccb;	/* CCB representing the probe request */
-	cam_status status;
 	probe_softc *softc;
 
 	request_ccb = (union ccb *)arg;
@@ -304,10 +303,9 @@ proberegister(struct cam_periph *periph, void *arg)
 	periph->softc = softc;
 	softc->periph = periph;
 	softc->action = PROBE_INVALID;
-	status = cam_periph_acquire(periph);
-	if (status != CAM_REQ_CMP) {
-		return (status);
-	}
+	if (cam_periph_acquire(periph) != 0)
+		return (CAM_REQ_CMP_ERR);
+
 	CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
 	ata_device_transport(periph->path);
 	probeschedule(periph);

Modified: user/jeff/numa/sys/cam/cam_periph.c
==============================================================================
--- user/jeff/numa/sys/cam/cam_periph.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/cam_periph.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -403,19 +403,19 @@ retry:
 	return (count);
 }
 
-cam_status
+int
 cam_periph_acquire(struct cam_periph *periph)
 {
-	cam_status status;
+	int status;
 
-	status = CAM_REQ_CMP_ERR;
 	if (periph == NULL)
-		return (status);
+		return (EINVAL);
 
+	status = ENOENT;
 	xpt_lock_buses();
 	if ((periph->flags & CAM_PERIPH_INVALID) == 0) {
 		periph->refcount++;
-		status = CAM_REQ_CMP;
+		status = 0;
 	}
 	xpt_unlock_buses();
 
@@ -482,7 +482,7 @@ cam_periph_hold(struct cam_periph *periph, int priorit
 	 * from user us while we sleep.
 	 */
 
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);
 
 	cam_periph_assert(periph, MA_OWNED);

Modified: user/jeff/numa/sys/cam/cam_periph.h
==============================================================================
--- user/jeff/numa/sys/cam/cam_periph.h	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/cam_periph.h	Wed Feb  7 00:50:40 2018	(r328962)
@@ -159,7 +159,7 @@ cam_status cam_periph_alloc(periph_ctor_t *periph_ctor
 			    ac_callback_t *, ac_code, void *arg);
 struct cam_periph *cam_periph_find(struct cam_path *path, char *name);
 int		cam_periph_list(struct cam_path *, struct sbuf *);
-cam_status	cam_periph_acquire(struct cam_periph *periph);
+int		cam_periph_acquire(struct cam_periph *periph);
 void		cam_periph_doacquire(struct cam_periph *periph);
 void		cam_periph_release(struct cam_periph *periph);
 void		cam_periph_release_locked(struct cam_periph *periph);

Modified: user/jeff/numa/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- user/jeff/numa/sys/cam/ctl/scsi_ctl.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/ctl/scsi_ctl.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -459,7 +459,7 @@ ctlferegister(struct cam_periph *periph, void *arg)
 	struct ctlfe_lun_softc *softc;
 	union ccb ccb;
 	cam_status status;
-	int i;
+	int i, acstatus;
 
 	softc = (struct ctlfe_lun_softc *)arg;
 	bus_softc = softc->parent_softc;
@@ -539,11 +539,11 @@ ctlferegister(struct cam_periph *periph, void *arg)
 		}
 	}
 
-	status = cam_periph_acquire(periph);
-	if ((status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+	acstatus = cam_periph_acquire(periph);
+	if (acstatus != 0) {
 		xpt_print(periph->path, "%s: could not acquire reference "
-			  "count, status = %#x\n", __func__, status);
-		return (status);
+			  "count, status = %#x\n", __func__, acstatus);
+		return (CAM_REQ_CMP_ERR);
 	}
 
 	if (i == 0) {

Modified: user/jeff/numa/sys/cam/mmc/mmc_da.c
==============================================================================
--- user/jeff/numa/sys/cam/mmc/mmc_da.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/mmc/mmc_da.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -369,7 +369,7 @@ sddaopen(struct disk *dp)
 	int error;
 
 	periph = (struct cam_periph *)dp->d_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		return(ENXIO);
 	}
 
@@ -744,7 +744,7 @@ sdda_hook_into_geom(struct cam_periph *periph)
 	 * We'll release this reference once GEOM calls us back (via
 	 * sddadiskgonecb()) telling us that our provider has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);

Modified: user/jeff/numa/sys/cam/mmc/mmc_xpt.c
==============================================================================
--- user/jeff/numa/sys/cam/mmc/mmc_xpt.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/mmc/mmc_xpt.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -471,9 +471,9 @@ probe_periph_init()
 static cam_status
 mmcprobe_register(struct cam_periph *periph, void *arg)
 {
-	union ccb *request_ccb;	/* CCB representing the probe request */
-	cam_status status;
 	mmcprobe_softc *softc;
+	union ccb *request_ccb;	/* CCB representing the probe request */
+	int status;
 
 	CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmcprobe_register\n"));
 
@@ -501,10 +501,10 @@ mmcprobe_register(struct cam_periph *periph, void *arg
 	status = cam_periph_acquire(periph);
 
         memset(&periph->path->device->mmc_ident_data, 0, sizeof(struct mmc_params));
-	if (status != CAM_REQ_CMP) {
+	if (status != 0) {
 		printf("proberegister: cam_periph_acquire failed (status=%d)\n",
 			status);
-		return (status);
+		return (CAM_REQ_CMP_ERR);
 	}
 	CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
 

Modified: user/jeff/numa/sys/cam/nvme/nvme_da.c
==============================================================================
--- user/jeff/numa/sys/cam/nvme/nvme_da.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/nvme/nvme_da.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -260,7 +260,7 @@ ndaopen(struct disk *dp)
 	int error;
 
 	periph = (struct cam_periph *)dp->d_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		return(ENXIO);
 	}
 
@@ -785,7 +785,7 @@ ndaregister(struct cam_periph *periph, void *arg)
 	 * We'll release this reference once GEOM calls us back (via
 	 * ndadiskgonecb()) telling us that our provider has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -807,7 +807,7 @@ ndaregister(struct cam_periph *periph, void *arg)
 	 * Create our sysctl variables, now that we know
 	 * we have successfully attached.
 	 */
-	if (cam_periph_acquire(periph) == CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) == 0)
 		taskqueue_enqueue(taskqueue_thread, &softc->sysctl_task);
 
 	/*

Modified: user/jeff/numa/sys/cam/nvme/nvme_xpt.c
==============================================================================
--- user/jeff/numa/sys/cam/nvme/nvme_xpt.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/nvme/nvme_xpt.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -198,7 +198,6 @@ static cam_status
 nvme_probe_register(struct cam_periph *periph, void *arg)
 {
 	union ccb *request_ccb;	/* CCB representing the probe request */
-	cam_status status;
 	nvme_probe_softc *softc;
 
 	request_ccb = (union ccb *)arg;
@@ -222,10 +221,9 @@ nvme_probe_register(struct cam_periph *periph, void *a
 	periph->softc = softc;
 	softc->periph = periph;
 	softc->action = NVME_PROBE_INVALID;
-	status = cam_periph_acquire(periph);
-	if (status != CAM_REQ_CMP) {
-		return (status);
-	}
+	if (cam_periph_acquire(periph) != 0)
+		return (CAM_REQ_CMP_ERR);
+
 	CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
 
 //	nvme_device_transport(periph->path);

Modified: user/jeff/numa/sys/cam/scsi/scsi_cd.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_cd.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_cd.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -445,7 +445,7 @@ cdasync(void *callback_arg, u_int32_t code,
 	case AC_SCSI_AEN:
 		softc = (struct cd_softc *)periph->softc;
 		if (softc->state == CD_STATE_NORMAL && !softc->tur) {
-			if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
+			if (cam_periph_acquire(periph) == 0) {
 				softc->tur = 1;
 				xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 			}
@@ -480,7 +480,7 @@ cdsysctlinit(void *context, int pending)
 	char tmpstr[32], tmpstr2[16];
 
 	periph = (struct cam_periph *)context;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return;
 
 	softc = (struct cd_softc *)periph->softc;
@@ -676,7 +676,7 @@ cdregister(struct cam_periph *periph, void *arg)
 	 * We'll release this reference once GEOM calls us back (via
 	 * dadiskgonecb()) telling us that our provider has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -717,7 +717,7 @@ cdopen(struct disk *dp)
 	periph = (struct cam_periph *)dp->d_drv1;
 	softc = (struct cd_softc *)periph->softc;
 
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return(ENXIO);
 
 	cam_periph_lock(periph);
@@ -2601,7 +2601,7 @@ cdmediapoll(void *arg)
 
 	if (softc->state == CD_STATE_NORMAL && !softc->tur &&
 	    softc->outstanding_cmds == 0) {
-		if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
+		if (cam_periph_acquire(periph) == 0) {
 			softc->tur = 1;
 			xpt_schedule(periph, CAM_PRIORITY_NORMAL);
 		}

Modified: user/jeff/numa/sys/cam/scsi/scsi_da.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_da.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_da.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -1565,7 +1565,7 @@ da_periph_acquire(struct cam_periph *periph, da_ref_to
 	token_sanity(token);
 	DA_PERIPH_PRINT(periph, "acquiring device %s (%d): %d\n",
 	    da_ref_text[token], token, err);
-	if (err == CAM_REQ_CMP) {
+	if (err == 0) {
 		int cnt;
 		struct da_softc *softc = periph->softc;
 
@@ -1628,7 +1628,7 @@ daopen(struct disk *dp)
 	int error;
 
 	periph = (struct cam_periph *)dp->d_drv1;
-	if (da_periph_acquire(periph, DA_REF_OPEN) != CAM_REQ_CMP) {
+	if (da_periph_acquire(periph, DA_REF_OPEN) != 0) {
 		return (ENXIO);
 	}
 
@@ -2061,7 +2061,7 @@ daasync(void *callback_arg, u_int32_t code,
 	case AC_SCSI_AEN:
 		softc = (struct da_softc *)periph->softc;
 		if (!cam_iosched_has_work_flags(softc->cam_iosched, DA_WORK_TUR)) {
-			if (da_periph_acquire(periph, DA_REF_TUR) == CAM_REQ_CMP) {
+			if (da_periph_acquire(periph, DA_REF_TUR) == 0) {
 				cam_iosched_set_work_flags(softc->cam_iosched, DA_WORK_TUR);
 				daschedule(periph);
 			}
@@ -2732,7 +2732,7 @@ daregister(struct cam_periph *periph, void *arg)
 	 * We'll release this reference once GEOM calls us back (via
 	 * dadiskgonecb()) telling us that our provider has been freed.
 	 */
-	if (da_periph_acquire(periph, DA_REF_GEOM) != CAM_REQ_CMP) {
+	if (da_periph_acquire(periph, DA_REF_GEOM) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -4700,7 +4700,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
 			 * we have successfully attached.
 			 */
 			/* increase the refcount */
-			if (da_periph_acquire(periph, DA_REF_SYSCTL) == CAM_REQ_CMP) {
+			if (da_periph_acquire(periph, DA_REF_SYSCTL) == 0) {
 
 				taskqueue_enqueue(taskqueue_thread,
 						  &softc->sysctl_task);
@@ -5558,7 +5558,7 @@ static void
 dareprobe(struct cam_periph *periph)
 {
 	struct da_softc	  *softc;
-	cam_status status;
+	int status;
 
 	softc = (struct da_softc *)periph->softc;
 
@@ -5567,8 +5567,7 @@ dareprobe(struct cam_periph *periph)
 		return;
 
 	status = da_periph_acquire(periph, DA_REF_REPROBE);
-	KASSERT(status == CAM_REQ_CMP,
-	    ("dareprobe: cam_periph_acquire failed"));
+	KASSERT(status == 0, ("dareprobe: cam_periph_acquire failed"));
 
 	softc->state = DA_STATE_PROBE_WP;
 	xpt_schedule(periph, CAM_PRIORITY_DEV);
@@ -5666,7 +5665,7 @@ damediapoll(void *arg)
 
 	if (!cam_iosched_has_work_flags(softc->cam_iosched, DA_WORK_TUR) &&
 	    LIST_EMPTY(&softc->pending_ccbs)) {
-		if (da_periph_acquire(periph, DA_REF_TUR) == CAM_REQ_CMP) {
+		if (da_periph_acquire(periph, DA_REF_TUR) == 0) {
 			cam_iosched_set_work_flags(softc->cam_iosched, DA_WORK_TUR);
 			daschedule(periph);
 		}

Modified: user/jeff/numa/sys/cam/scsi/scsi_enc.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_enc.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_enc.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -267,7 +267,7 @@ enc_open(struct cdev *dev, int flags, int fmt, struct 
 	int error = 0;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);
 
 	cam_periph_lock(periph);
@@ -859,7 +859,7 @@ enc_kproc_init(enc_softc_t *enc)
 
 	callout_init_mtx(&enc->status_updater, cam_periph_mtx(enc->periph), 0);
 
-	if (cam_periph_acquire(enc->periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(enc->periph) != 0)
 		return (ENXIO);
 
 	result = kproc_create(enc_daemon, enc, &enc->enc_daemon, /*flags*/0,
@@ -975,7 +975,7 @@ enc_ctor(struct cam_periph *periph, void *arg)
 	 * instance for it.  We'll release this reference once the devfs
 	 * instance has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);

Modified: user/jeff/numa/sys/cam/scsi/scsi_pass.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_pass.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_pass.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -518,7 +518,6 @@ passasync(void *callback_arg, u_int32_t code,
 		buftype = (uintptr_t)arg;
 		if (buftype == CDAI_TYPE_PHYS_PATH) {
 			struct pass_softc *softc;
-			cam_status status;
 
 			softc = (struct pass_softc *)periph->softc;
 			/*
@@ -527,8 +526,7 @@ passasync(void *callback_arg, u_int32_t code,
 			 * a situation where the periph goes away before
 			 * the task queue has a chance to run.
 			 */
-			status = cam_periph_acquire(periph);
-			if (status != CAM_REQ_CMP)
+			if (cam_periph_acquire(periph) != 0)
 				break;
 
 			taskqueue_enqueue(taskqueue_thread,
@@ -626,7 +624,7 @@ passregister(struct cam_periph *periph, void *arg)
 	 * Acquire a reference to the periph that we can release once we've
 	 * cleaned up the kqueue.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -638,7 +636,7 @@ passregister(struct cam_periph *periph, void *arg)
 	 * instance for it.  We'll release this reference once the devfs
 	 * instance has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -665,7 +663,7 @@ passregister(struct cam_periph *periph, void *arg)
 	 * Hold a reference to the periph before we create the physical
 	 * path alias so it can't go away.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -705,7 +703,7 @@ passopen(struct cdev *dev, int flags, int fmt, struct 
 	int error;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);
 
 	cam_periph_lock(periph);

Modified: user/jeff/numa/sys/cam/scsi/scsi_pt.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_pt.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_pt.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -142,7 +142,7 @@ ptopen(struct cdev *dev, int flags, int fmt, struct th
 	int error = 0;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);	
 
 	softc = (struct pt_softc *)periph->softc;

Modified: user/jeff/numa/sys/cam/scsi/scsi_sa.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_sa.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_sa.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -657,7 +657,7 @@ saopen(struct cdev *dev, int flags, int fmt, struct th
 	int error;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		return (ENXIO);
 	}
 
@@ -2495,7 +2495,7 @@ saregister(struct cam_periph *periph, void *arg)
 	 * instances for it.  We'll release this reference once the devfs
 	 * instances have been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);

Modified: user/jeff/numa/sys/cam/scsi/scsi_sg.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_sg.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_sg.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -353,7 +353,7 @@ sgregister(struct cam_periph *periph, void *arg)
 	 * instance for it.  We'll release this reference once the devfs
 	 * instance has been freed.
 	 */
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+	if (cam_periph_acquire(periph) != 0) {
 		xpt_print(periph->path, "%s: lost periph during "
 			  "registration!\n", __func__);
 		cam_periph_lock(periph);
@@ -439,7 +439,7 @@ sgopen(struct cdev *dev, int flags, int fmt, struct th
 	int error = 0;
 
 	periph = (struct cam_periph *)dev->si_drv1;
-	if (cam_periph_acquire(periph) != CAM_REQ_CMP)
+	if (cam_periph_acquire(periph) != 0)
 		return (ENXIO);
 
 	/*

Modified: user/jeff/numa/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- user/jeff/numa/sys/cam/scsi/scsi_xpt.c	Tue Feb  6 23:50:02 2018	(r328961)
+++ user/jeff/numa/sys/cam/scsi/scsi_xpt.c	Wed Feb  7 00:50:40 2018	(r328962)
@@ -657,7 +657,6 @@ static cam_status
 proberegister(struct cam_periph *periph, void *arg)
 {
 	union ccb *request_ccb;	/* CCB representing the probe request */
-	cam_status status;
 	probe_softc *softc;
 
 	request_ccb = (union ccb *)arg;
@@ -681,10 +680,9 @@ proberegister(struct cam_periph *periph, void *arg)
 	periph->softc = softc;
 	softc->periph = periph;
 	softc->action = PROBE_INVALID;
-	status = cam_periph_acquire(periph);
-	if (status != CAM_REQ_CMP) {
-		return (status);
-	}
+	if (cam_periph_acquire(periph) != 0)
+		return (CAM_REQ_CMP_ERR);
+
 	CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));
 	scsi_devise_transport(periph->path);
 

Modified: user/jeff/numa/sys/conf/files
==============================================================================
--- user/jeff/numa/sys/conf/files	Tue Feb  6 23:50:02 2018	(r328961)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list