summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/crc-t10dif.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c
index 52f577a3868d..6507fa101eff 100644
--- a/lib/crc-t10dif.c
+++ b/lib/crc-t10dif.c
@@ -107,6 +107,17 @@ static void __exit crc_t10dif_mod_fini(void)
107module_init(crc_t10dif_mod_init); 107module_init(crc_t10dif_mod_init);
108module_exit(crc_t10dif_mod_fini); 108module_exit(crc_t10dif_mod_fini);
109 109
110static int crc_t10dif_transform_show(char *buffer, const struct kernel_param *kp)
111{
112 if (static_key_false(&crct10dif_fallback))
113 return sprintf(buffer, "fallback\n");
114
115 return sprintf(buffer, "%s\n",
116 crypto_tfm_alg_driver_name(crypto_shash_tfm(crct10dif_tfm)));
117}
118
119module_param_call(transform, NULL, crc_t10dif_transform_show, NULL, 0644);
120
110MODULE_DESCRIPTION("T10 DIF CRC calculation"); 121MODULE_DESCRIPTION("T10 DIF CRC calculation");
111MODULE_LICENSE("GPL"); 122MODULE_LICENSE("GPL");
112MODULE_SOFTDEP("pre: crct10dif"); 123MODULE_SOFTDEP("pre: crct10dif");