]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto/nx: Initialize 842 high and normal RxFIFO control registers
authorHaren Myneni <haren@linux.vnet.ibm.com>
Wed, 22 May 2019 17:13:08 +0000 (12:13 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 24 Jun 2019 14:21:33 +0000 (16:21 +0200)
commitbc23260c1daea355eea3da46fd22050ac15db4e2
tree5da87785a227e7414148bb808591af1fdc3dd704
parent87bbe7a3cb2d69e406cff9a8406b553afe39ed99
crypto/nx: Initialize 842 high and normal RxFIFO control registers

BugLink: https://bugs.launchpad.net/bugs/1827755
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>
(backported from commit 656ecc16e8fc2ab44b3d70e3fcc197a7020d0ca5)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
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