diff options
author | Hook, Gary <Gary.Hook@amd.com> | 2019-07-09 15:07:22 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-07-26 22:08:03 +1000 |
commit | c4a89279086e9c98eba659d7665b1732e0d5e3e3 (patch) | |
tree | 3b28fcadcc0bea7955a6d98362f612cee55fde01 /drivers/crypto/ccp/ccp-dev-v5.c | |
parent | 93308baf075039dccf347391491773f272cc24f6 (diff) | |
download | linux-stable-c4a89279086e9c98eba659d7665b1732e0d5e3e3.tar.gz linux-stable-c4a89279086e9c98eba659d7665b1732e0d5e3e3.tar.bz2 linux-stable-c4a89279086e9c98eba659d7665b1732e0d5e3e3.zip |
crypto: ccp - Add a module parameter to specify a queue count
Add a module parameter to limit the number of queues per CCP. The default
value (nqueues=0) is to set up every available queue on each device.
The count of queues starts from the first one found on the device (which
varies based on the device ID).
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev-v5.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dev-v5.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 35b3d866726d..f146b51a23a5 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -2,16 +2,14 @@ /* * AMD Cryptographic Coprocessor (CCP) driver * - * Copyright (C) 2016,2017 Advanced Micro Devices, Inc. + * Copyright (C) 2016,2019 Advanced Micro Devices, Inc. * * Author: Gary R Hook <gary.hook@amd.com> */ -#include <linux/module.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/kthread.h> -#include <linux/debugfs.h> #include <linux/dma-mapping.h> #include <linux/interrupt.h> #include <linux/compiler.h> @@ -792,8 +790,7 @@ static int ccp5_init(struct ccp_device *ccp) /* Find available queues */ qmr = ioread32(ccp->io_regs + Q_MASK_REG); - for (i = 0; i < MAX_HW_QUEUES; i++) { - + for (i = 0; (i < MAX_HW_QUEUES) && (ccp->cmd_q_count < ccp->max_q_count); i++) { if (!(qmr & (1 << i))) continue; |