habanalabs: we need CPU queues for hwmon
authorOded Gabbay <ogabbay@kernel.org>
Thu, 1 Oct 2020 10:44:22 +0000 (13:44 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:27 +0000 (10:47 +0200)
F/W can be loaded but device CPU queues disabled. In that case, HWMON
should be disabled. This is only relevant when debugging

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/hwmon.c

index 2ac29cb..892a5e2 100644 (file)
@@ -542,7 +542,7 @@ int hl_hwmon_init(struct hl_device *hdev)
        struct asic_fixed_properties *prop = &hdev->asic_prop;
        int rc;
 
-       if ((hdev->hwmon_initialized) || !(hdev->fw_loading))
+       if ((hdev->hwmon_initialized) || !(hdev->cpu_queues_enable))
                return 0;
 
        if (hdev->hl_chip_info->info) {