Re: algif for compression?

2014-04-03 Thread Herbert Xu
Dan Streetman ddstr...@ieee.org wrote: I see the algif_hash and algif_blkcipher implementations to allow userspace AF_ALG socket access to kernel blkcipher and hash algorithms, but has anyone done a algif_compression to allow userspace access to compression algs? I'm asking specifically wrt

[PATCH 0/9] Add Qualcomm crypto driver

2014-04-03 Thread Stanimir Varbanov
Hi, The following patch set implements support for Qualcomm crypto hardware accelerator driver. It registers itself to the crypto subsystem and adds the following operations for encryption/decription - AES with ECB CBC CTR XTS modes, DES with ECB CBC modes, and 3DES ECB CBC modes. For hashing and

[PATCH 1/9] crypto: qce: Add core driver implementation

2014-04-03 Thread Stanimir Varbanov
This adds core driver files. The core part is implementing a platform driver probe and remove callbaks, the probe enables clocks, checks crypto version, initialize and request dma channels, create done tasklet and work queue and finally register the algorithms into crypto subsystem.

[PATCH 3/9] crypto: qce: Add dma and sg helpers

2014-04-03 Thread Stanimir Varbanov
This adds dmaengine and sg-list helper functions used by other parts of the crypto driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/dma.c | 201 +++ drivers/crypto/qce/dma.h | 57 ++ 2 files changed, 258

[PATCH 2/9] crypto: qce: Add register defines

2014-04-03 Thread Stanimir Varbanov
Here are all register addresses and bit/masks used by the driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/regs-v5.h | 327 +++ 1 file changed, 327 insertions(+) create mode 100644 drivers/crypto/qce/regs-v5.h diff

[PATCH 4/9] crypto: qce: Add ablkcipher algorithms

2014-04-03 Thread Stanimir Varbanov
Here is the implementation of AES, DES and 3DES crypto API callbacks, the crypto register alg function, the async request handler and its dma done callback function. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/ablkcipher.c | 397

[PATCH 5/9] crypto: qce: Adds sha and hmac transforms

2014-04-03 Thread Stanimir Varbanov
Here is the implementation and registration of ahash crypto type. It includes sha1, sha256, hmac(sha1) and hmac(sha256). Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/sha.c | 595 +++ drivers/crypto/qce/sha.h | 74 ++

[PATCH 6/9] crypto: qce: Adds infrastructure to setup the crypto block

2014-04-03 Thread Stanimir Varbanov
Here are functions used to setup/prepare hardware registers for all algorithms supported by the crypto block. It also exports few helper functions needed by algorithms: - to check hardware status - to start crypto hardware - to translate data stream to big endian form

[PATCH 7/9] crypto: qce: Adds Makefile to build the driver

2014-04-03 Thread Stanimir Varbanov
Adds Makefile needed to build the driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/Makefile | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 drivers/crypto/qce/Makefile diff --git a/drivers/crypto/qce/Makefile b/drivers/crypto/qce/Makefile new

[PATCH 8/9] crypto: qce: Build Qualcomm qce driver

2014-04-03 Thread Stanimir Varbanov
Modify crypto Kconfig and Makefile in order to build the qce driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/Kconfig | 10 ++ drivers/crypto/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig

Re: [PATCH 2/9] crypto: qce: Add register defines

2014-04-03 Thread Kumar Gala
On Apr 3, 2014, at 11:17 AM, Stanimir Varbanov svarba...@mm-sol.com wrote: Here are all register addresses and bit/masks used by the driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/regs-v5.h | 327 +++ 1 file

Re: [PATCH 2/9] crypto: qce: Add register defines

2014-04-03 Thread Stanimir Varbanov
Hi, On 04/03/2014 07:24 PM, Kumar Gala wrote: On Apr 3, 2014, at 11:17 AM, Stanimir Varbanov svarba...@mm-sol.com wrote: Here are all register addresses and bit/masks used by the driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/regs-v5.h | 327

Re: [PATCH 2/9] crypto: qce: Add register defines

2014-04-03 Thread Kumar Gala
On Apr 3, 2014, at 11:33 AM, Stanimir Varbanov svarba...@mm-sol.com wrote: Hi, On 04/03/2014 07:24 PM, Kumar Gala wrote: On Apr 3, 2014, at 11:17 AM, Stanimir Varbanov svarba...@mm-sol.com wrote: Here are all register addresses and bit/masks used by the driver. Signed-off-by:

Re: algif for compression?

2014-04-03 Thread Dan Streetman
On Thu, Apr 3, 2014 at 8:41 AM, Herbert Xu herb...@gondor.apana.org.au wrote: Dan Streetman ddstr...@ieee.org wrote: I see the algif_hash and algif_blkcipher implementations to allow userspace AF_ALG socket access to kernel blkcipher and hash algorithms, but has anyone done a algif_compression

Re: [PATCH 1/9] crypto: qce: Add core driver implementation

2014-04-03 Thread Josh Cartwright
Hey Stanimir- Just a few comments/questions from a quick scan of your patchset: On Thu, Apr 03, 2014 at 07:17:58PM +0300, Stanimir Varbanov wrote: [..] +++ b/drivers/crypto/qce/core.c [..] + +static struct qce_algo_ops qce_ops[] = { + { + .type = CRYPTO_ALG_TYPE_ABLKCIPHER,

Re: [PATCH 3/9] crypto: qce: Add dma and sg helpers

2014-04-03 Thread Josh Cartwright
Nitworthy comments :). On Thu, Apr 03, 2014 at 07:18:00PM +0300, Stanimir Varbanov wrote: [..] +++ b/drivers/crypto/qce/dma.c [..] +int qce_dma_request(struct device *dev, struct qce_dma_data *dma) +{ + unsigned int memsize; + void *va; + int ret; + + dma-txchan =

Re: [PATCH 3/9] crypto: qce: Add dma and sg helpers

2014-04-03 Thread Courtney Cavin
On Thu, Apr 03, 2014 at 06:18:00PM +0200, Stanimir Varbanov wrote: This adds dmaengine and sg-list helper functions used by other parts of the crypto driver. Signed-off-by: Stanimir Varbanov svarba...@mm-sol.com --- drivers/crypto/qce/dma.c | 201

Re: [PATCH 1/9] crypto: qce: Add core driver implementation

2014-04-03 Thread Courtney Cavin
On Thu, Apr 03, 2014 at 06:17:58PM +0200, Stanimir Varbanov wrote: This adds core driver files. The core part is implementing a platform driver probe and remove callbaks, the probe enables clocks, checks crypto version, initialize and request dma channels, create done tasklet and work queue