]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: qat - switch to standard pattern for PCI IDs
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Thu, 3 Apr 2025 20:07:28 +0000 (21:07 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Apr 2025 05:22:27 +0000 (13:22 +0800)
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>
drivers/crypto/intel/qat/qat_420xx/adf_drv.c
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/intel/qat/qat_4xxx/adf_drv.c
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/qat_hal.c
drivers/crypto/intel/qat/qat_common/qat_uclo.c

index b4731f02deb8c48b185ddcd73dec0d984c277e40..cfa00daeb4fbaf3ef17c55e107c18938f34a379f 100644 (file)
@@ -14,7 +14,7 @@
 #include "adf_420xx_hw_data.h"
 
 static const struct pci_device_id adf_pci_tbl[] = {
-       { PCI_VDEVICE(INTEL, ADF_420XX_PCI_DEVICE_ID), },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_420XX) },
        { }
 };
 MODULE_DEVICE_TABLE(pci, adf_pci_tbl);
index 63c7c8e90cca25b0082147d6ae64f10984303b97..7d4c366aa8b22e75aede9c8981b361bc558d0bd8 100644 (file)
@@ -421,13 +421,13 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
        hw_data->admin_ae_mask = ADF_4XXX_ADMIN_AE_MASK;
        hw_data->num_rps = ADF_GEN4_MAX_RPS;
        switch (dev_id) {
-       case ADF_402XX_PCI_DEVICE_ID:
+       case PCI_DEVICE_ID_INTEL_QAT_402XX:
                hw_data->fw_name = ADF_402XX_FW;
                hw_data->fw_mmp_name = ADF_402XX_MMP;
                hw_data->uof_get_name = uof_get_name_402xx;
                hw_data->get_ena_thd_mask = get_ena_thd_mask;
                break;
-       case ADF_401XX_PCI_DEVICE_ID:
+       case PCI_DEVICE_ID_INTEL_QAT_401XX:
                hw_data->fw_name = ADF_4XXX_FW;
                hw_data->fw_mmp_name = ADF_4XXX_MMP;
                hw_data->uof_get_name = uof_get_name_4xxx;
index 1ac415ef3c31546d80113a639ef628c0a1482734..c9be5dcddb277a2e374f37a8459eebbc40f21be4 100644 (file)
@@ -14,9 +14,9 @@
 #include "adf_4xxx_hw_data.h"
 
 static const struct pci_device_id adf_pci_tbl[] = {
-       { PCI_VDEVICE(INTEL, ADF_4XXX_PCI_DEVICE_ID), },
-       { PCI_VDEVICE(INTEL, ADF_401XX_PCI_DEVICE_ID), },
-       { PCI_VDEVICE(INTEL, ADF_402XX_PCI_DEVICE_ID), },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_4XXX) },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_401XX) },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_402XX) },
        { }
 };
 MODULE_DEVICE_TABLE(pci, adf_pci_tbl);
index dc21551153cb66788fbbdb3cfd1794ebd815c8a3..1e301a20c2445fc69498542ee19396a956d48629 100644 (file)
 #define ADF_C3XXXVF_DEVICE_NAME "c3xxxvf"
 #define ADF_4XXX_DEVICE_NAME "4xxx"
 #define ADF_420XX_DEVICE_NAME "420xx"
-#define ADF_4XXX_PCI_DEVICE_ID 0x4940
-#define ADF_4XXXIOV_PCI_DEVICE_ID 0x4941
-#define ADF_401XX_PCI_DEVICE_ID 0x4942
-#define ADF_401XXIOV_PCI_DEVICE_ID 0x4943
-#define ADF_402XX_PCI_DEVICE_ID 0x4944
-#define ADF_402XXIOV_PCI_DEVICE_ID 0x4945
-#define ADF_420XX_PCI_DEVICE_ID 0x4946
-#define ADF_420XXIOV_PCI_DEVICE_ID 0x4947
+#define PCI_DEVICE_ID_INTEL_QAT_4XXX 0x4940
+#define PCI_DEVICE_ID_INTEL_QAT_4XXXIOV 0x4941
+#define PCI_DEVICE_ID_INTEL_QAT_401XX 0x4942
+#define PCI_DEVICE_ID_INTEL_QAT_401XXIOV 0x4943
+#define PCI_DEVICE_ID_INTEL_QAT_402XX 0x4944
+#define PCI_DEVICE_ID_INTEL_QAT_402XXIOV 0x4945
+#define PCI_DEVICE_ID_INTEL_QAT_420XX 0x4946
+#define PCI_DEVICE_ID_INTEL_QAT_420XXIOV 0x4947
 #define ADF_DEVICE_FUSECTL_OFFSET 0x40
 #define ADF_DEVICE_LEGFUSE_OFFSET 0x4C
 #define ADF_DEVICE_FUSECTL_MASK 0x80000000
index ef8a9cf74f0c76fafe303e7af49bf3073f55d979..841c1d7d3ffed5c558d3564b971fac4a68b40793 100644 (file)
@@ -694,16 +694,16 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle,
 
        handle->pci_dev = pci_info->pci_dev;
        switch (handle->pci_dev->device) {
-       case ADF_4XXX_PCI_DEVICE_ID:
-       case ADF_401XX_PCI_DEVICE_ID:
-       case ADF_402XX_PCI_DEVICE_ID:
-       case ADF_420XX_PCI_DEVICE_ID:
+       case PCI_DEVICE_ID_INTEL_QAT_4XXX:
+       case PCI_DEVICE_ID_INTEL_QAT_401XX:
+       case PCI_DEVICE_ID_INTEL_QAT_402XX:
+       case PCI_DEVICE_ID_INTEL_QAT_420XX:
                handle->chip_info->mmp_sram_size = 0;
                handle->chip_info->nn = false;
                handle->chip_info->lm2lm3 = true;
                handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG_2X;
                handle->chip_info->icp_rst_csr = ICP_RESET_CPP0;
-               if (handle->pci_dev->device == ADF_420XX_PCI_DEVICE_ID)
+               if (handle->pci_dev->device == PCI_DEVICE_ID_INTEL_QAT_420XX)
                        handle->chip_info->icp_rst_mask = 0x100155;
                else
                        handle->chip_info->icp_rst_mask = 0x100015;
index 87e247ac1c9a956e0fbcd1a293e677260bb5579f..620300e702387c0cf35bc2d5ba64eb30b80108a2 100644 (file)
@@ -732,10 +732,10 @@ qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle)
                return ICP_QAT_AC_C62X_DEV_TYPE;
        case PCI_DEVICE_ID_INTEL_QAT_C3XXX:
                return ICP_QAT_AC_C3XXX_DEV_TYPE;
-       case ADF_4XXX_PCI_DEVICE_ID:
-       case ADF_401XX_PCI_DEVICE_ID:
-       case ADF_402XX_PCI_DEVICE_ID:
-       case ADF_420XX_PCI_DEVICE_ID:
+       case PCI_DEVICE_ID_INTEL_QAT_4XXX:
+       case PCI_DEVICE_ID_INTEL_QAT_401XX:
+       case PCI_DEVICE_ID_INTEL_QAT_402XX:
+       case PCI_DEVICE_ID_INTEL_QAT_420XX:
                return ICP_QAT_AC_4XXX_A_DEV_TYPE;
        default:
                pr_err("QAT: unsupported device 0x%x\n",