]> git.baikalelectronics.ru Git - kernel.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)
commitc2b14a84781770299b82a00dad945c724a6b39a3
tree5103c5bd7b3c1efd1dce15ddcb66d759823f9985
parentf4a0e0cb437381abd5a61b37f65009d46a8d8499
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