]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pds_core: no reset command for VF
authorShannon Nelson <shannon.nelson@amd.com>
Thu, 24 Aug 2023 16:17:52 +0000 (09:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:08 +0000 (09:48 +0200)
[ Upstream commit 95e383226d6fcda6c217912f11edf8d74de9cc85 ]

The VF doesn't need to send a reset command, and in a PCI reset
scenario it might not have a valid IO space to write to anyway.

Fixes: 523847df1b37 ("pds_core: add devcmd device interfaces")
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230824161754.34264-4-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/pds_core/core.c

index 2a315f2da37d7eb68e6e53f0288907393ca1ee36..d06934edc265ec26e794c615d24e8a5d8f092093 100644 (file)
@@ -464,7 +464,8 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing)
 {
        int i;
 
-       pdsc_devcmd_reset(pdsc);
+       if (!pdsc->pdev->is_virtfn)
+               pdsc_devcmd_reset(pdsc);
        pdsc_qcq_free(pdsc, &pdsc->notifyqcq);
        pdsc_qcq_free(pdsc, &pdsc->adminqcq);