From owner-freebsd-current@FreeBSD.ORG Thu Nov 13 18:16:07 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A04FC6; Thu, 13 Nov 2014 18:16:07 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2A56B; Thu, 13 Nov 2014 18:16:07 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id fp1so15051196pdb.13 for ; Thu, 13 Nov 2014 10:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ON283uNws9BTwlzQ6QhoXjxYR31ocQXuD2tAJugIFp4=; b=FzIP1eZOhjq2RnPR34NsrYaCYJPd0deCWA/mflMd+vqvpKlvCXfwltlxN1H0lK1B19 VdgfqgIwrHx1pjZqtGNI67hpWd8L6NAUbQq5ompxNx+glVW9J7nYpop3gB97PGTtYVFy u4vDJGncuKQXI+JXlzxJpETKTDN6720eLJWCDPOdmj406OtKYEw+klSr+bJQlfk/J6yK 7RzIvq8VRo8gwF2vVjeAndKYF4Ky3FYM2T82GCpN08LbDzOsyeOYxAglvyPR3etZVcqL A+BT0AT9TXw9ZHcJ/2yXN2YTyGbHpbSgmibxDD59Kc0jfEga3k/IByhCckDaIaV2W6Tk X0Eg== X-Received: by 10.66.141.167 with SMTP id rp7mr4469031pab.118.1415902567094; Thu, 13 Nov 2014 10:16:07 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([12.229.62.2]) by mx.google.com with ESMTPSA id r15sm7052887pdn.23.2014.11.13.10.16.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 10:16:06 -0800 (PST) Sender: Alexander Motin Message-ID: <5464F565.1070105@FreeBSD.org> Date: Thu, 13 Nov 2014 20:16:05 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: NGie Cooper , "Rang, Anton" Subject: Re: Minor bug in SCSI definition References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Scott Long , "freebsd-current@freebsd.org" , "Kenneth D. Merry" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 18:16:07 -0000 On 13.11.2014 05:44, NGie Cooper wrote: > On Wed, Nov 12, 2014 at 7:30 PM, Rang, Anton wrote: >> Coverity found an issue in this area which I tracked down to the incorrect definition patched below. >> >> The SID_QUAL macro is (((inq_data)->device & 0xE0) >> 5) which extracts the peripheral qualifier. >> Per SCSI-2 (draft 10L) table 46, the vendor-specific values are "1XXb". >> >> This probably affects almost nobody, but it will clear up a couple of Coverity warnings. >> >> Anton >> >> Index: sys/cam/scsi/scsi_all.h >> =================================================================== >> --- sys/cam/scsi/scsi_all.h (revision 274352) >> +++ sys/cam/scsi/scsi_all.h (working copy) >> @@ -1817,7 +1817,7 @@ >> * reserved for this peripheral >> * qualifier. >> */ >> -#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & 0x08) != 0) >> +#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & 0x04) != 0) >> u_int8_t dev_qual2; >> #define SID_QUAL2 0x7F >> #define SID_LU_CONG 0x40 > > CCing ken@/mav@/scottl@ -- thanks! Looks good to me. Committed it to head at r274477. Thank you! -- Alexander Motin