diff options
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r-- | drivers/scsi/sd.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 03a3d45cfa42..86b18d4170fe 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h | |||
@@ -41,7 +41,9 @@ struct scsi_disk { | |||
41 | u32 index; | 41 | u32 index; |
42 | u8 media_present; | 42 | u8 media_present; |
43 | u8 write_prot; | 43 | u8 write_prot; |
44 | u8 protection_type;/* Data Integrity Field */ | ||
44 | unsigned previous_state : 1; | 45 | unsigned previous_state : 1; |
46 | unsigned ATO : 1; /* state of disk ATO bit */ | ||
45 | unsigned WCE : 1; /* state of disk WCE bit */ | 47 | unsigned WCE : 1; /* state of disk WCE bit */ |
46 | unsigned RCD : 1; /* state of disk RCD bit, unused */ | 48 | unsigned RCD : 1; /* state of disk RCD bit, unused */ |
47 | unsigned DPOFUA : 1; /* state of disk DPOFUA bit */ | 49 | unsigned DPOFUA : 1; /* state of disk DPOFUA bit */ |
@@ -59,4 +61,25 @@ static inline struct scsi_disk *scsi_disk(struct gendisk *disk) | |||
59 | (sdsk)->disk->disk_name, ##a) : \ | 61 | (sdsk)->disk->disk_name, ##a) : \ |
60 | sdev_printk(prefix, (sdsk)->device, fmt, ##a) | 62 | sdev_printk(prefix, (sdsk)->device, fmt, ##a) |
61 | 63 | ||
64 | /* | ||
65 | * A DIF-capable target device can be formatted with different | ||
66 | * protection schemes. Currently 0 through 3 are defined: | ||
67 | * | ||
68 | * Type 0 is regular (unprotected) I/O | ||
69 | * | ||
70 | * Type 1 defines the contents of the guard and reference tags | ||
71 | * | ||
72 | * Type 2 defines the contents of the guard and reference tags and | ||
73 | * uses 32-byte commands to seed the latter | ||
74 | * | ||
75 | * Type 3 defines the contents of the guard tag only | ||
76 | */ | ||
77 | |||
78 | enum sd_dif_target_protection_types { | ||
79 | SD_DIF_TYPE0_PROTECTION = 0x0, | ||
80 | SD_DIF_TYPE1_PROTECTION = 0x1, | ||
81 | SD_DIF_TYPE2_PROTECTION = 0x2, | ||
82 | SD_DIF_TYPE3_PROTECTION = 0x3, | ||
83 | }; | ||
84 | |||
62 | #endif /* _SCSI_DISK_H */ | 85 | #endif /* _SCSI_DISK_H */ |