svn commit: r350435 - in projects/fuse2: include lib/libarchive/tests lib/libc/stdio sbin/camcontrol sbin/nvmecontrol share/man/man4 sys/arm/ti sys/arm/ti/cpsw sys/arm64/arm64 sys/arm64/conf sys/co...

Alan Somers asomers at FreeBSD.org
Tue Jul 30 04:17:42 UTC 2019


Author: asomers
Date: Tue Jul 30 04:17:36 2019
New Revision: 350435
URL: https://svnweb.freebsd.org/changeset/base/350435

Log:
  MFHead @350426
  
  Sponsored by:	The FreeBSD Foundation

Added:
  projects/fuse2/sys/dev/altera/dwc/
     - copied from r350426, head/sys/dev/altera/dwc/
Modified:
  projects/fuse2/include/stdlib.h
  projects/fuse2/lib/libarchive/tests/Makefile
  projects/fuse2/lib/libc/stdio/Makefile.inc
  projects/fuse2/lib/libc/stdio/Symbol.map
  projects/fuse2/lib/libc/stdio/mktemp.3
  projects/fuse2/lib/libc/stdio/mktemp.c
  projects/fuse2/sbin/camcontrol/camcontrol.c
  projects/fuse2/sbin/camcontrol/timestamp.c
  projects/fuse2/sbin/nvmecontrol/identify_ext.c
  projects/fuse2/share/man/man4/cc_dctcp.4
  projects/fuse2/sys/arm/ti/cpsw/if_cpsw.c
  projects/fuse2/sys/arm/ti/ti_hwmods.c
  projects/fuse2/sys/arm64/arm64/pmap.c
  projects/fuse2/sys/arm64/conf/GENERIC
  projects/fuse2/sys/compat/freebsd32/freebsd32_capability.c
  projects/fuse2/sys/conf/files.arm64
  projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c
  projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_store.c
  projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value.c
  projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c
  projects/fuse2/sys/dev/drm2/drmP.h
  projects/fuse2/sys/dev/mii/micphy.c
  projects/fuse2/sys/dev/nvme/nvme.h
  projects/fuse2/sys/dev/usb/net/if_urndis.c
  projects/fuse2/sys/fs/devfs/devfs_vnops.c
  projects/fuse2/sys/fs/ext2fs/ext2_vnops.c
  projects/fuse2/sys/fs/fuse/fuse_vnops.c
  projects/fuse2/sys/kern/kern_event.c
  projects/fuse2/sys/kern/kern_sendfile.c
  projects/fuse2/sys/kern/kern_sig.c
  projects/fuse2/sys/kern/sys_process.c
  projects/fuse2/sys/kern/uipc_shm.c
  projects/fuse2/sys/mips/broadcom/bhnd_nexus.c
  projects/fuse2/sys/netinet/cc/cc_dctcp.c
  projects/fuse2/sys/netpfil/ipfw/ip_fw2.c
  projects/fuse2/sys/netpfil/ipfw/ip_fw_eaction.c
  projects/fuse2/sys/netpfil/ipfw/ip_fw_nat.c
  projects/fuse2/sys/netpfil/ipfw/ip_fw_private.h
  projects/fuse2/sys/netpfil/ipfw/ip_fw_sockopt.c
  projects/fuse2/sys/netpfil/pf/pf.c
  projects/fuse2/sys/netpfil/pf/pf_norm.c
  projects/fuse2/sys/riscv/riscv/copyinout.S
  projects/fuse2/sys/rpc/svc_vc.c
  projects/fuse2/sys/sys/ata.h
  projects/fuse2/sys/vm/swap_pager.c
  projects/fuse2/usr.bin/nfsstat/nfsstat.c
  projects/fuse2/usr.bin/printf/printf.1
Directory Properties:
  projects/fuse2/   (props changed)

