Age | Commit message (Collapse) | Author | Files | Lines |
|
Removed unused variable "err" and directly return "0"
Reported by coccicheck -
./drivers/crypto/atmel-sha.c:758:5-8: Unneeded variable: "err". Return "0" on line 766
Signed-off-by: Rahul Pathak <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Using the devm_xxx() managed function to stripdown the error and remove
code.
Signed-off-by: LABBE Corentin <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
clk_prepare_enable() can fail so add a check for this and
return the error code if it fails.
Signed-off-by: LABBE Corentin <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
The maximum source and destination burst size is 16
according to the datasheet of Atmel DMA. And the value
is also checked in function at_xdmac_csize of Atmel
DMA driver. With the restrict, the value beyond maximum
value will not be processed in DMA driver, so SHA384 and
SHA512 will not work and the program will wait forever.
So here change the max burst size of all the cases to 16
in order to make SHA384 and SHA512 work and keep consistent
with DMA driver and datasheet.
Signed-off-by: Leilei Zhao <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Kernel will report "BUG: spinlock lockup suspected on CPU#0"
when CONFIG_DEBUG_SPINLOCK is enabled in kernel config and the
spinlock is used at the first time. It's caused by uninitialized
spinlock, so just initialize it in probe.
Signed-off-by: Leilei Zhao <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Having a zero length sg doesn't mean it is the end of the sg list. This
case happens when calculating HMAC of IPSec packet.
Signed-off-by: Leilei Zhao <[email protected]>
Signed-off-by: Ludovic Desroches <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
When a hash is requested on data bigger than the buffer allocated by the
SHA driver, the way DMA transfers are performed is quite strange:
The buffer is filled at each update request. When full, a DMA transfer
is done. On next update request, another DMA transfer is done. Then we
wait to have a full buffer (or the end of the data) to perform the dma
transfer. Such a situation lead sometimes, on SAMA5D4, to a case where
dma transfer is finished but the data ready irq never comes. Moreover
hash was incorrect in this case.
With this patch, dma transfers are only performed when the buffer is
full or when there is no more data. So it removes the transfer whose size
is equal the update size after the full buffer transmission.
Signed-off-by: Ludovic Desroches <[email protected]>
Signed-off-by: Leilei Zhao <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Add new version of atmel-sha available with SAMA5D4 devices.
Signed-off-by: Leilei Zhao <[email protected]>
Signed-off-by: Ludovic Desroches <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Fix typo, "intialization" -> "initialization"
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
The fallback is never used, so there is no point in having it.
The cra_exit routine can also be removed, since all it did was releasing
the fallback, along with the stub around cra_init, which just added an
unused NULL argument.
Signed-off-by: Svenning Soerensen <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
This patch switches data allocation from kzalloc to devm_kzalloc.
It also removed some kfree() on data that was earlier allocated
using devm_kzalloc().
CC: Herbert Xu <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Grant Likely <[email protected]>
CC: Rob Herring <[email protected]>
CC: Nicolas Ferre <[email protected]>
Signed-off-by: Pramod Gurav <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Depending on peripheral capabilities, print SHA information at the end
of the probe function.
Signed-off-by: Nicolas Ferre <[email protected]>
Acked-by: Herbert Xu <[email protected]>
|
|
Add support for Device Tree and use of the DMA DT API to
get the channels if needed.
Documentation is added for these DT nodes.
Initial code by: Nicolas Royer and Eukrea.
Signed-off-by: Nicolas Ferre <[email protected]>
Acked-by: Herbert Xu <[email protected]>
|
|
Updates from IP release 0x320 to 0x400:
- add DMA support (previous IP revision use PDC)
- add DMA double input buffer support
- add SHA224 support
Update from IP release 0x400 to 0x410:
- add SHA384 and SHA512 support
Signed-off-by: Nicolas Royer <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Acked-by: Eric Bénard <[email protected]>
Tested-by: Eric Bénard <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.
This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.
Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.
Cc: Bill Pemberton <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Kent Yoder <[email protected]>
Cc: Jamie Iles <[email protected]>
Cc: Kim Phillips <[email protected]>
Cc: Shengzhou Liu <[email protected]>
Cc: Alex Porosanu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
From: Wei Yongjun <[email protected]>
Remove duplicated include.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Signed-off-by: Nicolas Royer <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Acked-by: Eric Bénard <[email protected]>
Tested-by: Eric Bénard <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|