From patchwork Fri Apr 15 05:07:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1617645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=mfo01goZ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kfkql4RlCz9sFv for ; Fri, 15 Apr 2022 15:08:19 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Kfkqh1f4Pz2ymg for ; Fri, 15 Apr 2022 15:08:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=mfo01goZ; dkim-atps=neutral X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::62d; helo=mail-pl1-x62d.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=mfo01goZ; dkim-atps=neutral Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KfkqZ6nGXz2yNF for ; Fri, 15 Apr 2022 15:08:08 +1000 (AEST) Received: by mail-pl1-x62d.google.com with SMTP id y6so6362858plg.2 for ; Thu, 14 Apr 2022 22:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8YqFMa1IXN1PKDC9UT7f6BduKQK2XEUyF5RvZFJz14s=; b=mfo01goZwLmw+DZHNVBdBfx9wY1brTJW+71koawfmUZuNOgkmOLQUlJ9OdzId3C6qh VfKUrdjtwwG4bE9CSqxHolDAmowpXQmXPJ57U6ms8Jys89xnlp889JCffS8tdVPhe2/J nYlBqcfXMh8rATvNi3zbusmzCm5KJtwBMRnB5p1eWpkMAUJaBiXpnEFkmacJchvipZc2 6JlLpUMN/l+QmLOa3O8MKDJmxzU/AEmXfEX+fOtfWXGuKeNjn3SYkmX7nnL0ugUpIcaw Bj+upHNQwdLcmCS7g8tsDGoVs8eew/e+WDyK/dHCTFhoJ/zLUsvwsTmCqjZFLMWBtoQ5 TF5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=8YqFMa1IXN1PKDC9UT7f6BduKQK2XEUyF5RvZFJz14s=; b=5XA4BYX28zVQcMVa2UVVauN2zUbLRFqSk+XZ3yhs176qeyQMSGdIOCJA5reRkAcGLU 9pFwwMpsdIPkoT8NPJJrYBEWIg8W1hrHIFfUGG+bDqau9Nnizv8k16QxV/ve8m370euj b53GwwzgGdiYEUWwyB6Htky2XSB/6R5KdBttm0qf192aKQ6lKuu5Omt/MsebqW949ovz z9KDDLWzJMXo/PEG0DCApZYdSZQh/WtdQjmSm3dw3hmbbwVdpIvbJ3zUInc0SutOifVy 84tl/FzggRdL22EYnqASIcEiTFgg0wQtTWLL1xQxMIDait7UHMX7JUGvKj18ggMK8RWp pPoA== X-Gm-Message-State: AOAM533bxGMXSbFf8fF9o/DxDl6bRMwIbJSoPx93yzu1+RTdRzc1L2yB AwFZ24Fr3BkxMzNYzjG8HCU= X-Google-Smtp-Source: ABdhPJyIjpzyxnLP11xF7oCPJRkEhkUcJOgivp6AH7DFRBpNoHX03IRhgmYPqGpkci3e1CBRxxdG+Q== X-Received: by 2002:a17:902:ce85:b0:158:66cd:c370 with SMTP id f5-20020a170902ce8500b0015866cdc370mr22614912plg.111.1649999285520; Thu, 14 Apr 2022 22:08:05 -0700 (PDT) Received: from voyager.ozlabs.ibm.com (region97.lnk.telstra.net. [110.143.27.102]) by smtp.gmail.com with ESMTPSA id o5-20020a17090a3d4500b001c97528521asm3531507pjf.6.2022.04.14.22.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 22:08:04 -0700 (PDT) From: Joel Stanley To: Eddie James Subject: [PATCH v2] fsi: sbefifo: Add detailed debugging information Date: Fri, 15 Apr 2022 14:37:57 +0930 Message-Id: <20220415050757.281158-1-joel@jms.id.au> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-fsi@lists.ozlabs.org Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" Provide more output on the timeout status, and make some vdbg calls into dbg calls so they can be enabled at runtime. Signed-off-by: Joel Stanley --- v2: Fix timeout jiffies traces. The driver was printing jiffies as ms, so convert the timeout back to ms for the trace. drivers/fsi/fsi-sbefifo.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c index f52a912cdf16..5f93a53846aa 100644 --- a/drivers/fsi/fsi-sbefifo.c +++ b/drivers/fsi/fsi-sbefifo.c @@ -477,7 +477,8 @@ static int sbefifo_wait(struct sbefifo *sbefifo, bool up, if (!ready) { sysfs_notify(&sbefifo->dev.kobj, NULL, dev_attr_timeout.attr.name); sbefifo->timed_out = true; - dev_err(dev, "%s FIFO Timeout ! status=%08x\n", up ? "UP" : "DOWN", sts); + dev_err(dev, "%s FIFO Timeout (%u ms)! status=%08x\n", + up ? "UP" : "DOWN", jiffies_to_msecs(timeout), sts); return -ETIMEDOUT; } dev_vdbg(dev, "End of wait status: %08x\n", sts); @@ -497,8 +498,8 @@ static int sbefifo_send_command(struct sbefifo *sbefifo, u32 status; int rc; - dev_vdbg(dev, "sending command (%zd words, cmd=%04x)\n", - cmd_len, be32_to_cpu(command[1])); + dev_dbg(dev, "sending command (%zd words, cmd=%04x)\n", + cmd_len, be32_to_cpu(command[1])); /* As long as there's something to send */ timeout = msecs_to_jiffies(SBEFIFO_TIMEOUT_START_CMD); @@ -551,21 +552,23 @@ static int sbefifo_read_response(struct sbefifo *sbefifo, struct iov_iter *respo size_t len; int rc; - dev_vdbg(dev, "reading response, buflen = %zd\n", iov_iter_count(response)); + dev_dbg(dev, "reading response, buflen = %zd\n", iov_iter_count(response)); timeout = msecs_to_jiffies(sbefifo->timeout_start_rsp_ms); for (;;) { /* Grab FIFO status (this will handle parity errors) */ rc = sbefifo_wait(sbefifo, false, &status, timeout); - if (rc < 0) + if (rc < 0) { + dev_dbg(dev, "timeout waiting (%u ms)\n", jiffies_to_msecs(timeout)); return rc; + } timeout = msecs_to_jiffies(SBEFIFO_TIMEOUT_IN_RSP); /* Decode status */ len = sbefifo_populated(status); eot_set = sbefifo_eot_set(status); - dev_vdbg(dev, " chunk size %zd eot_set=0x%x\n", len, eot_set); + dev_dbg(dev, " chunk size %zd eot_set=0x%x\n", len, eot_set); /* Go through the chunk */ while(len--) {