diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2019-02-28 09:46:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-28 13:04:59 +0100 |
commit | a28ce422a6d926c11d7e72a83ccaa4f9b06077ea (patch) | |
tree | 65f08f69e8eec0cf7d5272a87e2e612f975c04ec /drivers/misc/habanalabs/sysfs.c | |
parent | habanalabs: add MMU DRAM default page mapping (diff) | |
download | linux-a28ce422a6d926c11d7e72a83ccaa4f9b06077ea.tar.xz linux-a28ce422a6d926c11d7e72a83ccaa4f9b06077ea.zip |
habanalabs: disable CPU access on timeouts
This patch provides a workaround for a bug in the F/W where the response
time for a request from KMD may take more then 100ms. This could cause the
queue between KMD and the F/W to get out of sync.
The WA is to:
1. Increase the timeout of ALL requests to 1s.
2. In case a request isn't answered in time, mark the state as
"cpu_disabled" and prevent sending further requests from KMD to the F/W.
This will eventually lead to a heartbeat failure and hard reset of the
device.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/habanalabs/sysfs.c')
-rw-r--r-- | drivers/misc/habanalabs/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/sysfs.c b/drivers/misc/habanalabs/sysfs.c index 6d80e7e0885c..12c782112a8c 100644 --- a/drivers/misc/habanalabs/sysfs.c +++ b/drivers/misc/habanalabs/sysfs.c @@ -9,8 +9,8 @@ #include <linux/pci.h> -#define SET_CLK_PKT_TIMEOUT 200000 /* 200ms */ -#define SET_PWR_PKT_TIMEOUT 400000 /* 400ms */ +#define SET_CLK_PKT_TIMEOUT 1000000 /* 1s */ +#define SET_PWR_PKT_TIMEOUT 1000000 /* 1s */ long hl_get_frequency(struct hl_device *hdev, u32 pll_index, bool curr) { |