From patchwork Thu Jul 26 14:12:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiago Brusamarello X-Patchwork-Id: 10545971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC3301822 for ; Thu, 26 Jul 2018 14:22:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B0FE2B3D5 for ; Thu, 26 Jul 2018 14:22:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D36A2B400; Thu, 26 Jul 2018 14:22:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 830FA2B3D5 for ; Thu, 26 Jul 2018 14:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730293AbeGZPjL (ORCPT ); Thu, 26 Jul 2018 11:39:11 -0400 Received: from mx.datacom.ind.br ([177.66.5.10]:58954 "EHLO mail.datacom.com.br" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729406AbeGZPjL (ORCPT ); Thu, 26 Jul 2018 11:39:11 -0400 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Jul 2018 11:39:10 EDT Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id EBE9D1BA5B65; Thu, 26 Jul 2018 11:13:09 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id DB5421BA5A2D; Thu, 26 Jul 2018 11:13:09 -0300 (-03) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1zpmwgekOBuF; Thu, 26 Jul 2018 11:13:09 -0300 (-03) Received: from PEDELD201093.datacom.net (pedeld201093.datacom.net [10.0.120.40]) by mail.datacom.com.br (Postfix) with ESMTPSA id B6DF81BA3487; Thu, 26 Jul 2018 11:13:09 -0300 (-03) From: Tiago Brusamarello To: broonie@kernel.org Cc: linux-spi@vger.kernel.org Subject: [PATCH] spi: spi-fsl-espi: Log fifo counters on error Date: Thu, 26 Jul 2018 11:12:11 -0300 Message-Id: <1532614331-12663-1-git-send-email-tiago.brusamarello@datacom.ind.br> X-Mailer: git-send-email 2.7.4 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Log RX and TX fifo counters when a transfer is done and these are not zero. Signed-off-by: Tiago Brusamarello --- drivers/spi/spi-fsl-espi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 1d332e2..1e8ff62 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -547,8 +547,11 @@ static void fsl_espi_cpu_irq(struct fsl_espi *espi, u32 events) dev_err(espi->dev, "Transfer done but SPIE_DON isn't set!\n"); - if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE) + if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE) { dev_err(espi->dev, "Transfer done but rx/tx fifo's aren't empty!\n"); + dev_err(espi->dev, "SPIE_RXCNT = %d, SPIE_TXCNT = %d\n", + SPIE_RXCNT(events), SPIE_TXCNT(events)); + } complete(&espi->done); }