svn commit: r360003 - head/usr.sbin/mpsutil

Scott Long scottl at FreeBSD.org
Thu Apr 16 04:17:07 UTC 2020


Author: scottl
Date: Thu Apr 16 04:17:06 2020
New Revision: 360003
URL: https://svnweb.freebsd.org/changeset/base/360003

Log:
  Add support for some IOCFacts fields that are available with mpr (12Gb)
  controllers.  It's ugly due to the single codebase for mpr and mps and
  not being able to share their respective headers.

Modified:
  head/usr.sbin/mpsutil/mps_show.c

Modified: head/usr.sbin/mpsutil/mps_show.c
==============================================================================
--- head/usr.sbin/mpsutil/mps_show.c	Thu Apr 16 03:33:46 2020	(r360002)
+++ head/usr.sbin/mpsutil/mps_show.c	Thu Apr 16 04:17:06 2020	(r360003)
@@ -201,6 +201,7 @@ static int
 show_iocfacts(int ac, char **av)
 {
 	MPI2_IOC_FACTS_REPLY *facts;
+	uint8_t *fb;
 	char tmpbuf[128];
 	int error, fd;
 
@@ -217,6 +218,8 @@ show_iocfacts(int ac, char **av)
 		return (errno);
 	}
 
+	fb = (uint8_t *)facts;
+
 #define IOCCAP "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" \
     "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" \
     "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc" \
@@ -250,6 +253,8 @@ show_iocfacts(int ac, char **av)
 	    facts->FWVersion.Struct.Major, facts->FWVersion.Struct.Minor,
 	    facts->FWVersion.Struct.Unit, facts->FWVersion.Struct.Dev);
 	printf(" IOCRequestFrameSize: %d\n", facts->IOCRequestFrameSize);
+	if (is_mps == 0)
+		printf(" MaxChainSegmentSize: %d\n", (uint16_t)(fb[0x26]));
 	printf("       MaxInitiators: %d\n", facts->MaxInitiators);
 	printf("          MaxTargets: %d\n", facts->MaxTargets);
 	printf("     MaxSasExpanders: %d\n", facts->MaxSasExpanders);
@@ -267,6 +272,8 @@ show_iocfacts(int ac, char **av)
 	printf("        MaxDevHandle: %d\n", facts->MaxDevHandle);
 	printf("MaxPersistentEntries: %d\n", facts->MaxPersistentEntries);
 	printf("        MinDevHandle: %d\n", facts->MinDevHandle);
+	if (is_mps == 0)
+		printf(" CurrentHostPageSize: %d\n", (uint8_t)(fb[0x3e]));
 
 	free(facts);
 	return (0);


More information about the svn-src-all mailing list