Skip to content

Commit 2dc4a6d

Browse files
committed
habanalabs: disable FW events on device removal
When device is removed, we need to make sure the F/W won't send us any more events because during the remove process we disable the interrupts. Signed-off-by: Oded Gabbay <[email protected]>
1 parent f8abaf3 commit 2dc4a6d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/misc/habanalabs/common/device.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,15 @@ void hl_device_fini(struct hl_device *hdev)
14871487
}
14881488
}
14891489

1490+
/* Disable PCI access from device F/W so it won't send us additional
1491+
* interrupts. We disable MSI/MSI-X at the halt_engines function and we
1492+
* can't have the F/W sending us interrupts after that. We need to
1493+
* disable the access here because if the device is marked disable, the
1494+
* message won't be send. Also, in case of heartbeat, the device CPU is
1495+
* marked as disable so this message won't be sent
1496+
*/
1497+
hl_fw_send_pci_access_msg(hdev, CPUCP_PACKET_DISABLE_PCI_ACCESS);
1498+
14901499
/* Mark device as disabled */
14911500
hdev->disabled = true;
14921501

0 commit comments

Comments
 (0)