diff options
author | Asai Thambi S P <asamymuthupa@micron.com> | 2013-01-11 17:41:34 +0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-01-11 17:41:34 +0400 |
commit | 152834694dcb90d3088bc77fa436755c66553929 (patch) | |
tree | 0235dc7a7b0d1be0dabeb28b9fe720aa4acf9d20 /drivers/block/mtip32xx/mtip32xx.h | |
parent | 16c906e51c6f08a15763a85b5686e1ded35e77ab (diff) | |
download | linux-152834694dcb90d3088bc77fa436755c66553929.tar.xz |
mtip32xx: add trim support
TRIM support added through vendor unique command.
Signed-off-by: Sam Bradshaw < sbradshaw@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.h')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h index d782b1aa913e..3bffff5f670c 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]; |