From owner-svn-src-all@freebsd.org Thu Nov 5 07:48:49 2015 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 F1856A26F02; Thu, 5 Nov 2015 07:48:49 +0000 (UTC) (envelope-from ngie@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 A34721639; Thu, 5 Nov 2015 07:48:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA57mmSC080063; Thu, 5 Nov 2015 07:48:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA57mm9q080061; Thu, 5 Nov 2015 07:48:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511050748.tA57mm9q080061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Nov 2015 07:48:48 +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: r290385 - in stable/10: sbin/camcontrol share/misc 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.20 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: Thu, 05 Nov 2015 07:48:50 -0000 Author: ngie Date: Thu Nov 5 07:48:48 2015 New Revision: 290385 URL: https://svnweb.freebsd.org/changeset/base/290385 Log: MFC r289913,r289916: r289913: Use 't' (bits) not 'i' (bytes) for describing MRIE (aka "Method of Reporting Informational Exceptions") in the SCSI mode database as the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is 4 bits wide, not 4 bytes wide 1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf Bug 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division r289916: Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the mode value isn't always clipped to -1 when (resolution * size) == 32, which would have been the case with values => {4i,32b,32t}. This seems to have been broken in r64382. PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/camcontrol/modeedit.c stable/10/share/misc/scsi_modes Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/modeedit.c ============================================================================== --- stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:48:48 2015 (r290385) @@ -246,7 +246,7 @@ editentry_set(char *name, char *newvalue * currently workaround it (even for int64's), so we have to kludge it. */ #define RESOLUTION_MAX(size) ((resolution * (size) == 32)? \ - (int)0xffffffff: (1 << (resolution * (size))) - 1) + INT_MAX: (1 << (resolution * (size))) - 1) assert(newvalue != NULL); if (*newvalue == '\0') Modified: stable/10/share/misc/scsi_modes ============================================================================== --- stable/10/share/misc/scsi_modes Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/share/misc/scsi_modes Thu Nov 5 07:48:48 2015 (r290385) @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} b4 + {MRIE} t4 {Interval Timer} i4 {Report Count} i4 }