mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
storage: Update VSC driver for handling erase
1. If vs_blk_dev_config.req_ops_supported has only DISCARD support enabled, then REQ_OP_DISCARD should be mapped to DISCARD for UFS. 2. If vs_blk_dev_config.req_ops_supported has only SECURE_ERASE support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE both should be mapped to SECURE_ERASE for UFS. 3. If vs_blk_dev_config.req_ops_supported has only ERASE support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE both should be mapped to ERASE for UFS. Bug 4176555 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Change-Id: I01599df9ab93525120106dfabf2d345ab8b64770 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920433 Reviewed-by: Sanjith T D <std@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6fa354a3b2
commit
7e764afb5f
@@ -46,6 +46,7 @@ enum blk_cmd_op {
|
||||
VS_BLK_DISCARD = 4,
|
||||
VS_BLK_SECURE_ERASE = 5,
|
||||
VS_BLK_IOCTL = 6,
|
||||
VS_BLK_ERASE = 7,
|
||||
VS_BLK_INVAL_REQ = 32,
|
||||
VS_UNKNOWN_BLK_CMD = 0xffffffff,
|
||||
};
|
||||
@@ -57,6 +58,7 @@ enum blk_cmd_op {
|
||||
#define VS_BLK_DISCARD_OP_F (1 << VS_BLK_DISCARD)
|
||||
#define VS_BLK_SECURE_ERASE_OP_F (1 << VS_BLK_SECURE_ERASE)
|
||||
#define VS_BLK_IOCTL_OP_F (1 << VS_BLK_IOCTL)
|
||||
#define VS_BLK_ERASE_OP_F (1 << VS_BLK_ERASE)
|
||||
#define VS_BLK_READ_ONLY_MASK ~(VS_BLK_READ_OP_F)
|
||||
|
||||
#pragma pack(push)
|
||||
|
||||
Reference in New Issue
Block a user