summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/qat
Commit message (Collapse)AuthorAgeFilesLines
...
* crypto: qat - Remove reference to crypto_aead_crtHerbert Xu2015-08-171-3/+3
| | | | | | | The qat driver uses crypto_aead_crt in order to get the authsize. This patch replaces it with the crypto_aead_authsize helper instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix simple_return.cocci warningsWu Fengguang2015-08-131-6/+2
| | | | | | | | | | | | drivers/crypto/qat/qat_common/adf_sriov.c:258:1-4: WARNING: end returns can be simpified and declaration on line 212 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Fix unmet direct dependencies for QAT_DH895xCCVFTadeusz Struk2015-08-131-0/+2
| | | | | | Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Fix adf_isr_resource_free name clashTadeusz Struk2015-08-113-7/+7
| | | | | | | | | When both PF and VF drivers are build in linker complains about multiple definition of adf_isr_resource_[alloc/free] functions. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Add FW const tableTadeusz Struk2015-08-101-1/+106
| | | | | | | Some VF drivers need FW const table, so the PF driver needs to load it. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Add qat dh895xcc VF driverTadeusz Struk2015-08-108-0/+965
| | | | | | | Add code specific for the dh895xcc virtual function. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Add support for SRIOVTadeusz Struk2015-08-1017-94/+1426
| | | | | | | Add code that enables SRIOV on dh895xcc devices. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Move adf admin and adf hw arbitrer to common codeTadeusz Struk2015-08-1014-241/+97
| | | | | | | | | Adf admin and HW arbiter function can be used by dh895xcc specific code well as the new dh895xccvf and future devices so moving them to qat_common so that they can be shared. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Convert to new AEAD interfaceHerbert Xu2015-08-041-204/+123
| | | | | | | | This patch converts qat to the new AEAD interface. IV generation has been removed since it's equivalent to a software implementation. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Tested-by: Tadeusz Struk <tadeusz.struk@intel.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Herbert Xu2015-08-041-8/+16
|\ | | | | | | Merge the crypto tree to pull in the qat registration bug fix.
| * crypto: qat - Fix invalid synchronization between register/unregister sym algsTadeusz Struk2015-07-231-8/+16
| | | | | | | | | | | | | | | | | | The synchronization method used atomic was bogus. Use a proper synchronization with mutex. Cc: stable@vger.kernel.org Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - remove unnecessary list iterationBruce Allan2015-07-281-6/+1
| | | | | | | | | | | | | | | | | | There's no need to iterate through the list for instances in the accel_table since the number of devices is already known in this file. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - Fix typo othewise->otherwiseAhsan Atta2015-07-285-11/+11
| | | | | | | | | | | | Signed-off-by: Ahsan Atta <ahsan.atta@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - remove unused defineBruce Allan2015-07-281-1/+0
| | | | | | | | | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - fix bug in ADF_RING_SIZE_BYTES_MIN macroBruce Allan2015-07-281-2/+3
| | | | | | | | | | | | | | | | | | | | The subject macro mistakenly compares the passed-in ring size in bytes with ADF_RING_SIZE_4K which is 0x6 (an internal representation of 4KB) rather than comparing with the intended value of 4096. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - remove redundant struct elemBruce Allan2015-07-283-3/+1
| | | | | | | | | | | | | | | | | | The element pci_dev_id in the struct adf_hw_device_data is redundant since the PCI device id can be retrieved from the struct pci_dev. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - Don't attempt to register algorithm multiple timesTadeusz Struk2015-07-231-3/+16
| | | | | | | | | | | | | | | | | | | | | | When multiple devices are present in the system the driver attempts to register the same algorithm many times. Changes in v2: - use proper synchronization mechanizm between register and unregister Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - fix invalid check for RSA keylen in fips modeTadeusz Struk2015-07-211-2/+2
| | | | | | | | | | | | | | | | | | The condition checking allowed key length was invalid. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - Add support for RSA algorithmTadeusz Struk2015-07-1713-39/+779
| | | | | | | | | | | | | | | | Add RSA support to QAT driver. Removed unused RNG rings. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - add MMP FW support to accel engineTadeusz Struk2015-07-174-5/+42
| | | | | | | | | | | | | | Add code that loads the MMP firmware Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | crypto: qat - add support for MMP FWPingchao Yang2015-07-176-26/+24
|/ | | | | | | | | Load Modular Math Processor(MMP) firmware into QAT devices to support public key algorithm acceleration. Signed-off-by: Pingchao Yang <pingchao.yang@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Deletion of unnecessary checks before two function callsMarkus Elfring2015-06-292-5/+2
| | | | | | | | | | | The functions kfree() and release_firmware() test whether their argument is NULL and then return immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: drivers - Fix Kconfig selectsHerbert Xu2015-06-181-4/+2
| | | | | | | | | | | | | | | | This patch fixes a number of problems in crypto driver Kconfig entries: 1. Select BLKCIPHER instead of BLKCIPHER2. The latter is internal and should not be used outside of the crypto API itself. 2. Do not select ALGAPI unless you use a legacy type like CRYPTO_ALG_TYPE_CIPHER. 3. Select the algorithm type that you are implementing, e.g., AEAD. 4. Do not select generic C code such as CBC/ECB unless you use them as a fallback. 5. Remove default n since that is the default default. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat: fix issue when mapping assoc to internal AD structTadeusz Struk2015-06-091-12/+20
| | | | | | | | This patch fixes an issue when building an internal AD representation. We need to check assoclen and not only blindly loop over assoc sgl. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Set max request sizeTadeusz Struk2015-06-091-0/+2
| | | | | | | | | | The device doensn't support the default value and will change it to 256, which will cause performace degradation for biger packets. Add an explicit write to set it to 1024. Reported-by: Tianliang Wang <tianliang.wang@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - rm unneeded header includeTadeusz Struk2015-05-151-1/+0
| | | | | | | Don't need proc_fs.h Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - remove unused structure membersTadeusz Struk2015-05-151-12/+0
| | | | | | | Cleanup unused structure members. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Use crypto_aead_set_reqsize helperHerbert Xu2015-05-131-2/+3
| | | | | | | This patch uses the crypto_aead_set_reqsize helper to avoid directly touching the internals of aead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Include internal/aead.hHerbert Xu2015-05-131-1/+1
| | | | | | | All AEAD implementations must include internal/aead.h in order to access required helpers. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - add driver versionAllan, Bruce W2015-05-113-0/+9
| | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - do not duplicate string containing firmware nameAllan, Bruce W2015-04-281-1/+1
| | | | | | | | Use ADF_DH895XCC_FW instead of duplicating the string "qat_895xcc.bin" when referring to the DH895xCC firmware. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix double release_firmware on error pathTadeusz Struk2015-04-073-12/+13
| | | | | | | | release_firmware was called twice on error path causing an Oops. Reported-by: Ahsan Atta <ahsan.atta@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - print ring name in debug outputTadeusz Struk2015-04-071-0/+2
| | | | | | | | Ring name was allocated but never refenenced. It was supposed to be printed out in debug output. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix checkpatch CODE_INDENT issueAllan, Bruce W2015-04-011-1/+1
| | | | | | | ERROR:CODE_INDENT: code indent should use tabs where possible Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix checkpatch COMPARISON_TO_NULL issueAllan, Bruce W2015-04-011-1/+1
| | | | | | | | CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!device_reset_wq" Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix checkpatch BIT_MACRO issuesAllan, Bruce W2015-04-012-5/+5
| | | | | | | CHECK:BIT_MACRO: Prefer using the BIT macro Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix checkpatch CONCATENATED_STRING issuesAllan, Bruce W2015-04-011-4/+4
| | | | | | | | CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - checkpatch PARENTHESIS_ALIGNMENT and LOGICAL_CONTINUATIONSAllan, Bruce W2015-04-011-2/+2
| | | | | | | Cleanup code to fix the subject checkpatch warnings Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix checkpatch CHECK_SPACING issuesAllan, Bruce W2015-04-011-1/+1
| | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix typoAllan, Bruce W2015-04-011-14/+14
| | | | | | | adt_ctl_drv should be adf_ctl_drv Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - make error and info log messages more descriptiveAllan, Bruce W2015-03-2312-91/+137
| | | | | | | | | | | Convert pr_info() and pr_err() log messages to dev_info() and dev_err(), respectively, where able. This adds the module name and PCI B:D:F to indicate which QAT device generated the log message. The "QAT:" is removed from these log messages as that is now unnecessary. A few of these log messages have additional spelling/contextual fixes. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - fix typo in stringAllan, Bruce W2015-03-231-1/+1
| | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - remove duplicate definition of Intel PCI vendor idAllan, Bruce W2015-03-231-1/+0
| | | | | | | This define is a duplicate of the one in ./include/linux/pci_ids.h Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - remove incorrect __exit markupDmitry Torokhov2015-03-121-1/+1
| | | | | | | | | PCI bus is hot-pluggable, and even if it wasn't one can still unbind the device from driver via sysfs, so we should not make driver's remove method as __exit. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - don't need qat_auth_state structTadeusz Struk2015-01-161-6/+0
| | | | | | | We don't need the qat_auth_state structure anymore. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - Ensure ipad and opad are zeroedHerbert Xu2015-01-141-9/+6
| | | | | | | | | | | | The patch ad511e260a27b8e35d273cc0ecfe5a8ff9543181 (crypto: qat - Fix incorrect uses of memzero_explicit) broke hashing because the code was in fact overwriting the qat_auth_state variable. In fact there is no reason for the variable to exist anyway since all we are using it for is to store ipad and opad. So we could simply create ipad and opad directly and avoid this whole mess. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - remove unnecessary include of atomic.h header fileAllan, Bruce W2015-01-132-2/+0
| | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - use pci_wait_for_pending_transaction()Allan, Bruce W2015-01-131-15/+2
| | | | | | | | | Prior to resetting the hardware, use pci_wait_for_pending_transaction() instead of open coding similar functionality. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Acked-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - adf_ae_stop() is never calledAllan, Bruce W2015-01-131-1/+1
| | | | | | | | | | In adf_dev_stop(), adf_ae_stop() is never called because adf_dev_started() will always return false since the ADF_STATUS_STARTED bit is cleared earlier in the function. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Acked-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: qat - correctly type a booleanAllan, Bruce W2015-01-131-2/+3
| | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
OpenPOWER on IntegriCloud