svn commit: r356392 - head/sbin/nvmecontrol

Alexander Motin mav at FreeBSD.org
Mon Jan 6 01:51:23 UTC 2020


Author: mav
Date: Mon Jan  6 01:51:23 2020
New Revision: 356392
URL: https://svnweb.freebsd.org/changeset/base/356392

Log:
  Fix host memory buffer sizes reporting.
  
  Hardware reports values in 4KB units, not in bytes.
  
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/identify_ext.c

Modified: head/sbin/nvmecontrol/identify_ext.c
==============================================================================
--- head/sbin/nvmecontrol/identify_ext.c	Mon Jan  6 01:15:35 2020	(r356391)
+++ head/sbin/nvmecontrol/identify_ext.c	Mon Jan  6 01:51:23 2020	(r356392)
@@ -192,8 +192,10 @@ nvme_print_controller(struct nvme_controller_data *cda
 		    uint128_to_str(to128(cdata->untncap.unvmcap),
 		    cbuf, sizeof(cbuf)));
 	}
-	printf("Host Buffer Preferred Size:  %d bytes\n", cdata->hmpre);
-	printf("Host Buffer Minimum Size:    %d bytes\n", cdata->hmmin);
+	printf("Host Buffer Preferred Size:  %llu bytes\n",
+	    (long long unsigned)cdata->hmpre * 4096);
+	printf("Host Buffer Minimum Size:    %llu bytes\n",
+	    (long long unsigned)cdata->hmmin * 4096);
 
 	printf("\n");
 	printf("NVM Command Set Attributes\n");


More information about the svn-src-all mailing list