Age | Commit message (Collapse) | Author |
|
ARRAY_SIZE() returns a size_t value.
Thus, when printing these values, %zu or %zx must be used, or else
warnings show up:
CC drivers/crypto/caam//caamalg.o
In file included from include/linux/thread_info.h:11:0,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/crypto/caam//compat.h:9,
from drivers/crypto/caam//caamalg.c:47:
drivers/crypto/caam//caamalg.c: In function 'caam_cra_init':
include/linux/bug.h:33:45: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/compiler-gcc.h:47:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^
include/linux/kernel.h:41:59: note: in expansion of macro '__must_be_array'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^
drivers/crypto/caam//caamalg.c:4396:13: note: in expansion of macro 'ARRAY_SIZE'
op_id, ARRAY_SIZE(digest_size));
^
CC drivers/crypto/caam//caamhash.o
In file included from include/linux/thread_info.h:11:0,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/crypto/caam//compat.h:9,
from drivers/crypto/caam//caamhash.c:56:
drivers/crypto/caam//caamhash.c: In function 'caam_hash_cra_init':
include/linux/bug.h:33:45: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/compiler-gcc.h:47:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^
include/linux/kernel.h:41:59: note: in expansion of macro '__must_be_array'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^
drivers/crypto/caam//caamhash.c:1782:12: note: in expansion of macro 'ARRAY_SIZE'
op_id, ARRAY_SIZE(runninglen));
^
Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Change-Id: Ica005a337d654f7d55eea6f5e5aee911cbd016b2
Reviewed-on: http://git.am.freescale.net:8181/37071
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
Tested with tcrypt on p1023rdb platform.
Change-Id: Ic19a8d2ed5ce3603d2d9f893736b68eea03d480b
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36220
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
The problem will occur only in T1040R1. A workaround
has been verified; set a Scatter Gather (SG) flag
on the Q or G Pointers on KPG, which will give
the PKHA unload time to complete. It's sufficient
to have the SG flag set for only one of these.
Change-Id: I5a403576c6e995110227872c84de7e74da0144c5
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36617
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
In order to process TLS data that is received in
network byte order, a swap is needed for a SEC
block working in little endian mode. This is done
by using the MOVEB command.
Change-Id: I8290ad7348d9e66169c05eff8bda71e587beb0a9
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36369
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
CHAs of SEC work natively in BE mode. When moving
data to the alignment blocks, swapping is needed
for LE platforms. This is done by means of the MOVEB
command (introduced in ERA 7). This patch adds support
to DCL for this command.
Change-Id: Ie74f2d8a1cf101acd5a23686ff8eb835d1a1f047
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36365
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
Tested with tcrypt on bsc9132qds platform.
Change-Id: Ia8a58b786779e00b267ad3cd2fa05b30d5e17bfb
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36219
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
An implicit truncation is done when using a variable of 64 bits
in MATH command:
warning: large integer implicitly truncated to unsigned type [-Woverflow]
Silence the compiler by feeding it with an explicit truncated value.
Change-Id: I95e3f397f62f9b850c0c7f26e7079b9d9688b87e
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36218
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
Change-Id: I0e1cbb1d09eef65fedf75d7c3787898fc5b67f50
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36121
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
-change req_ctx->nbuf from u64 to unsigned int to silence checker
warnings; this is safe since nbuf value is <= HASH_MAX_BLOCK_SIZE
-remove unused value read from TALITOS_CCPSR; there is no requirement
to read upper 32b before reading lower 32b of a 64b register;
SEC RM mentions: "reads can always be done by byte, word, or dword"
-remove unused return value of sg_to_link_tbl()
-change "len" parameter of map_single_talitos_ptr();
cpu_to_be16 will __force downcast the value to unsigned short
without any checker warning
Change-Id: I2245e6a7f5e7d60d3a86b3b68a76a104ba372530
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36124
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This reverts commit 7291a932c6e27d9768e374e9d648086636daf61c.
The conversion to be16_add_cpu() is incorrect in case cryptlen is
negative due to premature (i.e. before addition / subtraction)
implicit conversion of cryptlen (int -> u16) leading to sign loss.
Change-Id: Iee27eb0881df6f1134f977cbe471cd23479752ce
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36123
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
Check return value of scatterlist_sg_next(), i.e. don't rely solely
on number of bytes to be processed or number of scatterlist entries.
Change-Id: I6c10ed15e9a456b87828ebb21cc1121c7041be7d
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/36122
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tudor-Dan Ambarus <tudor.ambarus@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
ICV check failures are part of normal operation;
leave user notification up to the higher levels,
as is done in s/w algorithm implementations.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 3f80be023900790d029a63e27440f1e33c048b73)
Change-Id: I6b181dd09e915cf639691cb3d696ddc22ac5f195
Reviewed-on: http://git.am.freescale.net:8181/31647
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
The dependency on CAAM-QI was incorrectly set on FSL_QMAN and resulted in
an always-enabled CAAM-QI on DPAA platforms. This patch fixes the dependency
and allows CAAM-QI interface to be freely disabled on DPAA platforms.
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: Iaf752ae8774a7b03383244a6c9fbbadd9959f3d4
Reviewed-on: http://git.am.freescale.net:8181/34732
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This patch changes the allocation of memory on the
hotpath, by replacing the malloc allocation with a
kmem_cache backed allocation.
Change-Id: I55a21bb7cbd022f6b86bd784988491b551a0f81e
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/31371
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This patch synchronizez the QI shared descriptors creation
with the corresponding JR ones, as well as cleaning up
the unused parameters of the *edesc_alloc() functions.
While here, also fix a formatting error in cra_init().
Change-Id: Ic5bae734e4a6e6dcb329f7e9530422b9f8cc0377
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/31370
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This patch adds some output from the CAAM QI driver
so the engineer can gain some insight on some of
the internals of the driver. Normally, this
information should reside in debug fs, but for now
it's guarded by the DEBUG define.
Change-Id: Ic6b7e570bc8fcedd758fb4163e15c94544e47130
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/31369
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This patch removes the per-packet lookup of a
completed request by adding an opaque after the SG
entries in the FD. While here, also the software
congestion control is removed and replaced with
a proper CGR with a sensible threshold. While here,
some very likely branches are decorated.
Change-Id: I48f2c71b6ac0d537843a44f8c0627c9b70c77592
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/31368
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Alexandru Marginean <Alexandru.Marginean@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
This allows users to pass in additional compiler flags through the
environment variable EXTRA_CFLAGS, e.g.
make EXTRA_CFLAGS=-Wno-error
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Change-Id: I36513506ee1671c31bb076e9b73c2e8e2442cf4f
Reviewed-on: http://git.am.freescale.net:8181/33146
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
Signed-off-by: Scott Wood <scottwood@freescale.com>
Conflicts:
arch/arm/kvm/mmu.c
arch/arm/mm/proc-v7-3level.S
arch/powerpc/kernel/vdso32/getcpu.S
drivers/crypto/caam/error.c
drivers/crypto/caam/sg_sw_sec4.h
drivers/usb/host/ehci-fsl.c
|
|
|
|
GCM's expected input sequence is: IV, AAD, text.
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Change-Id: I35d03818ec559e607182470f0c78097fa6c63f78
Reviewed-on: http://git.am.freescale.net:8181/25434
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
This is a fix for caam gcm offloading failure through cryptodev. If
assoc data is null, the driver crashes:
Modules linked in: cryptodev
CPU: 3 PID: 1930 Comm: openssl Not tainted
3.12.19-rt30-QorIQ-SDK-V1.7+gcebf692 #4
task: e9061070 ti: ebe72000 task.ti: ebe72000
NIP: c04ea360 LR: c04eed54 CTR: c04ef530
REGS: ebe73ba0 TRAP: 0300 Not tainted
(3.12.19-rt30-QorIQ-SDK-V1.7+gcebf692)
MSR: 00029002 <CE,EE,ME> CR: 44242484 XER: 00000000
DEAR: 00000000, ESR: 00000000
GPR00: c04eed54 ebe73c50 e9061070 eb41ea10 00000000 00000001 00000001 00000000
GPR08: 00000020 00000000 00000000 00000002 44242482 10089738 10081750 100633f8
GPR16: 100813fc 00000000 000000d1 ebe73cd8 0000000c bfc8e9c4 bfc8de54 eb41ea10
GPR24: eb896a00 c087dbe0 00000001 00000000 eb41ea10 00000001 00000000 00000000
NIP [c04ea360] dma_map_sg_chained+0x50/0x180
LR [c04eed54] aead_edesc_alloc.constprop.19+0x164/0x940
Call Trace:
[ebe73c50] [84244482] 0x84244482 (unreliable)
[ebe73c80] [c04eed54] aead_edesc_alloc.constprop.19+0x164/0x940
[ebe73cd0] [c04ef55c] aead_encrypt+0x2c/0xd0
[ebe73d00] [f9523c2c] cryptodev_cipher_encrypt+0xcc/0x140 [cryptodev]
[ebe73d10] [f952561c] crypto_auth_run+0x2ec/0xbd0 [cryptodev]
[ebe73d80] [f95227a0] cryptodev_ioctl+0x500/0xa10 [cryptodev]
[ebe73eb0] [c0107a40] do_vfs_ioctl+0x4d0/0x780
[ebe73f10] [c0107d30] SyS_ioctl+0x40/0x80
[ebe73f40] [c000fbcc] ret_from_syscall+0x0/0x3c
--- Exception: c01 at 0xfcc308c
LR = 0xfd5f064
Instruction dump:
91810010 7cbd2b78 7cda3378 40de0098 2f830000 41de0138 832300b0 2f9d0000
7f7edb78 3be00000 40dd002c 60000000 <807e0000> 3bff0001 5463003a
4bbe2855
---[ end trace 08c4f2b427249be6 ]---
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: I6554d83dbc9acb089f2dce5ff4f1044642262b03
Reviewed-on: http://git.am.freescale.net:8181/25433
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Add AES-GMAC as an IPSec ESP mechanism to provide
data origin authentication, but not confidentiality.
This method is referred as ENCR_NULL_AUTH_AES_GMAC.
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 5d0429a30f06845af78a696de59e3e8d21252846)
Specify the lowest (compatible) SEC Era on which the descriptors
can run.
Change-Id: If17a51a41c06dedf5b3589311d2677d522b4a209
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23481
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
This patch fixes the assumption that output sequence is not contiguous
when input sequence is not contiguous and in-place encryption is done.
Output sequence does not need to be contiguous with associated data.
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 19167bfd8ae72ceeb41930343227bf8f5fb19a66)
Change-Id: I55797558a79c8113c7e299198f94caea6a0d10b5
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23480
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
as an IPsec Encapsulating Security Payload (ESP) mechanism
to provide confidentiality and data origin authentication.
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit bac68f2c9a43e60a70e27c0c75aaca7128b6271d)
Specify the lowest (compatible) SEC Era on which the descriptors
can run.
Change-Id: I9054cb203f3f3acad5853ba973bb549ff1d2e10c
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23479
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Add support for AES working in Galois Counter Mode.
There is a limitation related to IV size, similar to the one present in
SW implementation (crypto/gcm.c):
The only IV size allowed is 12 bytes. It will be padded by HW to the right
with 0x0000_0001 (up to 16 bytes - AES block size), according to the GCM
specification.
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 3ef8d945d0dafd272e77c01099bc4975c5297a5a)
Conflicts:
drivers/crypto/caam/caamalg.c
Specify the lowest (compatible) SEC Era on which the descriptors
can run.
Change-Id: Ic6e0695192a4b9cfcc388e0ce31ec50741f5e339
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23478
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
This reverts commit 8901a6c015c66cecd70b301f58bab9fc68a11d69.
The upstream version of gcm support contains some fixes that
current version does not include. The removal of gcm support from
caam driver will be followed by the cherry-pick of upstream's
gcm patch.
Change-Id: Ic8de49a977beae9cd15eb860e9f6e18695886d98
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23477
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
This reverts commit 47a0ea3dc8b50056f8dd39afb438d362d5f5ea45.
The upstream version of gcm support contains some fixes that
current version does not include. The removal of gcm support from
caam driver will be followed by the cherry-pick of upstream's
gcm patch.
Change-Id: I1fcd770e7f15326a18a2fb18bc8efb40abbe5246
Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/23476
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: I7983c1cdc0d19fd738b251de3c0374e9e67cf617
Reviewed-on: http://git.am.freescale.net:8181/19800
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
- assoc_nents and src_nents are never zero when all_contig is false
- iv_contig is zero on the else branch
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: Iccd420733cac736e92c1f9b0cb8fb83fd39b40e4
Reviewed-on: http://git.am.freescale.net:8181/19799
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: I7cd10343879e4b51c50b2c4058aad76374831e91
Reviewed-on: http://git.am.freescale.net:8181/19797
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
|
|
The error code returned by hardware is four bits wide with an expected
zero MSB. A hardware error condition where the error code can get between
0x8 and 0xf will trigger an out of bound array access on the error
message table.
This patch fixes the invalid array access following such an error and
reports the condition.
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 49783d0f54219e1c68eac738fdd3244b7a6cbda7)
|
|
Fix the checkpatch warnings that the strings were split across
multiple lines. Checkpatch now complains about lines over 80,
but this is better, since we can actually grep the source code
for these strings now.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit da37503d37bb6ae72cca0b4d729c153f04b9f0cc)
|
|
Clean up the remnants from the rework. Constify function arguments.
Note that checkpatch again complains about this space before newline,
but this is the original code behavior, so I'm keeping it.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e397ee0f2242a5f316906e1ff05f8669791b4e2c)
|
|
This macro is just like an encyclopedia of string handling done wrong.
This must die. This is so wrong on so many levels.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e22cdcfa13d9799ea46245946ae09b4a328ff27d)
|
|
Clean this function up and rework it into sensible shape. This function
now contains one single dev_err() instead of the previous insanity full
of memory allocation, chaotic string handling and use of SPRINTFCAT().
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 4f0fa52a5d89d763423cb9b428e988ea824fd95a)
|
|
Clean this function up and rework it into sensible shape. This function
now contains one single dev_err() instead of the previous insanity full
of memory allocation, possible stack overwriting, chaotic string handling
and use of SPRINTFCAT().
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 1e16322da45b747c753162e421b7a1b25259377a)
|
|
Just dissolve this function so it's not in the way of applying
further white magic cleanup down the line.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 526243cc872398ed8139a52ee0bf7715a3abcf31)
|
|
Fix the functions which can be obviously done right with a simple
dev_err() now. While at it, further press the on-stack allocation
of buffer for sprintf() voodoo down into the abominated functions.
This patch cleans up most of the functions and leaves just two
remaining functions, report_ccb_status() and report_deco_status()
ugly and unhappy.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e75880dd9afb60ff59efe079ac50ccc16daffe54)
|
|
Pass the error type string into the functions, so they can handle
the printing of the string. This is now still using the very unsafe
sprintf(), but we will fix that.
While at this, pass the device pointer too, so we can dev_err()
functions readily when we start fixing this proper.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 8a4758268292eb036a63f49746fbfe3fcdc0c51d)
|
|
Implement fast-path error code printout for errors with no associated
handler function. This reduces calls to this kmalloc() nonsense in
SPRINTFCAT() already.
Note that the format of output is compatible with the old code, even
if -- exposed like this -- it looks a bit weird. Checkpatch complains
on this one as well.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 867e1ee395d845f49ae280c3d8f5271b214fa7e4)
|
|
Pull the error code <-> error string mapping tables out of the function
so the code becomes readable. This lets me see the real flesh of the
functions, without all that flab clouding the view.
Note: There is a checkpatch issue with quoted strings across multiple
lines. I will fix that in a subsequent patch to keep the changes
small and separate.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 9724d7adbb34b067b844b97599c1a5905229aa2b)
|
|
The tentacles of this function were firmly attached to various
places in the CAAM code. Just cut them, or this cthulhu function
will sprout them anew.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit fa9659cd4d3f40cead6263986cc235f3e67ab872)
Squash additional fixes to avoid broken builds in Freescale SDK
crypto: caam: fix calls to caam_jr_strstatus
This is a clean-up patch after changes made to caam_jr_strstatus API
starting with fa9659cd4d3f40cead6263986cc235f3e67ab872.
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
|
|
The function definition is changed to match dma_unmap_sg which is a void
function
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: I6142f5a56127db1fa103a497489e88d04bbc28e1
Reviewed-on: http://git.am.freescale.net:8181/19809
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: Iff7b2f0929e6274fe9ffc54b4dddd0ef640314d7
Reviewed-on: http://git.am.freescale.net:8181/19798
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Duplicated code has already been extracted into an independent
function. Replace the code with a function call
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: If390831e03de17c0397d3ae11516fae4d1b39164
Reviewed-on: http://git.am.freescale.net:8181/24348
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
This reverts commit d2dfa8c0cdf585008cdf6a15c337c30e264f045e.
Change-Id: Ib5504c1600f99debc2654086781d9bf904e32f63
Reviewed-on: http://git.am.freescale.net:8181/24187
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Tested-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Duplicated code has already been extracted into an independent
function. Replace the code with a function call
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: Ieb70040fe4c13d27b7a5ab4450c7550b9b74f3b3
Reviewed-on: http://git.am.freescale.net:8181/19796
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
The function is called with arguments known at compile time.
Remove runtime checks for out of bound values.
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Change-Id: I2fe2e3d4bd3c63b81f99065b0db159a009f217e6
Reviewed-on: http://git.am.freescale.net:8181/19806
Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
Reviewed-by: Mircea Pop <mircea.pop@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|