OSDN Git Service

crypto: ccp - Change ISR handler method for a v3 CCP
authorGary R Hook <gary.hook@amd.com>
Fri, 21 Apr 2017 15:50:05 +0000 (10:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:28:37 +0000 (14:28 +0200)
commita0a232489c0fd8f41016f221cfca6644a34b7b9a
treea4c27ba76642e1fc66b986eca6c43555d4079a44
parent93424b2b63e0765c32e723173689a2d2b78d19ba
crypto: ccp - Change ISR handler method for a v3 CCP

commit 7b537b24e76a1e8e6d7ea91483a45d5b1426809b 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-v3.c
drivers/crypto/ccp/ccp-dev.h
drivers/crypto/ccp/ccp-pci.c