]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: hisilicon/qm - adjust the internal processing sequence of the vf enable and...
authorChenghai Huang <huangchenghai2@huawei.com>
Sat, 1 Jun 2024 02:51:49 +0000 (10:51 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 7 Jun 2024 11:46:40 +0000 (19:46 +0800)
commit13e21e0ba44f5fad02a3b7b34987ff3845718198
treed792819437045a96b753042cf693fcff5d23ff0e
parent46b3ff73afc815f1feb844e6b57e43cc13051544
crypto: hisilicon/qm - adjust the internal processing sequence of the vf enable and disable

When the vf is enabled, the value of vfs_num must be assigned
after the VF configuration is complete. Otherwise, the device
may be accessed before the virtual configuration is complete,
causing an error.

When the vf is disabled, clear vfs_num and execute
qm_pm_put_sync before hisi_qm_sriov_disable is return.
Otherwise, if qm_clear_vft_config fails, users may access the
device when the PCI virtualization is disabled, resulting in an
error.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c