Skip to content

Commit

Permalink
scsi: zfcp: Use the proper SCSI midlayer interfaces for PI
Browse files Browse the repository at this point in the history
Use scsi_prot_ref_tag() and scsi_prot_interval() instead scsi_get_lba() and
sector_size.

Link: https://lore.kernel.org/r/20210609033929.3815-7-martin.petersen@oracle.com
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Message-Id: <20210609033929.3815-7-martin.petersen@oracle.com>
  • Loading branch information
Martin K. Petersen committed Jul 21, 2021
1 parent e2e9cd6 commit 73e61d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2599,8 +2599,8 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd)
io->fcp_cmnd_length = FCP_CMND_LEN;

if (scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) {
io->data_block_length = scsi_cmnd->device->sector_size;
io->ref_tag_value = scsi_get_lba(scsi_cmnd) & 0xFFFFFFFF;
io->data_block_length = scsi_prot_interval(scsi_cmnd);
io->ref_tag_value = scsi_prot_ref_tag(scsi_cmnd);
}

if (zfcp_fsf_set_data_dir(scsi_cmnd, &io->data_direction))
Expand Down

0 comments on commit 73e61d5

Please sign in to comment.