OSDN Git Service

accel/habanalabs: add pci health check during heartbeat
authorOfir Bitton <obitton@habana.ai>
Tue, 18 Apr 2023 11:48:22 +0000 (14:48 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 8 Jun 2023 09:35:54 +0000 (12:35 +0300)
commitd8b9cea584661b30305cf341bf9f675dc0a25471
tree39425aecf5c4735bf8676c0cf564437fbf639fe6
parent3d21ec6424e6d38f284c37d77e7ec524c1a454f2
accel/habanalabs: add pci health check during heartbeat

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>
drivers/accel/habanalabs/common/device.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/common/habanalabs_drv.c