From owner-svn-src-head@freebsd.org Thu Apr 16 04:17:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F4772ADDF3; Thu, 16 Apr 2020 04:17:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 492mC70SJvz3Pkq; Thu, 16 Apr 2020 04:17:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0559E2818; Thu, 16 Apr 2020 04:17:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03G4H6Di093291; Thu, 16 Apr 2020 04:17:06 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03G4H6cX093290; Thu, 16 Apr 2020 04:17:06 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202004160417.03G4H6cX093290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 16 Apr 2020 04:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360003 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 360003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 04:17:07 -0000 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);