scsi: isci: Use the proper SCSI midlayer interfaces for PI
Use scsi_prot_ref_tag() instead of scsi_get_lba() to get the reference tag for a given I/O. Link: https://lore.kernel.org/r/20210806040023.5355-3-martin.petersen@oracle.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Родитель
6a20e21ae1
Коммит
4cc0096e2d
|
@ -341,7 +341,7 @@ static void scu_ssp_ireq_dif_insert(struct isci_request *ireq, u8 type, u8 op)
|
|||
tc->reserved_E8_0 = 0;
|
||||
|
||||
if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2))
|
||||
tc->ref_tag_seed_gen = scsi_get_lba(scmd) & 0xffffffff;
|
||||
tc->ref_tag_seed_gen = scsi_prot_ref_tag(scmd);
|
||||
else if (type & SCSI_PROT_DIF_TYPE3)
|
||||
tc->ref_tag_seed_gen = 0;
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ static void scu_ssp_ireq_dif_strip(struct isci_request *ireq, u8 type, u8 op)
|
|||
tc->app_tag_gen = 0;
|
||||
|
||||
if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2))
|
||||
tc->ref_tag_seed_verify = scsi_get_lba(scmd) & 0xffffffff;
|
||||
tc->ref_tag_seed_verify = scsi_prot_ref_tag(scmd);
|
||||
else if (type & SCSI_PROT_DIF_TYPE3)
|
||||
tc->ref_tag_seed_verify = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче