diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-21 10:46:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-21 10:46:08 -0500 |
commit | cd6a22310ec2a70092e136d0cd65bb77c1502521 (patch) | |
tree | c01fa788b27b240c7b426d7f329d92bd58c7b8f5 /include/linux/t10-pi.h | |
parent | 1e12a521d6917004f8b95a3b5864b92edc2694c8 (diff) | |
parent | 177c459b08a34dcf004aa9a4c1f1d8be682ff3af (diff) |
Merge USB 4.20-rc8 mergepoint into usb-next
We need the USB changes in here for additional patches to be able to
apply cleanly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/t10-pi.h')
-rw-r--r-- | include/linux/t10-pi.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/t10-pi.h b/include/linux/t10-pi.h index b9626aa7e90c..3e2a80cc7b56 100644 --- a/include/linux/t10-pi.h +++ b/include/linux/t10-pi.h | |||
@@ -39,12 +39,13 @@ struct t10_pi_tuple { | |||
39 | 39 | ||
40 | static inline u32 t10_pi_ref_tag(struct request *rq) | 40 | static inline u32 t10_pi_ref_tag(struct request *rq) |
41 | { | 41 | { |
42 | unsigned int shift = ilog2(queue_logical_block_size(rq->q)); | ||
43 | |||
42 | #ifdef CONFIG_BLK_DEV_INTEGRITY | 44 | #ifdef CONFIG_BLK_DEV_INTEGRITY |
43 | return blk_rq_pos(rq) >> | 45 | if (rq->q->integrity.interval_exp) |
44 | (rq->q->integrity.interval_exp - 9) & 0xffffffff; | 46 | shift = rq->q->integrity.interval_exp; |
45 | #else | ||
46 | return -1U; | ||
47 | #endif | 47 | #endif |
48 | return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff; | ||
48 | } | 49 | } |
49 | 50 | ||
50 | extern const struct blk_integrity_profile t10_pi_type1_crc; | 51 | extern const struct blk_integrity_profile t10_pi_type1_crc; |