]> asedeno.scripts.mit.edu Git - linux.git/commit
habanalabs: prevent host crash during suspend/resume
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 3 Mar 2019 20:29:20 +0000 (22:29 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 3 Mar 2019 20:29:20 +0000 (22:29 +0200)
commit7cb5101ee0107376f8eace195a138f99174e80ff
tree5103c5bd7b3c1efd1dce15ddcb66d759823f9985
parentcbaa99ed1b697072f089693a7fe2d649d08bf317
habanalabs: prevent host crash during suspend/resume

This patch fixes the implementation of suspend/resume of the device so that
upon resume of the device, the host won't crash due to PCI completion
timeout.

Upon suspend, the device is being reset due to PERST. Therefore, upon
resume, the driver must initialize the PCI controller as if the driver was
loaded. If the controller is not initialized and the device tries to
access the device through the PCI bars, the host will crash with PCI
completion timeout error.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/goya/goya.c