Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Three fixes: The t10-pi one is a regression from the 4.19 release, the qla2xxx one is a 4.20 merge window regression and the bnx2fc is a very old bug" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: t10-pi: Return correct ref tag when queue has no integrity profile scsi: bnx2fc: Fix NULL dereference in error handling Revert "scsi: qla2xxx: Fix NVMe Target discovery"
This commit is contained in:
@@ -39,12 +39,13 @@ struct t10_pi_tuple {
|
||||
|
||||
static inline u32 t10_pi_ref_tag(struct request *rq)
|
||||
{
|
||||
unsigned int shift = ilog2(queue_logical_block_size(rq->q));
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INTEGRITY
|
||||
return blk_rq_pos(rq) >>
|
||||
(rq->q->integrity.interval_exp - 9) & 0xffffffff;
|
||||
#else
|
||||
return -1U;
|
||||
if (rq->q->integrity.interval_exp)
|
||||
shift = rq->q->integrity.interval_exp;
|
||||
#endif
|
||||
return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff;
|
||||
}
|
||||
|
||||
extern const struct blk_integrity_profile t10_pi_type1_crc;
|
||||
|
Reference in New Issue
Block a user