diff options
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r-- | drivers/scsi/sd.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 86b18d4170fe..550b2f70a1f8 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h | |||
@@ -82,4 +82,29 @@ enum sd_dif_target_protection_types { | |||
82 | SD_DIF_TYPE3_PROTECTION = 0x3, | 82 | SD_DIF_TYPE3_PROTECTION = 0x3, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* | ||
86 | * Data Integrity Field tuple. | ||
87 | */ | ||
88 | struct sd_dif_tuple { | ||
89 | __be16 guard_tag; /* Checksum */ | ||
90 | __be16 app_tag; /* Opaque storage */ | ||
91 | __be32 ref_tag; /* Target LBA or indirect LBA */ | ||
92 | }; | ||
93 | |||
94 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
95 | |||
96 | extern void sd_dif_op(struct scsi_cmnd *, unsigned int, unsigned int); | ||
97 | extern void sd_dif_config_host(struct scsi_disk *); | ||
98 | extern int sd_dif_prepare(struct request *rq, sector_t, unsigned int); | ||
99 | extern void sd_dif_complete(struct scsi_cmnd *, unsigned int); | ||
100 | |||
101 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | ||
102 | |||
103 | #define sd_dif_op(a, b, c) do { } while (0) | ||
104 | #define sd_dif_config_host(a) do { } while (0) | ||
105 | #define sd_dif_prepare(a, b, c) (0) | ||
106 | #define sd_dif_complete(a, b) (0) | ||
107 | |||
108 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | ||
109 | |||
85 | #endif /* _SCSI_DISK_H */ | 110 | #endif /* _SCSI_DISK_H */ |