diff options
author | Hook, Gary <Gary.Hook@amd.com> | 2019-07-09 18:07:22 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-07-26 15:08:03 +0300 |
commit | c4a89279086e9c98eba659d7665b1732e0d5e3e3 (patch) | |
tree | 3b28fcadcc0bea7955a6d98362f612cee55fde01 /drivers/crypto/ccp/ccp-dev-v3.c | |
parent | 93308baf075039dccf347391491773f272cc24f6 (diff) | |
download | linux-c4a89279086e9c98eba659d7665b1732e0d5e3e3.tar.xz |
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-v3.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dev-v3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 2b7d47ed5c74..4005d438dff9 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -379,7 +379,7 @@ static int ccp_init(struct ccp_device *ccp) /* Find available queues */ ccp->qim = 0; 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; |