linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: qat - zero esram only for DH85x devices
@ 2016-12-22 15:00 Giovanni Cabiddu
  2016-12-30 12:20 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Cabiddu @ 2016-12-22 15:00 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, giovanni.cabiddu, Giovanni Cabiddu

Zero embedded ram in DH85x devices. This is not
needed for newer generations as it is done by HW.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
 drivers/crypto/qat/qat_common/qat_hal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c
index 1e480f1..8c4fd25 100644
--- a/drivers/crypto/qat/qat_common/qat_hal.c
+++ b/drivers/crypto/qat/qat_common/qat_hal.c
@@ -456,7 +456,7 @@ static int qat_hal_init_esram(struct icp_qat_fw_loader_handle *handle)
 	unsigned int csr_val;
 	int times = 30;
 
-	if (handle->pci_dev->device == ADF_C3XXX_PCI_DEVICE_ID)
+	if (handle->pci_dev->device != ADF_DH895XCC_PCI_DEVICE_ID)
 		return 0;
 
 	csr_val = ADF_CSR_RD(csr_addr, 0);
@@ -716,7 +716,7 @@ int qat_hal_init(struct adf_accel_dev *accel_dev)
 		(void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v +
 				 LOCAL_TO_XFER_REG_OFFSET);
 	handle->pci_dev = pci_info->pci_dev;
-	if (handle->pci_dev->device != ADF_C3XXX_PCI_DEVICE_ID) {
+	if (handle->pci_dev->device == ADF_DH895XCC_PCI_DEVICE_ID) {
 		sram_bar =
 			&pci_info->pci_bars[hw_data->get_sram_bar_id(hw_data)];
 		handle->hal_sram_addr_v = sram_bar->virt_addr;
-- 
2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: qat - zero esram only for DH85x devices
  2016-12-22 15:00 [PATCH] crypto: qat - zero esram only for DH85x devices Giovanni Cabiddu
@ 2016-12-30 12:20 ` Herbert Xu
  2017-01-31 13:35   ` Giovanni Cabiddu
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2016-12-30 12:20 UTC (permalink / raw)
  To: Giovanni Cabiddu; +Cc: linux-crypto, giovanni.cabiddu

On Thu, Dec 22, 2016 at 03:00:24PM +0000, Giovanni Cabiddu wrote:
> Zero embedded ram in DH85x devices. This is not
> needed for newer generations as it is done by HW.
> 
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: qat - zero esram only for DH85x devices
  2016-12-30 12:20 ` Herbert Xu
@ 2017-01-31 13:35   ` Giovanni Cabiddu
  0 siblings, 0 replies; 3+ messages in thread
From: Giovanni Cabiddu @ 2017-01-31 13:35 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, giovanni.cabiddu

Hi Herbert,

On Fri, Dec 30, 2016 at 08:20:11PM +0800, Herbert Xu wrote:
> On Thu, Dec 22, 2016 at 03:00:24PM +0000, Giovanni Cabiddu wrote:
> > Zero embedded ram in DH85x devices. This is not
> > needed for newer generations as it is done by HW.
> > 
> > Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> 
> Patch applied.  Thanks.
We realized that two patches I submitted in December (and now applied
to cryptodev-2.6) are needed to avoid a null pointer dereference
when loading the qat driver on some specific c62x devices:

841d6d10b38a2508c640ce: crypto: qat - zero esram only for DH85x devices
4f78ce870a4da0cf4db265: crypto: qat - fix bar discovery for c62x

This problem was introduced in 4.5 when we sent the c62x driver and
we recommend it should go to the stable kernels, 4.8.17 and 4.9.6.
Should I re-send these two patches to stable after they are merged
in Linus’ tree?

Thanks,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-31 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-22 15:00 [PATCH] crypto: qat - zero esram only for DH85x devices Giovanni Cabiddu
2016-12-30 12:20 ` Herbert Xu
2017-01-31 13:35   ` Giovanni Cabiddu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).