Modified: projects/fuse2/include/stdlib.h
==============================================================================
--- projects/fuse2/include/stdlib.h	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/include/stdlib.h	Tue Jul 30 04:17:36 2019	(r350435)
@@ -297,6 +297,7 @@ int	 mergesort_b(void *, size_t, size_t, int (^)(const
 #endif
 int	 mkostemp(char *, int);
 int	 mkostemps(char *, int, int);
+int	 mkostempsat(int, char *, int, int);
 void	 qsort_r(void *, size_t, size_t, void *,
 	    int (*)(void *, const void *, const void *));
 int	 radixsort(const unsigned char **, int, const unsigned char *,

Modified: projects/fuse2/lib/libarchive/tests/Makefile
==============================================================================
--- projects/fuse2/lib/libarchive/tests/Makefile	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/lib/libarchive/tests/Makefile	Tue Jul 30 04:17:36 2019	(r350435)
@@ -581,7 +581,6 @@ ${PACKAGE}FILES+=	test_read_format_zip_jar.jar.uu
 ${PACKAGE}FILES+=	test_read_format_zip_length_at_end.zip.uu
 ${PACKAGE}FILES+=	test_read_format_zip_lzma_alone_leak.zipx.uu
 ${PACKAGE}FILES+=	test_read_format_zip_lzma.zipx.uu
-${PACKAGE}FILES+=	test_read_format_zip_lzma.zipx.uu
 ${PACKAGE}FILES+=	test_read_format_zip_lzma_multi.zipx.uu
 ${PACKAGE}FILES+=	test_read_format_zip_mac_metadata.zip.uu
 ${PACKAGE}FILES+=	test_read_format_zip_malformed1.zip.uu

Modified: projects/fuse2/lib/libc/stdio/Makefile.inc
==============================================================================
--- projects/fuse2/lib/libc/stdio/Makefile.inc	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/lib/libc/stdio/Makefile.inc	Tue Jul 30 04:17:36 2019	(r350435)
@@ -63,7 +63,7 @@ MLINKS+=getc.3 fgetc.3 getc.3 getc_unlocked.3 getc.3 g
 MLINKS+=getline.3 getdelim.3
 MLINKS+=getwc.3 fgetwc.3 getwc.3 getwchar.3
 MLINKS+=mktemp.3 mkdtemp.3 mktemp.3 mkstemp.3 mktemp.3 mkstemps.3 \
-	mktemp.3 mkostemp.3 mktemp.3 mkostemps.3
+	mktemp.3 mkostemp.3 mktemp.3 mkostemps.3 mktemp.3 mkostempsat.3
 MLINKS+=open_memstream.3 open_wmemstream.3
 MLINKS+=printf.3 asprintf.3 printf.3 dprintf.3 printf.3 fprintf.3 \
 	printf.3 snprintf.3 printf.3 sprintf.3 \

Modified: projects/fuse2/lib/libc/stdio/Symbol.map
==============================================================================
--- projects/fuse2/lib/libc/stdio/Symbol.map	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/lib/libc/stdio/Symbol.map	Tue Jul 30 04:17:36 2019	(r350435)
@@ -171,6 +171,10 @@ FBSD_1.5 {
 	gets_s;
 };
 
+FBSD_1.6 {
+	mkostempsat;
+};
+
 FBSDprivate_1.0 {
 	_flockfile;
 	_flockfile_debug_stub;

Modified: projects/fuse2/lib/libc/stdio/mktemp.3
==============================================================================
--- projects/fuse2/lib/libc/stdio/mktemp.3	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/lib/libc/stdio/mktemp.3	Tue Jul 30 04:17:36 2019	(r350435)
@@ -28,7 +28,7 @@
 .\"     @(#)mktemp.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2013
+.Dd July 29, 2019
 .Dt MKTEMP 3
 .Os
 .Sh NAME
@@ -46,6 +46,8 @@
 .Fn mkostemp "char *template" "int oflags"
 .Ft int
 .Fn mkostemps "char *template" "int suffixlen" "int oflags"
+.Ft int
+.Fn mkostempsat "int dfd" "char *template" "int suffixlen" "int oflags"
 .Ft char *
 .Fn mkdtemp "char *template"
 .In unistd.h
@@ -126,6 +128,21 @@ function
 are told the length of the suffix string.
 .Pp
 The
+.Fn mkostempsat
+function acts the same as
+.Fn mkostemps
+but takes an additional directory descriptor as a parameter.
+The temporary file is created relative to the corresponding
+directory, or to the current working directory if the special
+value
+.Dv AT_FDCWD
+is specified.
+If the template path is an absolute path, the
+.Fa dfd
+parameter is ignored and the behavior is identical to
+.Fn mkostemps .
+.Pp
+The
 .Fn mkdtemp
 function makes the same replacement to the template as in
 .Fn mktemp
@@ -262,9 +279,10 @@ and is not specified by
 .St -p1003.1-2008 .
 The
 .Fn mkostemp ,
-.Fn mkstemps
-and
+.Fn mkstemps ,
 .Fn mkostemps
+and
+.Fn mkostempsat
 functions do not conform to any standard.
 .Sh HISTORY
 A
@@ -293,6 +311,10 @@ and
 .Fn mkostemps
 functions appeared in
 .Fx 10.0 .
+The
+.Fn mkostempsat
+function appeared in
+.Fx 13.0 .
 .Sh BUGS
 This family of functions produces filenames which can be guessed,
 though the risk is minimized when large numbers of
@@ -308,10 +330,11 @@ and opening it for use
 (later in the user application)
 particularly dangerous from a security perspective.
 Whenever it is possible,
-.Fn mkstemp
-or
+.Fn mkstemp ,
 .Fn mkostemp
-should be used instead, since it does not have the race condition.
+or
+.Fn mkostempsat
+should be used instead, since they do not have the race condition.
 If
 .Fn mkstemp
 cannot be used, the filename created by

Modified: projects/fuse2/lib/libc/stdio/mktemp.c
==============================================================================
--- projects/fuse2/lib/libc/stdio/mktemp.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/lib/libc/stdio/mktemp.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -49,17 +49,25 @@ __FBSDID("$FreeBSD$");
 
 char *_mktemp(char *);
 
-static int _gettemp(char *, int *, int, int, int);
+static int _gettemp(int, char *, int *, int, int, int);
 
 static const unsigned char padchar[] =
 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
 int
+mkostempsat(int dfd, char *path, int slen, int oflags)
+{
+	int fd;
+
+	return (_gettemp(dfd, path, &fd, 0, slen, oflags) ? fd : -1);
+}
+
+int
 mkostemps(char *path, int slen, int oflags)
 {
 	int fd;
 
-	return (_gettemp(path, &fd, 0, slen, oflags) ? fd : -1);
+	return (_gettemp(AT_FDCWD, path, &fd, 0, slen, oflags) ? fd : -1);
 }
 
 int
@@ -67,7 +75,7 @@ mkstemps(char *path, int slen)
 {
 	int fd;
 
-	return (_gettemp(path, &fd, 0, slen, 0) ? fd : -1);
+	return (_gettemp(AT_FDCWD, path, &fd, 0, slen, 0) ? fd : -1);
 }
 
 int
@@ -75,7 +83,7 @@ mkostemp(char *path, int oflags)
 {
 	int fd;
 
-	return (_gettemp(path, &fd, 0, 0, oflags) ? fd : -1);
+	return (_gettemp(AT_FDCWD, path, &fd, 0, 0, oflags) ? fd : -1);
 }
 
 int
@@ -83,19 +91,19 @@ mkstemp(char *path)
 {
 	int fd;
 
-	return (_gettemp(path, &fd, 0, 0, 0) ? fd : -1);
+	return (_gettemp(AT_FDCWD, path, &fd, 0, 0, 0) ? fd : -1);
 }
 
 char *
 mkdtemp(char *path)
 {
-	return (_gettemp(path, (int *)NULL, 1, 0, 0) ? path : (char *)NULL);
+	return (_gettemp(AT_FDCWD, path, (int *)NULL, 1, 0, 0) ? path : (char *)NULL);
 }
 
 char *
 _mktemp(char *path)
 {
-	return (_gettemp(path, (int *)NULL, 0, 0, 0) ? path : (char *)NULL);
+	return (_gettemp(AT_FDCWD, path, (int *)NULL, 0, 0, 0) ? path : (char *)NULL);
 }
 
 __warn_references(mktemp,
@@ -108,7 +116,7 @@ mktemp(char *path)
 }
 
 static int
-_gettemp(char *path, int *doopen, int domkdir, int slen, int oflags)
+_gettemp(int dfd, char *path, int *doopen, int domkdir, int slen, int oflags)
 {
 	char *start, *trv, *suffp, *carryp;
 	char *pad;
@@ -155,7 +163,7 @@ _gettemp(char *path, int *doopen, int domkdir, int sle
 		for (; trv > path; --trv) {
 			if (*trv == '/') {
 				*trv = '\0';
-				rval = stat(path, &sbuf);
+				rval = fstatat(dfd, path, &sbuf, 0);
 				*trv = '/';
 				if (rval != 0)
 					return (0);
@@ -168,11 +176,11 @@ _gettemp(char *path, int *doopen, int domkdir, int sle
 		}
 	}
 
+	oflags |= O_CREAT | O_EXCL | O_RDWR;
 	for (;;) {
 		if (doopen) {
-			if ((*doopen =
-			    _open(path, O_CREAT|O_EXCL|O_RDWR|oflags, 0600)) >=
-			    0)
+			*doopen = _openat(dfd, path, oflags, 0600);
+			if (*doopen >= 0)
 				return (1);
 			if (errno != EEXIST)
 				return (0);

Modified: projects/fuse2/sbin/camcontrol/camcontrol.c
==============================================================================
--- projects/fuse2/sbin/camcontrol/camcontrol.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sbin/camcontrol/camcontrol.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -1521,6 +1521,7 @@ atacapprint(struct ata_params *parm)
 		printf("WWN                   %04x%04x%04x%04x\n",
 		    parm->wwn[0], parm->wwn[1], parm->wwn[2], parm->wwn[3]);
 	}
+	printf("additional product id %.8s\n", parm->product_id);
 	if (parm->enabled.extension & ATA_SUPPORT_MEDIASN) {
 		printf("media serial number   %.30s\n",
 		    parm->media_serial);
@@ -1650,35 +1651,39 @@ atacapprint(struct ata_params *parm)
 		} else
 			printf("\n");
 	printf("Native Command Queuing (NCQ)   ");
-	if (parm->satacapabilities != 0xffff &&
-	    (parm->satacapabilities & ATA_SUPPORT_NCQ)) {
+	if (atasata(parm) && (parm->satacapabilities & ATA_SUPPORT_NCQ)) {
 		printf("yes		%d tags\n",
 		    ATA_QUEUE_LEN(parm->queue) + 1);
+		printf("NCQ Priority Information       %s\n",
+		    parm->satacapabilities & ATA_SUPPORT_NCQ_PRIO ?
+		    "yes" : "no");
+		printf("NCQ Non-Data Command           %s\n",
+		    parm->satacapabilities2 & ATA_SUPPORT_NCQ_NON_DATA ?
+		    "yes" : "no");
+		printf("NCQ Streaming                  %s\n",
+		    parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ?
+		    "yes" : "no");
+		printf("Receive & Send FPDMA Queued    %s\n",
+		    parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ?
+		    "yes" : "no");
+		printf("NCQ Autosense                  %s\n",
+		    parm->satasupport & ATA_SUPPORT_NCQ_AUTOSENSE ?
+		    "yes" : "no");
 	} else
 		printf("no\n");
 
-	printf("NCQ Queue Management           %s\n", atasata(parm) &&
-		parm->satacapabilities2 & ATA_SUPPORT_NCQ_QMANAGEMENT ?
-		"yes" : "no");
-	printf("NCQ Streaming                  %s\n", atasata(parm) &&
-		parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ?
-		"yes" : "no");
-	printf("Receive & Send FPDMA Queued    %s\n", atasata(parm) &&
-		parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ?
-		"yes" : "no");
-
 	printf("SMART                          %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no");
-	printf("microcode download             %s	%s\n",
-		parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no",
-		parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no");
 	printf("security                       %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no");
 	printf("power management               %s	%s\n",
 		parm->support.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no",
 		parm->enabled.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no");
+	printf("microcode download             %s	%s\n",
+		parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no",
+		parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no");
 	printf("advanced power management      %s	%s",
 		parm->support.command2 & ATA_SUPPORT_APM ? "yes" : "no",
 		parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no");
@@ -1721,6 +1726,15 @@ atacapprint(struct ata_params *parm)
 	printf("free-fall                      %s	%s\n",
 		parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no",
 		parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no");
+	printf("sense data reporting           %s	%s\n",
+		parm->support2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no",
+		parm->enabled2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no");
+	printf("extended power conditions      %s	%s\n",
+		parm->support2 & ATA_SUPPORT_EPC ? "yes" : "no",
+		parm->enabled2 & ATA_SUPPORT_EPC ? "yes" : "no");
+	printf("device statistics notification %s	%s\n",
+		parm->support2 & ATA_SUPPORT_DSN ? "yes" : "no",
+		parm->enabled2 & ATA_SUPPORT_DSN ? "yes" : "no");
 	printf("Data Set Management (DSM/TRIM) ");
 	if (parm->support_dsm & ATA_SUPPORT_DSM_TRIM) {
 		printf("yes\n");
@@ -1743,6 +1757,8 @@ atacapprint(struct ata_params *parm)
 	} else {
 		printf("no\n");
 	}
+	printf("encrypts all user data         %s\n",
+		parm->support3 & ATA_ENCRYPTS_ALL_USER_DATA ? "yes" : "no");
 	printf("Sanitize                       ");
 	if (parm->multi & ATA_SUPPORT_SANITIZE) {
 		printf("yes\t\t%s%s%s\n",

Modified: projects/fuse2/sbin/camcontrol/timestamp.c
==============================================================================
--- projects/fuse2/sbin/camcontrol/timestamp.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sbin/camcontrol/timestamp.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -79,7 +79,6 @@ set_restore_flags(struct cam_device *device, uint8_t *
 	int error = 0;
 	struct scsi_control_ext_page *control_page = NULL;
 	struct scsi_mode_header_10 *mode_hdr = NULL;
-	struct scsi_mode_sense_10 *cdb = NULL;
 	union ccb *ccb = NULL;
 	unsigned long mode_buf_size = sizeof(struct scsi_mode_header_10) +
 	    sizeof(struct scsi_mode_blk_desc) +
@@ -96,25 +95,19 @@ set_restore_flags(struct cam_device *device, uint8_t *
 	 * Get the control extension subpage, we'll send it back modified to
 	 * enable SCSI control over the tape drive's timestamp
 	 */
-	scsi_mode_sense_len(&ccb->csio,
+	scsi_mode_sense_subpage(&ccb->csio,
 	    /*retries*/ retry_count,
 	    /*cbfcnp*/ NULL,
 	    /*tag_action*/ task_attr,
 	    /*dbd*/ 0,
 	    /*page_control*/ SMS_PAGE_CTRL_CURRENT,
 	    /*page*/ SCEP_PAGE_CODE,
+	    /*subpage*/ SCEP_SUBPAGE_CODE,
 	    /*param_buf*/ &mode_buf[0],
 	    /*param_len*/ mode_buf_size,
 	    /*minimum_cmd_size*/ 10,
 	    /*sense_len*/ SSD_FULL_SIZE,
 	    /*timeout*/ timeout ? timeout : 5000);
-	/*
-	 * scsi_mode_sense_len does not have a subpage argument at the moment,
-	 * so we have to manually set the subpage code before calling
-	 * cam_send_ccb().
-	 */
-	cdb = (struct scsi_mode_sense_10 *)ccb->csio.cdb_io.cdb_bytes;
-	cdb->subpage = SCEP_SUBPAGE_CODE;
 
 	ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
 	if (retry_count > 0)

Modified: projects/fuse2/sbin/nvmecontrol/identify_ext.c
==============================================================================
--- projects/fuse2/sbin/nvmecontrol/identify_ext.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sbin/nvmecontrol/identify_ext.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -49,7 +49,7 @@ nvme_print_controller(struct nvme_controller_data *cda
 	uint8_t str[128];
 	char cbuf[UINT128_DIG + 1];
 	uint16_t oncs, oacs;
-	uint8_t compare, write_unc, dsm, vwc_present;
+	uint8_t compare, write_unc, dsm, t;
 	uint8_t security, fmt, fw, nsmgmt;
 	uint8_t	fw_slot1_ro, fw_num_slots;
 	uint8_t ns_smart;
@@ -63,8 +63,6 @@ nvme_print_controller(struct nvme_controller_data *cda
 		NVME_CTRLR_DATA_ONCS_WRITE_UNC_MASK;
 	dsm = (oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) &
 		NVME_CTRLR_DATA_ONCS_DSM_MASK;
-	vwc_present = (cdata->vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) &
-		NVME_CTRLR_DATA_VWC_PRESENT_MASK;
 
 	oacs = cdata->oacs;
 	security = (oacs >> NVME_CTRLR_DATA_OACS_SECURITY_SHIFT) &
@@ -107,8 +105,10 @@ nvme_print_controller(struct nvme_controller_data *cda
 	printf("Recommended Arb Burst:       %d\n", cdata->rab);
 	printf("IEEE OUI Identifier:         %02x %02x %02x\n",
 		cdata->ieee[0], cdata->ieee[1], cdata->ieee[2]);
-	printf("Multi-Path I/O Capabilities: %s%s%s%s\n",
+	printf("Multi-Path I/O Capabilities: %s%s%s%s%s\n",
 	    (cdata->mic == 0) ? "Not Supported" : "",
+	    ((cdata->mic >> NVME_CTRLR_DATA_MIC_ANAR_SHIFT) &
+	     NVME_CTRLR_DATA_MIC_SRIOVVF_MASK) ? "Asymmetric, " : "",
 	    ((cdata->mic >> NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT) &
 	     NVME_CTRLR_DATA_MIC_SRIOVVF_MASK) ? "SR-IOV VF, " : "",
 	    ((cdata->mic >> NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT) &
@@ -149,9 +149,24 @@ nvme_print_controller(struct nvme_controller_data *cda
 	printf("Virtualization Management:   %sSupported\n",
 	    ((oacs >> NVME_CTRLR_DATA_OACS_VM_SHIFT) &
 	     NVME_CTRLR_DATA_OACS_VM_MASK) ? "" : "Not ");
-	printf("Doorbell Buffer Config       %sSupported\n",
+	printf("Doorbell Buffer Config:      %sSupported\n",
 	    ((oacs >> NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT) &
 	     NVME_CTRLR_DATA_OACS_DBBUFFER_MASK) ? "" : "Not ");
+	printf("Get LBA Status:              %sSupported\n",
+	    ((oacs >> NVME_CTRLR_DATA_OACS_GETLBA_SHIFT) &
+	     NVME_CTRLR_DATA_OACS_GETLBA_MASK) ? "" : "Not ");
+	printf("Sanitize:                    ");
+	if (cdata->sanicap != 0) {
+		printf("%s%s%s\n",
+		    ((cdata->sanicap >> NVME_CTRLR_DATA_SANICAP_CES_SHIFT) &
+		     NVME_CTRLR_DATA_SANICAP_CES_SHIFT) ? "crypto, " : "",
+		    ((cdata->sanicap >> NVME_CTRLR_DATA_SANICAP_BES_SHIFT) &
+		     NVME_CTRLR_DATA_SANICAP_BES_SHIFT) ? "block, " : "",
+		    ((cdata->sanicap >> NVME_CTRLR_DATA_SANICAP_OWS_SHIFT) &
+		     NVME_CTRLR_DATA_SANICAP_OWS_SHIFT) ? "overwrite" : "");
+	} else {
+		printf("Not Supported\n");
+	}
 	printf("Abort Command Limit:         %d\n", cdata->acl+1);
 	printf("Async Event Request Limit:   %d\n", cdata->aerl+1);
 	printf("Number of Firmware Slots:    ");
@@ -197,6 +212,9 @@ nvme_print_controller(struct nvme_controller_data *cda
 	printf("Timestamp feature:           %sSupported\n",
 	    ((oncs >> NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT) &
 	     NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK) ? "" : "Not ");
+	printf("Verify feature:              %sSupported\n",
+	    ((oncs >> NVME_CTRLR_DATA_ONCS_VERIFY_SHIFT) &
+	     NVME_CTRLR_DATA_ONCS_VERIFY_MASK) ? "" : "Not ");
 	printf("Fused Operation Support:     %s%s\n",
 	    (cdata->fuses == 0) ? "Not Supported" : "",
 	    ((cdata->fuses >> NVME_CTRLR_DATA_FUSES_CNW_SHIFT) &
@@ -208,8 +226,13 @@ nvme_print_controller(struct nvme_controller_data *cda
 	     NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) ? "All-NVM" : "Per-NS",
 	    ((cdata->fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) &
 	     NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) ? "All-NVM" : "Per-NS");
-	printf("Volatile Write Cache:        %s\n",
-		vwc_present ? "Present" : "Not Present");
+	t = (cdata->vwc >> NVME_CTRLR_DATA_VWC_ALL_SHIFT) &
+	    NVME_CTRLR_DATA_VWC_ALL_MASK;
+	printf("Volatile Write Cache:        %s%s\n",
+	    ((cdata->vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) &
+	     NVME_CTRLR_DATA_VWC_PRESENT_MASK) ? "Present" : "Not Present",
+	    (t == NVME_CTRLR_DATA_VWC_ALL_NO) ? ", no flush all" :
+	    (t == NVME_CTRLR_DATA_VWC_ALL_YES) ? ", flush all" : "");
 
 	if (nsmgmt) {
 		printf("\n");

Modified: projects/fuse2/share/man/man4/cc_dctcp.4
==============================================================================
--- projects/fuse2/share/man/man4/cc_dctcp.4	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/share/man/man4/cc_dctcp.4	Tue Jul 30 04:17:36 2019	(r350435)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2015
+.Dd July 29, 2019
 .Dt CC_DCTCP 4
 .Os
 .Sh NAME
@@ -60,7 +60,7 @@ In addition, when classic ECN is used as sender and DC
 receiver, DCTCP avoids to mirror back ACKs only when the CWR flag is
 set in the incoming packet.
 .Pp
-The other specifications are based on the paper and Internet Draft referenced
+The other specifications are based on the paper and the RFC referenced
 in the
 .Sx SEE ALSO
 section below.
@@ -70,16 +70,27 @@ The algorithm exposes the following tunable variables 
 branch of the
 .Xr sysctl 3
 MIB:
-.Bl -tag -width ".Va alpha"
+.Bl -tag -width ".Va slowstart"
 .It Va alpha
-An initial estimator of the congestion on the link.
-Default is 0.
-.It Va dctcp_shift_g
-An estimation gain in the alpha calculation.
-Default is 16.
+The initial value to estimate the congestion on the link.
+The valid range is from 0 to 1024, where 1024 reduces the congestion
+window to half, if a CE is observed in the first window and
+.Va alpha
+could not yet adjust to the congestion level on that path.
+Default is 1024.
+.It Va shift_g
+An estimation gain in the
+.Va alpha
+calculation.
+This influences the responsiveness when adjusting alpha
+to the most recent observed window.
+Valid range from 0 to 10, the default is 4, resulting in an effective
+gain of 1 / ( 2 ^
+.Va shift_g
+), or 1/16th.
 .It Va slowstart
-A trigger to halve congestion window after slow start.
-Default does nothing to halve window.
+A flag if the congestion window should be reduced by one half after slow start.
+Valid settings 0 and 1, default 0.
 .El
 .Sh SEE ALSO
 .Xr cc_chd 4 ,
@@ -108,10 +119,12 @@ Default does nothing to halve window.
 .Re
 .Rs
 .%A "Stephen Bensley"
-.%A "Lars Eggert"
 .%A "Dave Thaler"
-.%T "Microsoft's Datacenter TCP (DCTCP): TCP Congestion Control for Datacenters"
-.%U "http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-01"
+.%A "Praveen Balasubramanian"
+.%A "Lars Eggert"
+.%A "Glenn Judd"
+.%T "Data Center TCP (DCTCP): TCP Congestion Control for Data Centers"
+.%U "https://tools.ietf.org/html/rfc8257"
 .Re
 .Sh HISTORY
 The

Modified: projects/fuse2/sys/arm/ti/cpsw/if_cpsw.c
==============================================================================
--- projects/fuse2/sys/arm/ti/cpsw/if_cpsw.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/arm/ti/cpsw/if_cpsw.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -755,7 +755,9 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, int port)
 			continue;
 		}
 		OF_prop_free(name);
-		if (mdio_child_addr != slave_mdio_addr[port])
+
+		if (mdio_child_addr != slave_mdio_addr[port] &&
+		    mdio_child_addr != (slave_mdio_addr[port] & 0xFFF))
 			continue;
 
 		if (fdt_get_phyaddr(child, NULL, &phy, NULL) != 0){

Modified: projects/fuse2/sys/arm/ti/ti_hwmods.c
==============================================================================
--- projects/fuse2/sys/arm/ti/ti_hwmods.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/arm/ti/ti_hwmods.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -97,6 +97,16 @@ struct hwmod ti_hwmods[] = {
 	{NULL,		0}
 };
 
+static inline int
+ti_get_hwmods_prop(phandle_t node, void **name)
+{
+	int len;
+
+	if ((len = OF_getprop_alloc(node, "ti,hwmods", name)) > 0)
+		return (len);
+	return (OF_getprop_alloc(OF_parent(node), "ti,hwmods", name));
+}
+
 clk_ident_t
 ti_hwmods_get_clock(device_t dev)
 {
@@ -110,7 +120,7 @@ ti_hwmods_get_clock(device_t dev)
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (INVALID_CLK_IDENT);
 
-	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = ti_get_hwmods_prop(node, (void **)&name)) <= 0)
 		return (INVALID_CLK_IDENT);
 
 	buf = name;
@@ -148,7 +158,7 @@ int ti_hwmods_contains(device_t dev, const char *hwmod
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (0);
 
-	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = ti_get_hwmods_prop(node, (void **)&name)) <= 0)
 		return (0);
 
 	buf = name;
@@ -182,7 +192,7 @@ ti_hwmods_get_unit(device_t dev, const char *hwmod)
 	if ((node = ofw_bus_get_node(dev)) == 0)
 		return (0);
 
-	if ((len = OF_getprop_alloc(OF_parent(node), "ti,hwmods", (void**)&name)) <= 0)
+	if ((len = ti_get_hwmods_prop(node, (void **)&name)) <= 0)
 		return (0);
 
 	buf = name;

Modified: projects/fuse2/sys/arm64/arm64/pmap.c
==============================================================================
--- projects/fuse2/sys/arm64/arm64/pmap.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/arm64/arm64/pmap.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -5790,7 +5790,7 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far)
 		    (pmap_load(pte) & (ATTR_AP_RW_BIT | ATTR_SW_DBM)) ==
 		    (ATTR_AP(ATTR_AP_RO) | ATTR_SW_DBM)) {
 			pmap_clear_bits(pte, ATTR_AP_RW_BIT);
-			pmap_invalidate_page(pmap, trunc_page(far));
+			pmap_invalidate_page(pmap, far);
 			rv = KERN_SUCCESS;
 		}
 		PMAP_UNLOCK(pmap);

Modified: projects/fuse2/sys/arm64/conf/GENERIC
==============================================================================
--- projects/fuse2/sys/arm64/conf/GENERIC	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/arm64/conf/GENERIC	Tue Jul 30 04:17:36 2019	(r350435)
@@ -162,6 +162,7 @@ device  	smc		# SMSC LAN91C111
 device		vnic		# Cavium ThunderX NIC
 device		al_eth		# Annapurna Alpine Ethernet NIC
 device		dwc_rk		# Rockchip Designware
+device		dwc_socfpga	# Altera SOCFPGA Ethernet MAC
 
 # Etherswitch devices
 device		etherswitch	# Enable etherswitch support

Modified: projects/fuse2/sys/compat/freebsd32/freebsd32_capability.c
==============================================================================
--- projects/fuse2/sys/compat/freebsd32/freebsd32_capability.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/compat/freebsd32/freebsd32_capability.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/filedesc.h>
+#include <sys/limits.h>
 #include <sys/malloc.h>
 #include <sys/proc.h>
 #include <sys/syscallsubr.h>

Modified: projects/fuse2/sys/conf/files.arm64
==============================================================================
--- projects/fuse2/sys/conf/files.arm64	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/conf/files.arm64	Tue Jul 30 04:17:36 2019	(r350435)
@@ -206,6 +206,7 @@ dev/acpica/acpi_pci_link.c	optional	acpi pci
 dev/acpica/acpi_pcib.c		optional	acpi pci
 dev/acpica/acpi_pxm.c		optional	acpi
 dev/ahci/ahci_generic.c		optional	ahci
+dev/altera/dwc/if_dwc_socfpga.c	optional	fdt dwc_socfpga
 dev/axgbe/if_axgbe.c		optional	axgbe
 dev/axgbe/xgbe-desc.c		optional	axgbe
 dev/axgbe/xgbe-dev.c		optional	axgbe

Modified: projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c
==============================================================================
--- projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 #ifdef _KERNEL
 #include <sys/param.h>
 #include <sys/ctype.h>
+#include <sys/limits.h>
 #include <sys/malloc.h>
 #include <sys/systm.h>
 #else /* !_KERNEL */

Modified: projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_store.c
==============================================================================
--- projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_store.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_store.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/hash.h>
+#include <sys/limits.h>
 #include <sys/queue.h>
 
 #ifdef _KERNEL

Modified: projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value.c
==============================================================================
--- projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -31,6 +31,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/limits.h>
 #include <sys/sbuf.h>
 
 #ifdef _KERNEL

Modified: projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c
==============================================================================
--- projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -31,6 +31,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/limits.h>
 #include <sys/sbuf.h>
 
 #ifdef _KERNEL

Modified: projects/fuse2/sys/dev/drm2/drmP.h
==============================================================================
--- projects/fuse2/sys/dev/drm2/drmP.h	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/drm2/drmP.h	Tue Jul 30 04:17:36 2019	(r350435)
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/stat.h>
 #include <sys/priv.h>
 #include <sys/proc.h>
+#include <sys/limits.h>
 #include <sys/lock.h>
 #include <sys/fcntl.h>
 #include <sys/uio.h>

Modified: projects/fuse2/sys/dev/mii/micphy.c
==============================================================================
--- projects/fuse2/sys/dev/mii/micphy.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/mii/micphy.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2014 Ruslan Bukin <br at bsdpad.com>
+ * Copyright (c) 2014,2019 Ruslan Bukin <br at bsdpad.com>
  * All rights reserved.
  *
  * This software was developed by SRI International and the University of
@@ -32,7 +32,7 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Micrel KSZ9021 Gigabit Ethernet Transceiver
+ * Micrel KSZ8081/KSZ9021/KSZ9031 Gigabit Ethernet Transceiver
  */
 
 #include <sys/param.h>
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/ofw/openfirm.h>
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
+#include <dev/mii/mii_fdt.h>
 
 #define	MII_KSZPHY_EXTREG			0x0b
 #define	 KSZPHY_EXTREG_WRITE			(1 << 15)
@@ -251,6 +252,7 @@ micphy_probe(device_t dev)
 static int
 micphy_attach(device_t dev)
 {
+	mii_fdt_phy_config_t *cfg;
 	struct mii_softc *sc;
 	phandle_t node;
 	device_t miibus;
@@ -271,10 +273,12 @@ micphy_attach(device_t dev)
 	if ((node = ofw_bus_get_node(parent)) == -1)
 		return (ENXIO);
 
+	cfg = mii_fdt_get_config(dev);
+
 	if (sc->mii_mpd_model == MII_MODEL_MICREL_KSZ9031)
-		ksz9031_load_values(sc, node);
+		ksz9031_load_values(sc, cfg->phynode);
 	else
-		ksz9021_load_values(sc, node);
+		ksz9021_load_values(sc, cfg->phynode);
 
 	return (0);
 }

Modified: projects/fuse2/sys/dev/nvme/nvme.h
==============================================================================
--- projects/fuse2/sys/dev/nvme/nvme.h	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/nvme/nvme.h	Tue Jul 30 04:17:36 2019	(r350435)
@@ -175,6 +175,9 @@
 /* SR-IOV Virtual Function */
 #define NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT		(2)
 #define NVME_CTRLR_DATA_MIC_SRIOVVF_MASK		(0x1)
+/* Asymmetric Namespace Access Reporting */
+#define NVME_CTRLR_DATA_MIC_ANAR_SHIFT			(3)
+#define NVME_CTRLR_DATA_MIC_ANAR_MASK			(0x1)
 
 /** OACS - optional admin command support */
 /* supports security send/receive commands */
@@ -204,6 +207,9 @@
 /* supports Doorbell Buffer Config */
 #define NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT		(8)
 #define NVME_CTRLR_DATA_OACS_DBBUFFER_MASK		(0x1)
+/* supports Get LBA Status */
+#define NVME_CTRLR_DATA_OACS_GETLBA_SHIFT		(9)
+#define NVME_CTRLR_DATA_OACS_GETLBA_MASK		(0x1)
 
 /** firmware updates */
 /* first slot is read-only */
@@ -212,6 +218,9 @@
 /* number of firmware slots */
 #define NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT		(1)
 #define NVME_CTRLR_DATA_FRMW_NUM_SLOTS_MASK		(0x7)
+/* firmware activation without reset */
+#define NVME_CTRLR_DATA_FRMW_ACT_WO_RESET_SHIFT		(4)
+#define NVME_CTRLR_DATA_FRMW_ACT_WO_RESET_MASK		(0x1)
 
 /** log page attributes */
 /* per namespace smart/health log page */
@@ -228,6 +237,26 @@
 #define NVME_CTRLR_DATA_APSTA_APST_SUPP_SHIFT		(0)
 #define NVME_CTRLR_DATA_APSTA_APST_SUPP_MASK		(0x1)
 
+/** Sanitize Capabilities */
+/* Crypto Erase Support  */
+#define NVME_CTRLR_DATA_SANICAP_CES_SHIFT		(0)
+#define NVME_CTRLR_DATA_SANICAP_CES_MASK		(0x1)
+/* Block Erase Support */
+#define NVME_CTRLR_DATA_SANICAP_BES_SHIFT		(1)
+#define NVME_CTRLR_DATA_SANICAP_BES_MASK		(0x1)
+/* Overwrite Support */
+#define NVME_CTRLR_DATA_SANICAP_OWS_SHIFT		(2)
+#define NVME_CTRLR_DATA_SANICAP_OWS_MASK		(0x1)
+/* No-Deallocate Inhibited  */
+#define NVME_CTRLR_DATA_SANICAP_NDI_SHIFT		(29)
+#define NVME_CTRLR_DATA_SANICAP_NDI_MASK		(0x1)
+/* No-Deallocate Modifies Media After Sanitize */
+#define NVME_CTRLR_DATA_SANICAP_NODMMAS_SHIFT		(30)
+#define NVME_CTRLR_DATA_SANICAP_NODMMAS_MASK		(0x3)
+#define NVME_CTRLR_DATA_SANICAP_NODMMAS_UNDEF		(0)
+#define NVME_CTRLR_DATA_SANICAP_NODMMAS_NO		(1)
+#define NVME_CTRLR_DATA_SANICAP_NODMMAS_YES		(2)
+
 /** submission queue entry size */
 #define NVME_CTRLR_DATA_SQES_MIN_SHIFT			(0)
 #define NVME_CTRLR_DATA_SQES_MIN_MASK			(0xF)
@@ -255,6 +284,8 @@
 #define NVME_CTRLR_DATA_ONCS_RESERV_MASK		(0x1)
 #define NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT		(6)
 #define NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK		(0x1)
+#define NVME_CTRLR_DATA_ONCS_VERIFY_SHIFT		(7)
+#define NVME_CTRLR_DATA_ONCS_VERIFY_MASK		(0x1)
 
 /** Fused Operation Support */
 #define NVME_CTRLR_DATA_FUSES_CNW_SHIFT		(0)
@@ -269,8 +300,15 @@
 #define NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK		(0x1)
 
 /** volatile write cache */
+/* volatile write cache present */
 #define NVME_CTRLR_DATA_VWC_PRESENT_SHIFT		(0)
 #define NVME_CTRLR_DATA_VWC_PRESENT_MASK		(0x1)
+/* flush all namespaces supported */
+#define NVME_CTRLR_DATA_VWC_ALL_SHIFT			(1)
+#define NVME_CTRLR_DATA_VWC_ALL_MASK			(0x3)
+#define NVME_CTRLR_DATA_VWC_ALL_UNKNOWN			(0)
+#define NVME_CTRLR_DATA_VWC_ALL_NO			(2)
+#define NVME_CTRLR_DATA_VWC_ALL_YES			(3)
 
 /** namespace features */
 /* thin provisioning */
@@ -285,6 +323,9 @@
 /* NGUID and EUI64 fields are not reusable */
 #define NVME_NS_DATA_NSFEAT_NO_ID_REUSE_SHIFT		(3)
 #define NVME_NS_DATA_NSFEAT_NO_ID_REUSE_MASK		(0x1)
+/* NPWG, NPWA, NPDG, NPDA, and NOWS are valid */
+#define NVME_NS_DATA_NSFEAT_NPVALID_SHIFT		(4)
+#define NVME_NS_DATA_NSFEAT_NPVALID_MASK		(0x1)
 
 /** formatted lba size */
 #define NVME_NS_DATA_FLBAS_FORMAT_SHIFT			(0)
@@ -793,13 +834,28 @@ struct nvme_controller_data {
 	/** Controller Attributes */
 	uint32_t		ctratt;	/* bitfield really */
 
-	uint8_t			reserved1[12];
+	/** Read Recovery Levels Supported */
+	uint16_t		rrls;
 
+	uint8_t			reserved1[9];
+
+	/** Controller Type */
+	uint8_t			cntrltype;
+
 	/** FRU Globally Unique Identifier */
 	uint8_t			fguid[16];
 
-	uint8_t			reserved2[128];
+	/** Command Retry Delay Time 1 */
+	uint16_t		crdt1;
 
+	/** Command Retry Delay Time 2 */
+	uint16_t		crdt2;
+
+	/** Command Retry Delay Time 3 */
+	uint16_t		crdt3;
+
+	uint8_t			reserved2[122];
+
 	/* bytes 256-511: admin command set attributes */
 
 	/** optional admin command support */
@@ -878,7 +934,34 @@ struct nvme_controller_data {
 	/** Sanitize Capabilities */
 	uint32_t		sanicap; /* Really a bitfield */
 
-	uint8_t			reserved3[180];
+	/** Host Memory Buffer Minimum Descriptor Entry Size */
+	uint32_t		hmminds;
+
+	/** Host Memory Maximum Descriptors Entries */
+	uint16_t		hmmaxd;
+
+	/** NVM Set Identifier Maximum */
+	uint16_t		nsetidmax;
+
+	/** Endurance Group Identifier Maximum */
+	uint16_t		endgidmax;
+
+	/** ANA Transition Time */
+	uint8_t			anatt;
+
+	/** Asymmetric Namespace Access Capabilities */
+	uint8_t			anacap;
+
+	/** ANA Group Identifier Maximum */
+	uint32_t		anagrpmax;
+
+	/** Number of ANA Group Identifiers */
+	uint32_t		nanagrpid;
+
+	/** Persistent Event Log Size */
+	uint32_t		pels;
+
+	uint8_t			reserved3[156];
 	/* bytes 512-703: nvm command set attributes */
 
 	/** submission queue entry size */
@@ -913,8 +996,10 @@ struct nvme_controller_data {
 
 	/** NVM Vendor Specific Command Configuration */
 	uint8_t			nvscc;
-	uint8_t			reserved5;
 
+	/** Namespace Write Protection Capabilities */
+	uint8_t			nwpc;
+
 	/** Atomic Compare & Write Unit */
 	uint16_t		acwu;
 	uint16_t		reserved6;
@@ -922,8 +1007,11 @@ struct nvme_controller_data {
 	/** SGL Support */
 	uint32_t		sgls;
 
+	/** Maximum Number of Allowed Namespaces */
+	uint32_t		mnan;
+
 	/* bytes 540-767: Reserved */
-	uint8_t			reserved7[228];
+	uint8_t			reserved7[224];
 
 	/** NVM Subsystem NVMe Qualified Name */
 	uint8_t			subnqn[256];
@@ -1008,9 +1096,39 @@ struct nvme_namespace_data {
 	/** NVM Capacity */
 	uint8_t			nvmcap[16];
 
-	/* bytes 64-103: Reserved */
-	uint8_t			reserved5[40];
+	/** Namespace Preferred Write Granularity  */
+	uint16_t		npwg;
 
+	/** Namespace Preferred Write Alignment */
+	uint16_t		npwa;
+
+	/** Namespace Preferred Deallocate Granularity */
+	uint16_t		npdg;
+
+	/** Namespace Preferred Deallocate Alignment */
+	uint16_t		npda;
+
+	/** Namespace Optimal Write Size */
+	uint16_t		nows;
+
+	/* bytes 74-91: Reserved */
+	uint8_t			reserved5[18];
+
+	/** ANA Group Identifier */
+	uint32_t		anagrpid;
+
+	/* bytes 96-98: Reserved */
+	uint8_t			reserved6[3];
+
+	/** Namespace Attributes */
+	uint8_t			nsattr;
+
+	/** NVM Set Identifier */
+	uint16_t		nvmsetid;
+
+	/** Endurance Group Identifier */
+	uint16_t		endgid;
+
 	/** Namespace Globally Unique Identifier */
 	uint8_t			nguid[16];
 
@@ -1020,7 +1138,7 @@ struct nvme_namespace_data {
 	/** lba format support */
 	uint32_t		lbaf[16];
 
-	uint8_t			reserved6[192];
+	uint8_t			reserved7[192];
 
 	uint8_t			vendor_specific[3712];
 } __packed __aligned(4);
@@ -1402,6 +1520,10 @@ void	nvme_controller_data_swapbytes(struct nvme_contro
 	s->rtd3e = le32toh(s->rtd3e);
 	s->oaes = le32toh(s->oaes);
 	s->ctratt = le32toh(s->ctratt);
+	s->rrls = le16toh(s->rrls);
+	s->crdt1 = le16toh(s->crdt1);
+	s->crdt2 = le16toh(s->crdt2);
+	s->crdt3 = le16toh(s->crdt3);
 	s->oacs = le16toh(s->oacs);
 	s->wctemp = le16toh(s->wctemp);
 	s->cctemp = le16toh(s->cctemp);
@@ -1415,6 +1537,13 @@ void	nvme_controller_data_swapbytes(struct nvme_contro
 	s->mntmt = le16toh(s->mntmt);
 	s->mxtmt = le16toh(s->mxtmt);
 	s->sanicap = le32toh(s->sanicap);
+	s->hmminds = le32toh(s->hmminds);
+	s->hmmaxd = le16toh(s->hmmaxd);
+	s->nsetidmax = le16toh(s->nsetidmax);
+	s->endgidmax = le16toh(s->endgidmax);
+	s->anagrpmax = le32toh(s->anagrpmax);
+	s->nanagrpid = le32toh(s->nanagrpid);
+	s->pels = le32toh(s->pels);
 	s->maxcmd = le16toh(s->maxcmd);
 	s->nn = le32toh(s->nn);
 	s->oncs = le16toh(s->oncs);
@@ -1423,6 +1552,7 @@ void	nvme_controller_data_swapbytes(struct nvme_contro
 	s->awupf = le16toh(s->awupf);
 	s->acwu = le16toh(s->acwu);
 	s->sgls = le32toh(s->sgls);
+	s->mnan = le32toh(s->mnan);
 	for (i = 0; i < 32; i++)
 		nvme_power_state_swapbytes(&s->power_state[i]);
 }
@@ -1442,6 +1572,14 @@ void	nvme_namespace_data_swapbytes(struct nvme_namespa
 	s->nabo = le16toh(s->nabo);
 	s->nabspf = le16toh(s->nabspf);
 	s->noiob = le16toh(s->noiob);
+	s->npwg = le16toh(s->npwg);
+	s->npwa = le16toh(s->npwa);
+	s->npdg = le16toh(s->npdg);
+	s->npda = le16toh(s->npda);
+	s->nows = le16toh(s->nows);
+	s->anagrpid = le32toh(s->anagrpid);
+	s->nvmsetid = le16toh(s->nvmsetid);
+	s->endgid = le16toh(s->endgid);
 	for (i = 0; i < 16; i++)
 		s->lbaf[i] = le32toh(s->lbaf[i]);
 }

Modified: projects/fuse2/sys/dev/usb/net/if_urndis.c
==============================================================================
--- projects/fuse2/sys/dev/usb/net/if_urndis.c	Tue Jul 30 03:32:39 2019	(r350434)
+++ projects/fuse2/sys/dev/usb/net/if_urndis.c	Tue Jul 30 04:17:36 2019	(r350435)
@@ -175,6 +175,9 @@ static const STRUCT_USB_HOST_ID urndis_host_devs[] = {

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


More information about the svn-src-projects mailing list