Skip to content

Commit b4ac79c

Browse files
committed
crypto: qat - switch to standard pattern for PCI IDs
JIRA: https://issues.redhat.com/browse/RHEL-72768 Upstream Status: merged into herbert/crypto-2.6.git commit d0d9d00 Author: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Date: Thu Apr 3 21:07:28 2025 +0100 crypto: qat - switch to standard pattern for PCI IDs Update the names of the defines for PCI IDs to follow the standard naming convention `PCI_DEVICE_ID_<DEVICE NAME>`. Also drop the unnecessary inner comma from the pci_device_id tables that use these definitions. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent 194e2e1 commit b4ac79c

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

drivers/crypto/intel/qat/qat_420xx/adf_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "adf_420xx_hw_data.h"
1515

1616
static const struct pci_device_id adf_pci_tbl[] = {
17-
{ PCI_VDEVICE(INTEL, ADF_420XX_PCI_DEVICE_ID), },
17+
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_420XX) },
1818
{ }
1919
};
2020
MODULE_DEVICE_TABLE(pci, adf_pci_tbl);

drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,13 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
421421
hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK;
422422
hw_data->num_rps = ADF_GEN4_MAX_RPS;
423423
switch (dev_id) {
424-
case ADF_402XX_PCI_DEVICE_ID:
424+
case PCI_DEVICE_ID_INTEL_QAT_402XX:
425425
hw_data->fw_name = ADF_402XX_FW;
426426
hw_data->fw_mmp_name = ADF_402XX_MMP;
427427
hw_data->uof_get_name = uof_get_name_402xx;
428428
hw_data->get_ena_thd_mask = get_ena_thd_mask;
429429
break;
430-
case ADF_401XX_PCI_DEVICE_ID:
430+
case PCI_DEVICE_ID_INTEL_QAT_401XX:
431431
hw_data->fw_name = ADF_4XXX_FW;
432432
hw_data->fw_mmp_name = ADF_4XXX_MMP;
433433
hw_data->uof_get_name = uof_get_name_4xxx;

drivers/crypto/intel/qat/qat_4xxx/adf_drv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include "adf_4xxx_hw_data.h"
1515

1616
static const struct pci_device_id adf_pci_tbl[] = {
17-
{ PCI_VDEVICE(INTEL, ADF_4XXX_PCI_DEVICE_ID), },
18-
{ PCI_VDEVICE(INTEL, ADF_401XX_PCI_DEVICE_ID), },
19-
{ PCI_VDEVICE(INTEL, ADF_402XX_PCI_DEVICE_ID), },
17+
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_4XXX) },
18+
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_401XX) },
19+
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_402XX) },
2020
{ }
2121
};
2222
MODULE_DEVICE_TABLE(pci, adf_pci_tbl);

drivers/crypto/intel/qat/qat_common/adf_accel_devices.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
#define ADF_C3XXXVF_DEVICE_NAME "c3xxxvf"
2626
#define ADF_4XXX_DEVICE_NAME "4xxx"
2727
#define ADF_420XX_DEVICE_NAME "420xx"
28-
#define ADF_4XXX_PCI_DEVICE_ID 0x4940
29-
#define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941
30-
#define ADF_401XX_PCI_DEVICE_ID 0x4942
31-
#define ADF_401XXIOV_PCI_DEVICE_ID 0x4943
32-
#define ADF_402XX_PCI_DEVICE_ID 0x4944
33-
#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945
34-
#define ADF_420XX_PCI_DEVICE_ID 0x4946
35-
#define ADF_420XXIOV_PCI_DEVICE_ID 0x4947
28+
#define PCI_DEVICE_ID_INTEL_QAT_4XXX 0x4940
29+
#define PCI_DEVICE_ID_INTEL_QAT_4XXXIOV 0x4941
30+
#define PCI_DEVICE_ID_INTEL_QAT_401XX 0x4942
31+
#define PCI_DEVICE_ID_INTEL_QAT_401XXIOV 0x4943
32+
#define PCI_DEVICE_ID_INTEL_QAT_402XX 0x4944
33+
#define PCI_DEVICE_ID_INTEL_QAT_402XXIOV 0x4945
34+
#define PCI_DEVICE_ID_INTEL_QAT_420XX 0x4946
35+
#define PCI_DEVICE_ID_INTEL_QAT_420XXIOV 0x4947
3636
#define ADF_DEVICE_FUSECTL_OFFSET 0x40
3737
#define ADF_DEVICE_LEGFUSE_OFFSET 0x4C
3838
#define ADF_DEVICE_FUSECTL_MASK 0x80000000

drivers/crypto/intel/qat/qat_common/qat_hal.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -694,16 +694,16 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle,
694694

695695
handle->pci_dev = pci_info->pci_dev;
696696
switch (handle->pci_dev->device) {
697-
case ADF_4XXX_PCI_DEVICE_ID:
698-
case ADF_401XX_PCI_DEVICE_ID:
699-
case ADF_402XX_PCI_DEVICE_ID:
700-
case ADF_420XX_PCI_DEVICE_ID:
697+
case PCI_DEVICE_ID_INTEL_QAT_4XXX:
698+
case PCI_DEVICE_ID_INTEL_QAT_401XX:
699+
case PCI_DEVICE_ID_INTEL_QAT_402XX:
700+
case PCI_DEVICE_ID_INTEL_QAT_420XX:
701701
handle->chip_info->mmp_sram_size = 0;
702702
handle->chip_info->nn = false;
703703
handle->chip_info->lm2lm3 = true;
704704
handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG_2X;
705705
handle->chip_info->icp_rst_csr = ICP_RESET_CPP0;
706-
if (handle->pci_dev->device == ADF_420XX_PCI_DEVICE_ID)
706+
if (handle->pci_dev->device == PCI_DEVICE_ID_INTEL_QAT_420XX)
707707
handle->chip_info->icp_rst_mask = 0x100155;
708708
else
709709
handle->chip_info->icp_rst_mask = 0x100015;

drivers/crypto/intel/qat/qat_common/qat_uclo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,10 +732,10 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle)
732732
return ICP_QAT_AC_C62X_DEV_TYPE;
733733
case PCI_DEVICE_ID_INTEL_QAT_C3XXX:
734734
return ICP_QAT_AC_C3XXX_DEV_TYPE;
735-
case ADF_4XXX_PCI_DEVICE_ID:
736-
case ADF_401XX_PCI_DEVICE_ID:
737-
case ADF_402XX_PCI_DEVICE_ID:
738-
case ADF_420XX_PCI_DEVICE_ID:
735+
case PCI_DEVICE_ID_INTEL_QAT_4XXX:
736+
case PCI_DEVICE_ID_INTEL_QAT_401XX:
737+
case PCI_DEVICE_ID_INTEL_QAT_402XX:
738+
case PCI_DEVICE_ID_INTEL_QAT_420XX:
739739
return ICP_QAT_AC_4XXX_A_DEV_TYPE;
740740
default:
741741
pr_err("QAT: unsupported device 0x%x\n",

0 commit comments

Comments
 (0)