Commit 73e61d5c authored by Martin K. Petersen's avatar Martin K. Petersen

scsi: zfcp: Use the proper SCSI midlayer interfaces for PI

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.comReviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Message-Id: <20210609033929.3815-7-martin.petersen@oracle.com>
parent e2e9cd68
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment