Commit 387b845
committed
accel/amdxdna: skip destroy VFs cmd when no VFs were created
When unloading the driver, aie4_sriov_stop() unconditionally sends a
destroy VFs firmware command even when no VFs were ever created. This
causes the firmware to return an error:
amdxdna: [drm] *ERROR* aie_send_mgmt_msg_wait: command opcode 0x20002 failed, status 0x1
amdxdna: [drm] *ERROR* aie4_destroy_vfs: destroy vfs op failed: -22
Fix this by checking pci_num_vf() at the top of aie4_sriov_stop() and
returning early if no VFs exist.
Signed-off-by: Nishad Saraf <nishads@amd.com>1 parent a543077 commit 387b845
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
0 commit comments