aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/mtip32xx/mtip32xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.h')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h
index d782b1aa913..3bffff5f670 100644
--- a/drivers/block/mtip32xx/mtip32xx.h
+++ b/drivers/block/mtip32xx/mtip32xx.h
@@ -178,6 +178,21 @@ struct mtip_work {
mtip_workq_sdbfx(w->port, group, w->completed); \
}
+#define MTIP_TRIM_TIMEOUT_MS 240000
+#define MTIP_MAX_TRIM_ENTRIES 8
+#define MTIP_MAX_TRIM_ENTRY_LEN 0xfff8
+
+struct mtip_trim_entry {
+ u32 lba; /* starting lba of region */
+ u16 rsvd; /* unused */
+ u16 range; /* # of 512b blocks to trim */
+} __packed;
+
+struct mtip_trim {
+ /* Array of regions to trim */
+ struct mtip_trim_entry entry[MTIP_MAX_TRIM_ENTRIES];
+} __packed;
+
/* Register Frame Information Structure (FIS), host to device. */
struct host_to_dev_fis {
/*
@@ -473,6 +488,8 @@ struct driver_data {
struct dentry *dfs_node;
+ bool trim_supp; /* flag indicating trim support */
+
int numa_node; /* NUMA support */
char workq_name[32];