[PATCH 1/2] drm/xe/pf: Disable VFs on remove
Piotr Piórkowski
piotr.piorkowski at intel.com
Wed Jun 26 14:13:56 UTC 2024
Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on śro [2024-cze-26 13:18:26 +0200]:
> We shouldn't leave VFs enabled when unloading the PF driver.
> Otherwise we will get a message like:
>
> [ ] xe 0000:4d:00.0: driver left SR-IOV enabled after remove
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Piotr Piórkowski <piotr.piorkowski at intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index ebff5ea79b1d..4b91a9878f41 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -749,6 +749,11 @@ static void xe_pci_remove(struct pci_dev *pdev)
> if (!xe) /* driver load aborted, nothing to cleanup */
> return;
>
> +#ifdef CONFIG_PCI_IOV
> + if (IS_SRIOV_PF(xe))
> + xe_pci_sriov_configure(pdev, 0);
> +#endif
> +
> xe_device_remove(xe);
> xe_pm_runtime_fini(xe);
> pci_set_drvdata(pdev, NULL);
>
LGTM:
Reviewed-by: Piotr Piórkowski <piotr.piorkowski at intel.com>
--
> 2.43.0
>
--
More information about the Intel-xe
mailing list