Re: [Ocf-linux-users] Make sure HW crypto driver is loaded before cryptosoft
Brought to you by:
david-m
|
From: David M. <Dav...@se...> - 2009-02-25 04:05:33
|
Jivin Hector Palacios lays it down ...
> Hi,
>
> For HW acceleration to work, the kernel crypto driver must be loaded
> *before* the cryptosoft module is loaded.
> When building these as loadable modules, it is just a question of
> loading the modules in the correct order:
> modprobe <hw-driver>
> modprobe cryptosoft
> modprobe cryptodev
>
> Now, if I want to have these as built-in features instead of loadable
> modules, how can I guarantee that <hw-driver> is loaded before
> cryptosoft? My driver is a platform device and it is currently being
> probed *after* the kernel has loaded the cryptosoft, so it is not
> working (OCF doesn't know about my driver).
You could try changing the "module_init" in cryptosoft to be "late_initcall",
try this patch, not sure if it will work or not :-)
Cheers,
Davidm
Index: ocf/cryptosoft.c
===================================================================
RCS file: /cvs/sw/new-wave/modules/ocf/cryptosoft.c,v
retrieving revision 1.40
diff -u -r1.40 cryptosoft.c
--- ocf/cryptosoft.c 19 Jan 2009 05:06:12 -0000 1.40
+++ ocf/cryptosoft.c 25 Feb 2009 04:04:49 -0000
@@ -891,7 +891,7 @@
swcr_id = -1;
}
-module_init(cryptosoft_init);
+late_initcall(cryptosoft_init);
module_exit(cryptosoft_exit);
MODULE_LICENSE("Dual BSD/GPL");
--
David McCullough, dav...@se..., Ph:+61 734352815
McAfee - SnapGear http://www.snapgear.com http://www.uCdot.org
|