diff options
author | Gary R Hook <gary.hook@amd.com> | 2016-03-01 13:49:04 -0600 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-03-11 21:19:07 +0800 |
commit | 553d2374db0bb3f48bbd29bef7ba2a4d1a3f325d (patch) | |
tree | 1a32958d7359b5e46f7e7f613ac180e88eb8a0df /drivers/crypto/ccp/ccp-pci.c | |
parent | 3f19ce2054541a6c663c8a5fcf52e7baa1c6c5f5 (diff) | |
download | linux-553d2374db0bb3f48bbd29bef7ba2a4d1a3f325d.tar.bz2 |
crypto: ccp - Support for multiple CCPs
Enable management of >1 CCPs in a system. Each device will
get a unique identifier, as well as uniquely named
resources. Treat each CCP as an orthogonal unit and register
resources individually.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-pci.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/crypto/ccp/ccp-pci.c b/drivers/crypto/ccp/ccp-pci.c index 7690467c42f8..668e5154beb3 100644 --- a/drivers/crypto/ccp/ccp-pci.c +++ b/drivers/crypto/ccp/ccp-pci.c @@ -1,7 +1,7 @@ /* * AMD Cryptographic Coprocessor (CCP) driver * - * Copyright (C) 2013 Advanced Micro Devices, Inc. + * Copyright (C) 2013,2016 Advanced Micro Devices, Inc. * * Author: Tom Lendacky <thomas.lendacky@amd.com> * @@ -59,7 +59,8 @@ static int ccp_get_msix_irqs(struct ccp_device *ccp) ccp_pci->msix_count = ret; for (v = 0; v < ccp_pci->msix_count; v++) { /* Set the interrupt names and request the irqs */ - snprintf(ccp_pci->msix[v].name, name_len, "ccp-%u", v); + snprintf(ccp_pci->msix[v].name, name_len, "%s-%u", + ccp->name, v); ccp_pci->msix[v].vector = msix_entry[v].vector; ret = request_irq(ccp_pci->msix[v].vector, ccp_irq_handler, 0, ccp_pci->msix[v].name, dev); @@ -94,7 +95,7 @@ static int ccp_get_msi_irq(struct ccp_device *ccp) return ret; ccp->irq = pdev->irq; - ret = request_irq(ccp->irq, ccp_irq_handler, 0, "ccp", dev); + ret = request_irq(ccp->irq, ccp_irq_handler, 0, ccp->name, dev); if (ret) { dev_notice(dev, "unable to allocate MSI IRQ (%d)\n", ret); goto e_msi; |