Commit 009ad833 authored by Chenghai Huang's avatar Chenghai Huang Committed by 白凤
Browse files

crypto: hisilicon/sec - Add the condition for configuring the sriov function

maillist inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I9GMIW
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev.git/commit/?id=5307147b5e23



----------------------------------------------------------------------

When CONFIG_PCI_IOV is disabled, the SRIOV configuration
function is not required. An error occurs if this function is
incorrectly called.

Consistent with other modules, add the condition for
configuring the sriov function of sec_pci_driver.

Signed-off-by: default avatarChenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarJangShui Yang <yangjiangshui@h-partners.com>
Signed-off-by: default avatarXiaoFeng Ma <maxiaofeng14@h-partners.com>
parent 99e7401c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1324,7 +1324,8 @@ static struct pci_driver sec_pci_driver = {
	.probe = sec_probe,
	.remove = sec_remove,
	.err_handler = &sec_err_handler,
	.sriov_configure = hisi_qm_sriov_configure,
	.sriov_configure = IS_ENABLED(CONFIG_PCI_IOV) ?
				hisi_qm_sriov_configure : NULL,
	.shutdown = hisi_qm_dev_shutdown,
	.driver.pm = &sec_pm_ops,
};