From patchwork Tue Oct 3 05:21:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9981727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6DF7D60291 for ; Tue, 3 Oct 2017 05:49:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6124328885 for ; Tue, 3 Oct 2017 05:49:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55D2528894; Tue, 3 Oct 2017 05:49:29 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E7F6328885 for ; Tue, 3 Oct 2017 05:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MXnl/aKZlCuX7L2IPvQVanUE6l2KxQaOQp7zrywsdrE=; b=dDn7MVMdpblyiKMZRg/vxUQ1Q0 GolWLA9Xr7Co960B/HeOG7508RHGUg8YVFpGKUQ04B4tSHUdbsiO1Ku4jPELg3EyNy6HUh0MEzyfU ybv1KAK92GcURX34Jxtpx4tE18/YrzoZhlUXw2qidAWKJMOdnx66YEo75GdOuhExTjHSu6Q5hzAsc SZsaMkvFJTumrUWdR9gdwqcyeGSmaUcLlhcflb5n4bIOjD6SKOTby1swZa42YlDeyXPZ5pqBEyQOz D+nu4qtuHcWl9PU99D2bOJOT0jInMiWEdC9ExcBGKnfGCepTPp5QVq0R2KFkDKKFSERjoM+6qeJlO A6Rf8Ong==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzG56-0001CB-Jl; Tue, 03 Oct 2017 05:49:24 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzG4u-00011v-Mk for linux-arm-kernel@bombadil.infradead.org; Tue, 03 Oct 2017 05:49:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ccfdR9L+RvejUV2g7gOgM1fYfom8tS1qpOsjZKOQRN8=; b=WKGd+YaMenSiLBZVgom0SDxXh OprwF1eqP4ehUqsuGAJB3mZS8ughd0bRK4z136WK2CZXODEKHWoQD38yy4RwxyijFfUWmCJpuoedh nn//1ro86Niri0dE2adz1ESTlGXVuCIVwDBw/EXSo2VTeq5nCPtIpBdr7OewCZqZginhQ7FHBalxs nyP4ISwin3SSjPbCxG4UL/4/DJNGYoSuwSbu04rFCMhNzEx8VGUcFESAak2XXmlbkQKah44EQp8xi 7qxWjv09ZxuiywIWod27Nw1+gkJaFdXUHbZ2wnaWru6npwmJQQjwRPcspqHk4UHAYSURiH5/nzXBP avrgx/TsQ==; Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzFfM-0002CC-BZ for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2017 05:22:49 +0000 Received: by mail-qk0-x236.google.com with SMTP id d67so3934767qkg.5 for ; Mon, 02 Oct 2017 22:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ccfdR9L+RvejUV2g7gOgM1fYfom8tS1qpOsjZKOQRN8=; b=Hbh6vXgiOymaORmC85JnEAs9F1FYRcIA2eqwIrTTzOI3i8JCzEsoE0TlRRFN1qCVnW 8SB8yb2B3KaYTEj5l7d6dDCP2Pr4uQApdPVeVWLthr9lTIjZwhTNV0JWQ8kr33zQM3KL pwHQF1GnRlL5ytu0gmJyA2Sp+0Il4kNdnlaYg= 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:in-reply-to :references; bh=ccfdR9L+RvejUV2g7gOgM1fYfom8tS1qpOsjZKOQRN8=; b=dy0tZU9Z4r4xvHyIUDDGxHcE+DyzDVT/EQhLYPkJ+RyrtLcz6M55coQUEOlRaQlx2T TPiGtmwHDHBuS76llVr4gpUElhWOxEKIn7v0DSBwYoOyHDkSPc5gGCzft/0AucHSbE0H yi4QhbVYYqCENuxdlpYWff1cSygx4HMAizKmBMkWx/pd1lZSd9rCK5KD105G88fm8JeC 0zbLx6On5DkMwWsUZws8pEFDOfN2K0eX13GlyquS3fRsniyLXAe32Sxj9cr/dMERRGP8 1Y1hRiLRUoGmbWw8BPUTUXhEAziRbOM/ssyAANkEaWcvaoaZvFBhbatLzznNAJc5UvaG RGLg== X-Gm-Message-State: AMCzsaUg3+jCpkEALYY6Vz3qvm75Cc/nVY0uRJqL9HTMkhanOlggjRA0 4GZqHijrF76G1QO/PrPIOb97ZQ== X-Google-Smtp-Source: AOwi7QBe7ACfnK9CSdh8s0Pm80QLM9AG9VFBzzOcRnnbCXiimcK1fdyR0KZ0IcsDkDVFYMFzD5dxeg== X-Received: by 10.55.15.65 with SMTP id z62mr18767320qkg.2.1507008146026; Mon, 02 Oct 2017 22:22:26 -0700 (PDT) Received: from anup-HP-Compaq-8100-Elite-CMT-PC.dhcp.avagotech.net ([192.19.237.250]) by smtp.gmail.com with ESMTPSA id l51sm8226731qtl.41.2017.10.02.22.22.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 22:22:25 -0700 (PDT) From: Anup Patel To: Jassi Brar Subject: [PATCH 2/5] mailbox: bcm-flexrm-mailbox: Print ring number in errors and warnings Date: Tue, 3 Oct 2017 10:51:49 +0530 Message-Id: <1507008112-27117-3-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507008112-27117-1-git-send-email-anup.patel@broadcom.com> References: <1507008112-27117-1-git-send-email-anup.patel@broadcom.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Anup Patel , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch updates all dev_err() and dev_warn() to print ring number so that we have more info for debugging. Signed-off-by: Anup Patel Reviewed-by: Scott Branden --- drivers/mailbox/bcm-flexrm-mailbox.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c index f052a3e..e0443ae 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c @@ -1116,8 +1116,8 @@ static int flexrm_process_completions(struct flexrm_ring *ring) err = flexrm_cmpl_desc_to_error(desc); if (err < 0) { dev_warn(ring->mbox->dev, - "got completion desc=0x%lx with error %d", - (unsigned long)desc, err); + "ring%d got completion desc=0x%lx with error %d\n", + ring->num, (unsigned long)desc, err); } /* Determine request id from completion descriptor */ @@ -1127,8 +1127,8 @@ static int flexrm_process_completions(struct flexrm_ring *ring) msg = ring->requests[reqid]; if (!msg) { dev_warn(ring->mbox->dev, - "null msg pointer for completion desc=0x%lx", - (unsigned long)desc); + "ring%d null msg pointer for completion desc=0x%lx\n", + ring->num, (unsigned long)desc); continue; } @@ -1238,7 +1238,9 @@ static int flexrm_startup(struct mbox_chan *chan) ring->bd_base = dma_pool_alloc(ring->mbox->bd_pool, GFP_KERNEL, &ring->bd_dma_base); if (!ring->bd_base) { - dev_err(ring->mbox->dev, "can't allocate BD memory\n"); + dev_err(ring->mbox->dev, + "can't allocate BD memory for ring%d\n", + ring->num); ret = -ENOMEM; goto fail; } @@ -1261,7 +1263,9 @@ static int flexrm_startup(struct mbox_chan *chan) ring->cmpl_base = dma_pool_alloc(ring->mbox->cmpl_pool, GFP_KERNEL, &ring->cmpl_dma_base); if (!ring->cmpl_base) { - dev_err(ring->mbox->dev, "can't allocate completion memory\n"); + dev_err(ring->mbox->dev, + "can't allocate completion memory for ring%d\n", + ring->num); ret = -ENOMEM; goto fail_free_bd_memory; } @@ -1269,7 +1273,8 @@ static int flexrm_startup(struct mbox_chan *chan) /* Request IRQ */ if (ring->irq == UINT_MAX) { - dev_err(ring->mbox->dev, "ring IRQ not available\n"); + dev_err(ring->mbox->dev, + "ring%d IRQ not available\n", ring->num); ret = -ENODEV; goto fail_free_cmpl_memory; } @@ -1278,7 +1283,8 @@ static int flexrm_startup(struct mbox_chan *chan) flexrm_irq_thread, 0, dev_name(ring->mbox->dev), ring); if (ret) { - dev_err(ring->mbox->dev, "failed to request ring IRQ\n"); + dev_err(ring->mbox->dev, + "failed to request ring%d IRQ\n", ring->num); goto fail_free_cmpl_memory; } ring->irq_requested = true; @@ -1291,7 +1297,9 @@ static int flexrm_startup(struct mbox_chan *chan) &ring->irq_aff_hint); ret = irq_set_affinity_hint(ring->irq, &ring->irq_aff_hint); if (ret) { - dev_err(ring->mbox->dev, "failed to set IRQ affinity hint\n"); + dev_err(ring->mbox->dev, + "failed to set IRQ affinity hint for ring%d\n", + ring->num); goto fail_free_irq; }