diff options
author | Giovanni Cabiddu <giovanni.cabiddu@intel.com> | 2016-12-22 15:00:12 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-12-30 19:52:27 +0800 |
commit | 4f78ce870a4da0cf4db265ec4fd31eb4fb7f9c57 (patch) | |
tree | 2b51e3497553133851d03a5e272321191e947fe8 /drivers/crypto/qat/qat_c62x | |
parent | ac6d9a2cec195a7778e013f405cfb86c1dd244a7 (diff) | |
download | linux-4f78ce870a4da0cf4db265ec4fd31eb4fb7f9c57.tar.gz linux-4f78ce870a4da0cf4db265ec4fd31eb4fb7f9c57.tar.bz2 linux-4f78ce870a4da0cf4db265ec4fd31eb4fb7f9c57.zip |
crypto: qat - fix bar discovery for c62x
Some accelerators of the c62x series have only two bars.
This patch skips BAR0 if the accelerator does not have it.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat/qat_c62x')
-rw-r--r-- | drivers/crypto/qat/qat_c62x/adf_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/qat/qat_c62x/adf_drv.c b/drivers/crypto/qat/qat_c62x/adf_drv.c index bc5cbc193aae..5b2d78a5b5aa 100644 --- a/drivers/crypto/qat/qat_c62x/adf_drv.c +++ b/drivers/crypto/qat/qat_c62x/adf_drv.c @@ -233,7 +233,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) &hw_data->accel_capabilities_mask); /* Find and map all the device's BARS */ - i = 0; + i = (hw_data->fuses & ADF_DEVICE_FUSECTL_MASK) ? 1 : 0; bar_mask = pci_select_bars(pdev, IORESOURCE_MEM); for_each_set_bit(bar_nr, (const unsigned long *)&bar_mask, ADF_PCI_MAX_BARS * 2) { |