habanalabs: add missing counter update
authorOded Gabbay <ogabbay@kernel.org>
Wed, 25 Nov 2020 06:02:40 +0000 (08:02 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:37 +0000 (10:47 +0200)
The global CS drop-on-reset counter wasn't updated together with
the context counter.

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

index d1d30fb3641039d3d4c7a2b63e7615e85ebe2ea2..7caf868d1585c2fbd1d5cb033cedde1ddbfb035e 100644 (file)
@@ -529,6 +529,7 @@ int hl_hw_queue_schedule_cs(struct hl_cs *cs)
        hdev->asic_funcs->hw_queues_lock(hdev);
 
        if (!hl_device_operational(hdev, &status)) {
+               atomic64_inc(&cntr->device_in_reset_drop_cnt);
                atomic64_inc(&ctx->cs_counters.device_in_reset_drop_cnt);
                dev_err(hdev->dev,
                        "device is %s, CS rejected!\n", hdev->status[status]);