Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2016 14:17:51 -0400
From:      Ken Merry <ken@kdm.org>
To:        Sean Bruno <sbruno@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r302253 - head/sys/cam/scsi
Message-ID:  <71476326-3FAC-4E49-884F-0A2F38177D99@kdm.org>
In-Reply-To: <201606281808.u5SI8l7h091906@repo.freebsd.org>
References:  <201606281808.u5SI8l7h091906@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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’t get around to commenting on the PR, otherwise I would have caught this previously.

Ken
— 
Ken Merry
ken@FreeBSD.ORG



> On Jun 28, 2016, at 2:08 PM, Sean Bruno <sbruno@FreeBSD.org> wrote:
> 
> Author: sbruno
> Date: Tue Jun 28 18:08:47 2016
> New Revision: 302253
> URL: https://svnweb.freebsd.org/changeset/base/302253
> 
> Log:
>  Correct PERSISTENT RESERVE OUT command and populate scsi_cmd->length.
> 
>  PR:		202625
>  Submitted by:	niakrisn@gmail.com
>  Reviewed by:	scottl
>  Approved by:	re (hrs)
>  MFC after:	2 weeks
> 
> Modified:
>  head/sys/cam/scsi/scsi_all.c
> 
> Modified: head/sys/cam/scsi/scsi_all.c
> ==============================================================================
> --- 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 = PERSISTENT_RES_OUT;
> 	scsi_cmd->action = service_action;
> 	scsi_cmd->scope_type = scope | res_type;
> +	scsi_ulto2b(dxfer_len, scsi_cmd->length);
> 
> 	cam_fill_csio(csio,
> 		      retries,
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71476326-3FAC-4E49-884F-0A2F38177D99>