Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5472901ybx; Sun, 10 Nov 2019 14:11:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx7wWrIrHZX8rMiR7xcuh9LfnLuErhcVGdZHEVPQZyhdXCBzzSO7WL1GnwtwROYDqeddOHf X-Received: by 2002:a50:8a88:: with SMTP id j8mr23817835edj.35.1573423899072; Sun, 10 Nov 2019 14:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573423899; cv=none; d=google.com; s=arc-20160816; b=xTxlaSAXfmvoNPK7tZGldzdXjoZ6DcW7W38+c1lvy6Zo9DGq6YwDDZjtpD63SV0/NZ EBs0f4F5UQ/3miyvs4+Iti8c/JLtjR9c5roKcQe2ncEuKXowUAcS1DT4IfTJuxEiE6/Q sm+txGVMtqMKFq2BI1cwIzMhdUcdZyi1xL3Cxotl5EKteyTA6dLNJVvqVq48Qc39Zl// 8YIVVlvMIsr8t8hgfmmKNTv1zy7LzYFYqszQSwn3dBc8OHKtlgKMenidj5RiqY3WFoyl XG+fjJ+56zJuOoeVuUlcbxJvg+m1m1v3TyQ6coXZYYws4r5wvxQYkvt5gJieqCfDD35/ Ul7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=802X/0I8nW87iZxQ0qhEL5M55KFKYdUCM0ggeRN6az8=; b=NNsbAQwrjrNiR/HYaE+tRwSNw9HJeNSd3J3Ase09gSlbw3/SuN/Evs+aBdYijXl01H sIHB1AoTk/y8JfpF+6r+k8fMKM9mvGp+AsUcONlkcD3irKqd1OZJOxtdyg6ZZfW2uc6E 4E5HGoUUIOX6DM0z5l7MEsaXuYCpNLi7NBbvzo2qrTR9jTKzQiH+OKDEjwtM76oOuh6v 1rvNFHRgug1rYmRIu6wO4oQOdtzLa3q4QIdvAdEvfevNr4xXNd3gDlBwYybOfsjjSy2E hEvw6EEzdYXY9zv9VPDx8a8HX+AYqTOOM48PgIW4Cat4WWlBH24RgEOvkql7F7pheRoK UNxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tepStVoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si8146619ejv.152.2019.11.10.14.11.16; Sun, 10 Nov 2019 14:11:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tepStVoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbfKJVzj (ORCPT + 99 others); Sun, 10 Nov 2019 16:55:39 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34302 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbfKJVzj (ORCPT ); Sun, 10 Nov 2019 16:55:39 -0500 Received: by mail-wr1-f65.google.com with SMTP id e6so12621935wrw.1 for ; Sun, 10 Nov 2019 13:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=802X/0I8nW87iZxQ0qhEL5M55KFKYdUCM0ggeRN6az8=; b=tepStVoiDlO3fAQzsMKbUMTj4bM+ceo8m1lHfvZl52eI5B2Cojs0KWLoNS6vt57wP0 yoYLH5BlQiyU7SyGONyjdayUbNO/meA7IzLFS9hyco+s/JPr8t1UZWNSbceWgsZMGVpA PL3i6y+//xGTaSaJNPkEVUqYPwi/QvLBq1DtH97GphWUv0/NpCWh8ml2ZOh5NnI8xaz+ OkciJp+HqBk22aabcBZ0zFcKDKnq6CQV4V8Dsz33uqwfHuu7eM9i8xgOJxZpZGbwX3rb Li16n7yJkltDRIa6OnuOYCSbOvvu8wkdpdfBQ0IXLb9ZqPA+MuIAseAhehvXakGugLG4 QwNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=802X/0I8nW87iZxQ0qhEL5M55KFKYdUCM0ggeRN6az8=; b=cZSSOfqzD4Kd7xO0/NTK8QCyMC91Fe74yOS/kBAsqah+JLGh8XLQbIZw+ePu2GZsry +fiwYvS9cQXSw5Je1aIgBuLVjqd54O6BVsCpltwylTRE6nd0HAVFkzKseIRY0GU8vTll dB+VXdOMPc33vkx1uuj12q77w2uSio3HD4EyMqIatGHHYv6hvw6RnKimxG6X+c70mxv8 T1f2eXCzGXChDtOxki5eQw+lEkXMFj/A2w6uyhmFrPTXzTJQoAzTmahvBjzN5V3sDmCJ 7X06UpSF6MJi1QGm18Ak2nd1cF3p758g8GvtVwcia/iIEB52wu00unSic9BEag2q4VvB Pqsw== X-Gm-Message-State: APjAAAU+19c0X2l1bLzwgEktXdT5Z5NcPMT41g10/2ofAnD4XbWn3G3Q kXPhpTWV/voi0L3VVNWZIDv0+HEdr5k= X-Received: by 2002:a5d:67c2:: with SMTP id n2mr9997135wrw.222.1573422935619; Sun, 10 Nov 2019 13:55:35 -0800 (PST) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id d11sm14555824wrn.28.2019.11.10.13.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2019 13:55:35 -0800 (PST) From: Oded Gabbay To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai, ttayar@habana.ai Cc: gregkh@linuxfoundation.org Subject: [PATCH 1/6] habanalabs: read F/W versions before failure Date: Sun, 10 Nov 2019 23:55:28 +0200 Message-Id: <20191110215533.754-1-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the read of the F/W boot versions before exiting on possible failures of the F/W boot. This will help debug boot failures as we will be able to know the F/W boot version. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/goya/goya.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index d3ee9e2aa57e..4e767e1d78e4 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -2296,6 +2296,10 @@ static int goya_init_cpu(struct hl_device *hdev, u32 cpu_timeout) 10000, cpu_timeout); + /* Read U-Boot version now in case we will later fail */ + goya_read_device_fw_version(hdev, FW_COMP_UBOOT); + goya_read_device_fw_version(hdev, FW_COMP_PREBOOT); + if (rc) { dev_err(hdev->dev, "Error in ARM u-boot!"); switch (status) { @@ -2347,10 +2351,6 @@ static int goya_init_cpu(struct hl_device *hdev, u32 cpu_timeout) return -EIO; } - /* Read U-Boot version now in case we will later fail */ - goya_read_device_fw_version(hdev, FW_COMP_UBOOT); - goya_read_device_fw_version(hdev, FW_COMP_PREBOOT); - if (!hdev->fw_loading) { dev_info(hdev->dev, "Skip loading FW\n"); goto out; -- 2.17.1