]> git.baikalelectronics.ru Git - kernel.git/commit
crypto/nx: Initialize 842 high and normal RxFIFO control registers
authorHaren Myneni <haren@linux.vnet.ibm.com>
Wed, 13 Jun 2018 07:32:40 +0000 (00:32 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Aug 2018 14:32:34 +0000 (00:32 +1000)
commitc28fbf2b81091ed9a18a1daad312d0e9e658de4e
tree31fc029fb2a6c3a6943fd9300dbf2d1a08316d48
parent702c27d94072a72d08f0e3e03f06dadbb31a5a87
crypto/nx: Initialize 842 high and normal RxFIFO control registers

NX increments readOffset by FIFO size in receive FIFO control register
when CRB is read. But the index in RxFIFO has to match with the
corresponding entry in FIFO maintained by VAS in kernel. Otherwise NX
may be processing incorrect CRBs and can cause CRB timeout.

VAS FIFO offset is 0 when the receive window is opened during
initialization. When the module is reloaded or in kexec boot, readOffset
in FIFO control register may not match with VAS entry. This patch adds
nx_coproc_init OPAL call to reset readOffset and queued entries in FIFO
control register for both high and normal FIFOs.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
[mpe: Fixup uninitialized variable warning]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal-api.h
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-wrappers.S
arch/powerpc/platforms/powernv/opal.c
drivers/crypto/nx/nx-842-powernv.c