From owner-svn-src-all@freebsd.org Mon May 8 17:21:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29B55D63DCE; Mon, 8 May 2017 17:21:59 +0000 (UTC) (envelope-from ken@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 mx1.freebsd.org (Postfix) with ESMTPS id C4E441997; Mon, 8 May 2017 17:21:58 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HLvPL047325; Mon, 8 May 2017 17:21:57 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HLvAQ047324; Mon, 8 May 2017 17:21:57 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081721.v48HLvAQ047324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r317962 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:21:59 -0000 Author: ken Date: Mon May 8 17:21:57 2017 New Revision: 317962 URL: https://svnweb.freebsd.org/changeset/base/317962 Log: MFC r317799: Add the SCSI Solid State Media Log page (0x11) definition. sys/cam/scsi/scsi_all.h: Add the SCSI Solid State Media log page (0x11) structure definition. This gives the percentage used (in terms of lifetime flash wear) of an SSD. Sponsored by: Spectra Logic Modified: stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon May 8 17:21:55 2017 (r317961) +++ stable/10/sys/cam/scsi/scsi_all.h Mon May 8 17:21:57 2017 (r317962) @@ -565,6 +565,7 @@ struct scsi_log_sense #define SLS_ERROR_LASTN_PAGE 0x07 #define SLS_LOGICAL_BLOCK_PROVISIONING 0x0c #define SLS_SELF_TEST_PAGE 0x10 +#define SLS_SOLID_STATE_MEDIA 0x11 #define SLS_STAT_AND_PERF 0x19 #define SLS_IE_PAGE 0x2f #define SLS_PAGE_CTRL_MASK 0xC0 @@ -624,6 +625,13 @@ struct scsi_log_param_header { u_int8_t param_len; }; +struct scsi_log_media_pct_used { + struct scsi_log_param_header hdr; +#define SLP_SS_MEDIA_PCT_USED 0x0001 + uint8_t reserved[3]; + uint8_t pct_used; +}; + struct scsi_log_stat_and_perf { struct scsi_log_param_header hdr; #define SLP_SAP 0x0001