From patchwork Wed Apr 6 02:25:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8757691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83C78C0553 for ; Wed, 6 Apr 2016 02:35:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C2B0202F2 for ; Wed, 6 Apr 2016 02:35:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C285420295 for ; Wed, 6 Apr 2016 02:35:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1andHS-0004WH-50; Wed, 06 Apr 2016 02:33:18 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1andD7-0007jZ-KT for linux-arm-kernel@lists.infradead.org; Wed, 06 Apr 2016 02:28:51 +0000 Received: by mail-pa0-x235.google.com with SMTP id bx7so6610507pad.3 for ; Tue, 05 Apr 2016 19:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DaTJUNQ2oSV+Tvkluyp33rZxh2S0W7nubPt/qOkV084=; b=KZM1OpgAFq+eRCBGV7N+kP/1VWw3ky9aC9Y3Le6ompwHzM/vKAcf8pjOOzNTUYuQa6 rEOhLr+ISFiqT697mpSwpMF+TpvSrwzmYa79snE+47fWzib/UJSp5iU1fjEx/F6EYMF3 PbOGQ7dbwFgCqDdfhaNHzUh2weqQPHNTOy3GQFGteev/nlGmcwyPlbnLqk9FFRnWCgZ6 MRm/g+Ki3d+3BKM28SONYcpJQ1ES8wR7Au9ot9nSaa4pnUsNArJeB5ltu6WeIoiOhtdC t4hPkESk/xvr0JfUxiC7SMQ1mgk1FrJF+R8V42ABH7TXo+mJCEPI1bJzKwSCltL0PeBq eeIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DaTJUNQ2oSV+Tvkluyp33rZxh2S0W7nubPt/qOkV084=; b=jYWebmHSUuxLUnYMyAqljZPs9lcWd2To4ooyKZ/UkKddB09tejCBY/MMOPogDuviRO /879IqnLHrsEdXhEuCfw0d+4P1YEenC2ovMw139dQPzDEBn5duxwfn+8BQd6SREhszIe hqf8ewzVAY2iCTJfg4pin7tJfmCGvxAFEo/TIwY+HEFZlmQeaigfXWi5zKgMEqNrE+YI GhBXCMWqcGFyHQkLbCeM14QSgwkwgFmEWLqEkxak6COXbakILiFrIX/5H8crL9l/+jOp jkQbydmoPH4Qe17LonJxJ4i1RM7+CkOnVKuDYVpXYj5vT9VB5zngYpBK6qCkL1zsFUiU wWMw== X-Gm-Message-State: AD7BkJJcwOxWF+ng6f2foeaYQmIGHadllzXLhHNF4cSoA7uj2rNNLcwl3YmfdAxNe3Ay4A== X-Received: by 10.66.139.199 with SMTP id ra7mr67362150pab.74.1459909708877; Tue, 05 Apr 2016 19:28:28 -0700 (PDT) Received: from localhost.localdomain (wsip-70-184-93-199.ph.ph.cox.net. [70.184.93.199]) by smtp.googlemail.com with ESMTPSA id l14sm528682pfi.23.2016.04.05.19.28.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2016 19:28:28 -0700 (PDT) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, fugang.duan@nxp.com, lznuaa@gmail.com Subject: [PATCH net-next V3 12/16] net: fec: dump all tx queues in fec_dump Date: Tue, 5 Apr 2016 19:25:58 -0700 Message-Id: <1459909562-22865-13-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459909562-22865-1-git-send-email-troy.kisky@boundarydevices.com> References: <1459909562-22865-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160405_192850_020364_A18D7B7C X-CRM114-Status: GOOD ( 12.16 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andrew@lunn.ch, stillcompiling@gmail.com, arnd@arndb.de, sergei.shtylyov@cogentembedded.com, Troy Kisky , gerg@uclinux.org, fabio.estevam@nxp.com, johannes@sipsolutions.net, l.stach@pengutronix.de, linux-arm-kernel@lists.infradead.org, tremyfr@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Dump all tx queues, not just queue 0. Also, disable fec interrupts first. The interrupts will be reenabled in fec_restart. Signed-off-by: Troy Kisky --- v3: no change --- drivers/net/ethernet/freescale/fec_main.c | 40 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index f96ea97..be875fd 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -271,28 +271,32 @@ static void swap_buffer2(void *dst_buf, void *src_buf, int len) static void fec_dump(struct net_device *ndev) { struct fec_enet_private *fep = netdev_priv(ndev); - struct bufdesc *bdp; - struct fec_enet_priv_tx_q *txq; - int index = 0; + int i; + /* Disable all FEC interrupts */ + writel(0, fep->hwp + FEC_IMASK); netdev_info(ndev, "TX ring dump\n"); pr_info("Nr SC addr len SKB\n"); - txq = fep->tx_queue[0]; - bdp = txq->bd.base; - - do { - pr_info("%3u %c%c 0x%04x 0x%08x %4u %p\n", - index, - bdp == txq->bd.cur ? 'S' : ' ', - bdp == txq->dirty_tx ? 'H' : ' ', - fec16_to_cpu(bdp->cbd_sc), - fec32_to_cpu(bdp->cbd_bufaddr), - fec16_to_cpu(bdp->cbd_datlen), - txq->tx_skbuff[index]); - bdp = fec_enet_get_nextdesc(bdp, &txq->bd); - index++; - } while (bdp != txq->bd.base); + for (i = 0; i < fep->num_tx_queues; i++) { + struct fec_enet_priv_tx_q *txq = fep->tx_queue[i]; + struct bufdesc *bdp = txq->bd.base; + int index = 0; + + pr_info("tx queue %d\n", i); + do { + pr_info("%3u %c%c 0x%04x 0x%08x %4u %p\n", + index, + bdp == txq->bd.cur ? 'S' : ' ', + bdp == txq->dirty_tx ? 'H' : ' ', + fec16_to_cpu(bdp->cbd_sc), + fec32_to_cpu(bdp->cbd_bufaddr), + fec16_to_cpu(bdp->cbd_datlen), + txq->tx_skbuff[index]); + bdp = fec_enet_get_nextdesc(bdp, &txq->bd); + index++; + } while (bdp != txq->bd.base); + } } static inline bool is_ipv4_pkt(struct sk_buff *skb)