accel/habanalabs: add pci health check during heartbeat

[ Upstream commit d8b9cea584 ]

Currently upon a heartbeat failure, we don't know if the failure
is due to firmware hang or due to a bad PCI link. Hence, we
are reading a PCI config space register with a known value (vendor ID)
so we will know which of the two possibilities caused the heartbeat
failure.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Ofir Bitton 2023-04-18 14:48:22 +03:00 • committed by Greg Kroah-Hartman
commit 7f59afa93f
3 changed files with 16 additions and 3 deletions