From owner-svn-src-all@freebsd.org Tue Jun 28 18:17:59 2016 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 A4105B855EA; Tue, 28 Jun 2016 18:17:59 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7287622CC; Tue, 28 Jun 2016 18:17:59 +0000 (UTC) (envelope-from ken@kdm.org) Received: from [10.0.0.27] (mbp2013-wired.int.kdm.org [10.0.0.27]) (authenticated bits=0) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPSA id u5SIHpfu016242 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Jun 2016 14:17:52 -0400 (EDT) (envelope-from ken@kdm.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r302253 - head/sys/cam/scsi From: Ken Merry In-Reply-To: <201606281808.u5SI8l7h091906@repo.freebsd.org> Date: Tue, 28 Jun 2016 14:17:51 -0400 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <71476326-3FAC-4E49-884F-0A2F38177D99@kdm.org> References: <201606281808.u5SI8l7h091906@repo.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.3124) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [96.89.93.250]); Tue, 28 Jun 2016 14:17:52 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 28 Jun 2016 18:17:59 -0000 This is incorrect. It should be scsi_ulto4b() instead. The dxfer_len argument to scsi_persistent_reserve_out() is a uint32_t, = and the length field in the CDB structure is 4 bytes long. Sorry I didn=E2=80=99t get around to commenting on the PR, otherwise I = would have caught this previously. Ken =E2=80=94=20 Ken Merry ken@FreeBSD.ORG > On Jun 28, 2016, at 2:08 PM, Sean Bruno wrote: >=20 > Author: sbruno > Date: Tue Jun 28 18:08:47 2016 > New Revision: 302253 > URL: https://svnweb.freebsd.org/changeset/base/302253 >=20 > Log: > Correct PERSISTENT RESERVE OUT command and populate scsi_cmd->length. >=20 > PR: 202625 > Submitted by: niakrisn@gmail.com > Reviewed by: scottl > Approved by: re (hrs) > MFC after: 2 weeks >=20 > Modified: > head/sys/cam/scsi/scsi_all.c >=20 > Modified: head/sys/cam/scsi/scsi_all.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/scsi/scsi_all.c Tue Jun 28 16:43:23 2016 = (r302252) > +++ head/sys/cam/scsi/scsi_all.c Tue Jun 28 18:08:47 2016 = (r302253) > @@ -8788,6 +8788,7 @@ scsi_persistent_reserve_out(struct ccb_s > scsi_cmd->opcode =3D PERSISTENT_RES_OUT; > scsi_cmd->action =3D service_action; > scsi_cmd->scope_type =3D scope | res_type; > + scsi_ulto2b(dxfer_len, scsi_cmd->length); >=20 > cam_fill_csio(csio, > retries, >=20