aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/842.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-14crypto: crypto4xx - Staticize local symbolsJingoo Han1-7/+8
These local symbols are used only in this file. Fix the following sparse warnings: drivers/crypto/amcc/crypto4xx_alg.c:35:6: warning: symbol 'set_dynamic_sa_command_0' was not declared. Should it be static? drivers/crypto/amcc/crypto4xx_alg.c:55:6: warning: symbol 'set_dynamic_sa_command_1' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-14crypto: sahara - Staticize local symbolJingoo Han1-1/+1
This local symbol is used only in this file. Fix the following sparse warnings: drivers/crypto/sahara.c:420:6: warning: symbol 'sahara_watchdog' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: pixocel - Staticize 'rng_dev'Jingoo Han1-1/+1
'rng_dev' is used only in this file. Fix the following sparse warning: drivers/char/hw_random/picoxcell-rng.c:36:15: warning: symbol 'rng_dev' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09crypto: nx - saves chaining value from co-processorFionnuala Gunter1-0/+1
This patch fixes a bug that is triggered when cts(cbc(aes)) is used with nx-crypto driver on input larger than 32 bytes. The chaining value from co-processor was not being saved. This value is needed because it is used as the IV by cts(cbc(aes)). Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: omap - Add OMAP4 TRNG supportLokesh Vutla2-53/+305
Add support for OMAP4 version of TRNG module that is present on OMAP4, AM33xx and OMAP5 SoCs. The modules have several differences including register offsets, output size, triggering rng and how configuring FROs. To handle these differences, a platform_data structure is defined and contains routine pointers, register offsets. OMAP2 specific routines are prefixed with 'omap2_' and OMAP4 specific routines are prefixed with 'omap4_'. Note: Few Hard coded values are from the TI AM33xx SDK. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09ARM: OMAP2+: Only manually add hwmod data when DT not used.Lokesh Vutla1-1/+1
The omap_init_rng() routine in devices.c only needs to be called when there is no device tree present. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: omap - Add device tree supportLokesh Vutla1-0/+12
Add Device Tree suport to the omap-rng driver. Currently, only support for OMAP2 and OMAP3 is being added but support for OMAP4 and OMAP5 will be added in a subsequent patch. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: omap - Remove duplicated function callLokesh Vutla1-1/+0
platform_set_drvdata() is called twice in driver probe. Removing the duplicated call. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: omap - Convert to devm_kzalloc()Lokesh Vutla1-7/+2
Use devm_kzalloc() to make cleanup paths simpler. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09hwrng: omap - Use module_platform_driver macroLokesh Vutla1-16/+2
module_platform_driver() makes the code simpler. Using the macro in the driver. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09crypto: nx - fix limits to sg lists for SHA-2Marcelo Cerri2-95/+132
The co-processor has several limits regarding the length of scatter/gather lists and the total number of bytes in it. These limits are available in the device tree, as following: - "ibm,max-sg-len": maximum number of bytes of each scatter/gather list. - "ibm,max-sync-cop": used for synchronous operations, it is an array of structures that contains information regarding the limits that must be considered for each mode and operation. The most important limits in it are: - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. This patch updates the NX driver to perform several hyper calls if needed in order to always respect the length limits for scatter/gather lists. Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-09crypto: nx - fix physical addresses added to sg listsMarcelo Cerri1-3/+19
The co-processor receives data to be hashed through scatter/gather lists pointing to physical addresses. When a vmalloc'ed data is given, the driver must calculate the physical address to each page of the data. However the current version of it just calculates the physical address once and keeps incrementing it even when a page boundary is crossed. This patch fixes this behaviour. Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com> Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: testmgr - remove double execution of the same test suiteCristian Stoica1-1/+1
This patch removes redundant execution of the same test suite in cases where alg and driver variables are the same (e.g. when alg_test is called from tcrypt_test) Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Reviewed-by: Horia Geanta <horia.geanta@freescale.com> Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: caam - Remove unused functions from Job RingRuchika Gupta4-77/+0
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01modules: add support for soft module dependenciesAndreas Robinson1-0/+5
Additional and optional dependencies not found while building the kernel and modules, can now be declared explicitly. Signed-off-by: Andreas Robinson <andr345@gmail.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: omap-sham - Convert to devm_kzalloc()Lokesh Vutla1-10/+5
Use devm_kzalloc() to make cleanup paths simpler. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: omap-sham - Convert to devm_request_irq()Lokesh Vutla1-7/+5
Using devm_request_irq() rather than request_irq(). So removing free_irq() calls from the probe error path and the remove handler. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: omap-sham - Add OMAP5/AM43XX SHAM SupportLokesh Vutla1-0/+44
Add support for the OMAP5 version of the SHAM module that is present on OMAP5 and AM43xx SoCs. This module is very simialar to OMAP4 version of SHAM module, and adds SHA384 SHA512 hardware-accelerated hash functions to it. To handle the higher digest size of SHA512, few SHA512_DIGEST_i (i=1-16, and first 8 registers are duplicated from SHA_DIGEST_i registers) registers are added at the end of register set. So adding the above register offsets and module info in pdata. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: omap-sham - Add SHA384 and SHA512 SupportLokesh Vutla2-47/+209
Adding support for SHA348 and SHA512 in addition to MD5, SHA1, SHA224 SHA256 that the omap sha module supports. In order to add the support - Removed hard coded register offsets and passing offsets from pdata - Updating Flag offsets so that they can be used for SHA256 and SHA512 - Adding the algo info. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01hwrng: mxc-rnga - Check the return value from clk_prepare_enable()Fabio Estevam1-1/+3
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: ux500 - Fix logging, make arrays const, neateningJoe Perches1-307/+279
Logging messages without newlines are possibly interleaved with other messages. Add terminating newlines to avoid this. Other miscellaneous changes: Make arrays const to reduce data size Add pr_fmt to prefix pr_<level>, remove now unused DEV_DBG_NAME Coalesce formats, align arguments Remove unnecessary OOM messages as dump_stack is already done Remove unnecessary cast of void * Change kzalloc(sizeof(struct)...) to kzalloc(sizeof(*var), ...) Reduce indents in struct definitions Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-08-01crypto: caam - RNG instantiation by directly programming DECORuchika Gupta2-39/+47
Remove the dependency of RNG instantiation on Job Ring. Now RNG instantiation for devices with RNG version > 4 is done by directly programming DECO 0. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-07-10crypto: caam - Moved macro DESC_JOB_IO_LEN to desc_constr.hVakul Garg3-4/+1
DESC_JOB_IO_LEN is a generic macro which indicates the space required in the descriptor for placing SEQIN/OUT commands, job descriptor header, shared descriptor pointer. Moving it to descriptor construction file which can be supposedly included by different algo offload files. Change-Id: Ic8900990d465e9079827b0c7fcacc61766d7efb6 Signed-off-by: Vakul Garg <vakul@freescale.com> Reviewed-by: Geanta Neag Horia Ioan-B05471 <horia.geanta@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-07-04Input: cyttsp4 - kfree xfer_buf on error path in probe()Ferruh Yigit1-1/+3
If probe() fails after cd->xfer_buf allocated, it will not freed. Added kfree(cd->xfer_buf) with and error label. Signed-off-by: Ferruh Yigit <fery@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-04hang and lockup detection menuDave Hansen1-19/+23
The hard/softlockup and hung-task entries take up 6 lines of screen real-estate when enabled. I bet folks don't mess with these _that_ often, so move them in a group down a level. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04kconfig: consolidate printk optionsDave Hansen1-87/+90
Same deal, take the printk-related things and hide them in a menu. This takes another 4 items out of the top-level menu. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04group locking debugging optionsDave Hansen1-6/+10
Original posting: http://lkml.kernel.org/r/20121214184208.D9E5804D@kernel.stglabs.ibm.com There are quite a few of these, and we want to make sure that there is one-stop-shopping for lock debugging. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04consolidate compilation option configsDave Hansen1-76/+80
Original Post: http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com Again, trying to come up with some common themes of the stuff in the kernel hacking menu... There are quite a few options to tweak compilation in some way, or perform extra compile-time checks. Give them their own menu. The diff here looks a bit funny... makes it look like I'm moving debugfs even though I'm actually moving the options on either side of it. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04consolidate runtime testing configsDave Hansen1-76/+81
Original posting: http://lkml.kernel.org/r/20121214184206.FC11422F@kernel.stglabs.ibm.com These runtime tests are great, except that there are a lot of them, and they are very rarely needed. Give them their own menu so that only the folks who need them will have to go looking for them. Note that there are some other runtime tests that are not in here, like for RCU or locking. This menu should only be used for tests that do not have a more appropriate home. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04order memory debugging Kconfig optionsDave Hansen1-272/+277
Original posting: http://lkml.kernel.org/r/20121214184203.37E6C724@kernel.stglabs.ibm.com There are a *LOT* of memory debugging options. They are just scattered all over the "Kernel Hacking" menu. Sure, "memory debugging" is a very vague term and it's going to be hard to make absolute rules about what goes in here, but this has to be better than what we had before. This does, however, leave out the architecture-specific memory debugging options (like x86's DEBUG_SET_MODULE_RONX). There would need to be some substantial changes to move those in here. Kconfig can not easily mix arch-specific and generic options together: it really requires a file per-architecture, and I think having an arch/foo/Kconfig.debug-memory might be taking things a bit too far Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04consolidate per-arch stack overflow debugging optionsDave Hansen24-90/+33
Original posting: http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com Several architectures have similar stack debugging config options. They all pretty much do the same thing, some with slightly differing help text. This patch changes the architectures to instead enable a Kconfig boolean, and then use that boolean in the generic Kconfig.debug to present the actual menu option. This removes a bunch of duplication and adds consistency across arches. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Reviewed-by: H. Peter Anvin <hpa@zytor.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> [for tile] Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04hpfs: implement prefetch to improve performanceMikulas Patocka4-5/+63
This patch implements prefetch to improve performance. It helps mostly when scanning the bitmaps to calculate free space. Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04hpfs: use mpageMikulas Patocka1-6/+34
Use the mpage interface to improve performance. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04hpfs: better test for errorsMikulas Patocka2-2/+9
The test if bitmap access is out of bound could errorneously pass if the device size is divisible by 16384 sectors and we are asking for one bitmap after the end. Check for invalid size in the superblock. Invalid size could cause integer overflows in the rest of the code. Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-04of: Fix address decoding on Bimini and js2x machinesBenjamin Herrenschmidt1-2/+6
Commit: e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7 of/address: Handle #address-cells > 2 specially broke real time clock access on Bimini, js2x, and similar powerpc machines using the "maple" platform. That code was indirectly relying on the old (broken) behaviour of the translation for the hypertransport to ISA bridge. This fixes it by treating hypertransport as a PCI bus Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
2013-07-04HID: wacom: Intuos4 battery charging changesPrzemo Firszt1-1/+13
Intuos4 WL is separately reporting power supply and battery charging status - now hid-wacom is using that information. Previously hid-wacom was wrongly treating "battery charging" bit as "power supply connected". Now it should report battery charging, battery discharging, battery full and power supply status. Intuos4 WL sends reports when is in use (obvious) and when unplugging power supply. If means that if the device is being charged, but it's not being used it will never report "battery full". The same problem happens after the device has been connected, but it's not in use - the battery/ac status will be incorrect. Currently there is no mechanism to ask the device to send a report containing battery/ac status. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-07-04HID: i2c-hid: support sending HID output reports using the output registerAndrew Duggan1-3/+17
The current i2c hid driver does not support sending HID output reports using the output register for devices which support receiving reports through this method. This patch determines which method to use to send output reports based on the value of wMaxOutputLength in the device's HID descriptor. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-07-04md/raid10: fix bug which causes all RAID10 reshapes to move no data.NeilBrown1-5/+4
The recent comment: commit 7e83ccbecd608b971f340e951c9e84cd0343002f md/raid10: Allow skipping recovery when clean arrays are assembled Causes raid10 to skip a recovery in certain cases where it is safe to do so. Unfortunately it also causes a reshape to be skipped which is never safe. The result is that an attempt to reshape a RAID10 will appear to complete instantly, but no data will have been moves so the array will now contain garbage. (If nothing is written, you can recovery by simple performing the reverse reshape which will also complete instantly). Bug was introduced in 3.10, so this is suitable for 3.10-stable. Cc: stable@vger.kernel.org (3.10) Cc: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
2013-07-04md/raid5: allow 5-device RAID6 to be reshaped to 4-device.NeilBrown1-1/+1
There is a bug in 'check_reshape' for raid5.c To checks that the new minimum number of devices is large enough (which is good), but it does so also after the reshape has started (bad). This is bad because - the calculation is now wrong as mddev->raid_disks has changed already, and - it is pointless because it is now too late to stop. So only perform that test when reshape has not been committed to. Signed-off-by: NeilBrown <neilb@suse.de>
2013-07-03tools/testing/selftests: don't assume the x bit is set on scriptsAndrew Morton2-2/+2
The x bit can easily get lost (patch(1) loses it, for example). Reported-by: Ramkumar Ramachandra <artagnon@gmail.com> Cc: Dave Young <dyoung@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>