OSDN Git Service

crypto: octeontx2 - add synchronization between mailbox accesses
authorHarman Kalra <hkalra@marvell.com>
Fri, 4 Feb 2022 12:46:01 +0000 (18:16 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Feb 2022 03:28:32 +0000 (15:28 +1200)
commit4363f3d3ce8f5440dfbcd66b6a6800b42a58ba6a
treee1a15b2fdf6710d19902fe9e7cc88dfe0193ae95
parent8208285632f950d2bfd489b10148e05134b7119e
crypto: octeontx2 - add synchronization between mailbox accesses

Since there are two workqueues implemented in CPTPF driver - one
for handling mailbox requests from VFs and another for handling FLR.
In both cases PF driver will forward the request to AF driver by
writing to mailbox memory. A race condition may arise if two
simultaneous requests are written to mailbox memory. Introducing
locking mechanism to maintain synchronization between multiple
mailbox accesses.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.c
drivers/crypto/marvell/octeontx2/otx2_cptpf.h
drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c