No, the async hash crypto API should not wait for the DMA to complete.

>> + /* init crc results */>> + *(__le32 *)req->result =>> + cpu_to_le32p(&crc_ctx->key);>>right handed casts are generally frowned upon if not banned. plus, result is a u8*,>so it seems like a pretty bad idea to do this on a Blackfin (which doesn't allow>unaligned accesses). isn't this what you want:> put_unaligned_le32(crc_ctx->key, req->result);

The result element in structure ahash_request is always 4-byte aligned. So, put_unaligned_le32 is not necessary.Of course, it is fine as well.

Wait_for_completion_timeout() depends on an LUTDONE interrupt to wake up the probing task. But, there is no such interrupt available in bfin CRC device.May be call yield() other than cpu_relax() is what you expected?

>you could statically initialize them (rather than needing to do it at>runtime), and then you could drop the init/exit functions here and replace>them with a single module_platform_driver(bfin_crypto_crc_driver).>-mike