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
[email protected]



> On Jun 28, 2016, at 2:08 PM, Sean Bruno <[email protected]> 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:        [email protected]
>  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,
> 

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to