]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - Change ISR handler method for a v5 CCP
authorGary R Hook <gary.hook@amd.com>
Fri, 21 Apr 2017 15:50:14 +0000 (10:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:30:58 +0000 (14:30 +0200)
commitbce0767157c3b540a3fad82c3f1ea4be480bb03e
tree064d49a642057e4d0bdebfd1b1a0e56c6479849d
parentf106cd8575c41a45d3a329bd9fdfdce28ab98601
crypto: ccp - Change ISR handler method for a v5 CCP

commit 6263b51eb3190d30351360fd168959af7e3a49a9 upstream.

The CCP has the ability to perform several operations simultaneously,
but only one interrupt.  When implemented as a PCI device and using
MSI-X/MSI interrupts, use a tasklet model to service interrupts. By
disabling and enabling interrupts from the CCP, coupled with the
queuing that tasklets provide, we can ensure that all events
(occurring on the device) are recognized and serviced.

This change fixes a problem wherein 2 or more busy queues can cause
notification bits to change state while a (CCP) interrupt is being
serviced, but after the queue state has been evaluated. This results
in the event being 'lost' and the queue hanging, waiting to be
serviced. Since the status bits are never fully de-asserted, the
CCP never generates another interrupt (all bits zero -> one or more
bits one), and no further CCP operations will be executed.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-dev-v5.c