aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r--drivers/scsi/sd.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index c9d8f6ca49e2..6ad798bfd52a 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -43,6 +43,15 @@ enum {
43 SD_MEMPOOL_SIZE = 2, /* CDB pool size */ 43 SD_MEMPOOL_SIZE = 2, /* CDB pool size */
44}; 44};
45 45
46enum {
47 SD_LBP_FULL = 0, /* Full logical block provisioning */
48 SD_LBP_UNMAP, /* Use UNMAP command */
49 SD_LBP_WS16, /* Use WRITE SAME(16) with UNMAP bit */
50 SD_LBP_WS10, /* Use WRITE SAME(10) with UNMAP bit */
51 SD_LBP_ZERO, /* Use WRITE SAME(10) with zero payload */
52 SD_LBP_DISABLE, /* Discard disabled due to failed cmd */
53};
54
46struct scsi_disk { 55struct scsi_disk {
47 struct scsi_driver *driver; /* always &sd_template */ 56 struct scsi_driver *driver; /* always &sd_template */
48 struct scsi_device *device; 57 struct scsi_device *device;
@@ -50,21 +59,27 @@ struct scsi_disk {
50 struct gendisk *disk; 59 struct gendisk *disk;
51 atomic_t openers; 60 atomic_t openers;
52 sector_t capacity; /* size in 512-byte sectors */ 61 sector_t capacity; /* size in 512-byte sectors */
62 u32 max_ws_blocks;
63 u32 max_unmap_blocks;
64 u32 unmap_granularity;
65 u32 unmap_alignment;
53 u32 index; 66 u32 index;
54 unsigned int physical_block_size; 67 unsigned int physical_block_size;
55 u8 media_present; 68 u8 media_present;
56 u8 write_prot; 69 u8 write_prot;
57 u8 protection_type;/* Data Integrity Field */ 70 u8 protection_type;/* Data Integrity Field */
71 u8 provisioning_mode;
58 unsigned ATO : 1; /* state of disk ATO bit */ 72 unsigned ATO : 1; /* state of disk ATO bit */
59 unsigned WCE : 1; /* state of disk WCE bit */ 73 unsigned WCE : 1; /* state of disk WCE bit */
60 unsigned RCD : 1; /* state of disk RCD bit, unused */ 74 unsigned RCD : 1; /* state of disk RCD bit, unused */
61 unsigned DPOFUA : 1; /* state of disk DPOFUA bit */ 75 unsigned DPOFUA : 1; /* state of disk DPOFUA bit */
62 unsigned first_scan : 1; 76 unsigned first_scan : 1;
63 unsigned thin_provisioning : 1; 77 unsigned lbpme : 1;
64 unsigned unmap : 1; 78 unsigned lbprz : 1;
65 unsigned tpws : 1; 79 unsigned lbpu : 1;
66 unsigned tpu : 1; 80 unsigned lbpws : 1;
67 unsigned tpvpd : 1; 81 unsigned lbpws10 : 1;
82 unsigned lbpvpd : 1;
68}; 83};
69#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev) 84#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
70 85