summaryrefslogtreecommitdiff
path: root/security/pfe/pfk.c
diff options
context:
space:
mode:
authorAndrey Markovytch <andreym@codeaurora.org>2017-02-08 14:32:22 +0200
committerGerrit - the friendly Code Review server <code-review@localhost>2017-02-08 04:35:20 -0800
commita1cd6239e49dc1a6a3d34ad555745da103a79350 (patch)
tree89eed10d333e7a0d7bbb18c41453ed97747b7d8c /security/pfe/pfk.c
parent2aa89ab3ff59a788321bc6af782d639cfc8dab1f (diff)
ice: fix issue with losing ICE key configuration during reset
TZ is called to restore key configuration in case of UFS reset Change-Id: Id434e7f9ec6befdce97f52fd350957b66adcb15f Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Diffstat (limited to 'security/pfe/pfk.c')
-rw-r--r--security/pfe/pfk.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/security/pfe/pfk.c b/security/pfe/pfk.c
index 7e38c9fbf171..2e5aa2fb6688 100644
--- a/security/pfe/pfk.c
+++ b/security/pfe/pfk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -476,6 +476,18 @@ bool pfk_allow_merge_bio(const struct bio *bio1, const struct bio *bio2)
return (*(pfk_allow_merge_bio_ftable[which_pfe1]))(bio1, bio2,
inode1, inode2);
}
+/**
+ * Flush key table on storage core reset. During core reset key configuration
+ * is lost in ICE. We need to flash the cache, so that the keys will be
+ * reconfigured again for every subsequent transaction
+ */
+void pfk_clear_on_reset(void)
+{
+ if (!pfk_is_ready())
+ return;
+
+ pfk_kc_clear_on_reset();
+}
module_init(pfk_init);
module_exit(pfk_exit);