From patchwork Thu Jan 28 21:25:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8154181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 99BA89F9A0 for ; Thu, 28 Jan 2016 21:41:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4169201C8 for ; Thu, 28 Jan 2016 21:41:07 +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 DBB5B201C0 for ; Thu, 28 Jan 2016 21:41:06 +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 1aOuI4-0000qg-Iz; Thu, 28 Jan 2016 21:39:44 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOu7f-0005xG-C1 for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2016 21:29:04 +0000 Received: by mail-pa0-x233.google.com with SMTP id uo6so29720855pac.1 for ; Thu, 28 Jan 2016 13:28:40 -0800 (PST) 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=B5Phht2sIJwYJzcubViHj05Vf6r+icK0D401SCrfG1w=; b=fqgxiPj4cVg9ZrWigShUH8JueKX6saxRAwsZmvawmEi7bTJ2teYryqkMHJxTETaSXn Ew5vNy+65q3F6bAPamg5FRvHArXx32K+HP8kAWzXbkpMwrdnz1DNZ5JRBOvHYAhpORVi 5tUCxe5pcEQsYGvpuyWPNV+qaNBx/PIURhLqYoGzG16KrWseOzOsiuhpZ/ae2RSbw6n/ 3ZsG8H1yfBe8zvrXZMeBovGjxBBMn4J+r8kYVuTEWLnYHuMJtWSBgQYTvrDLc9ZzYJM5 GML/zyeU2woucp5JklIhs0Jipvl0StSvFLpL1IQ0p4JYSksiH46b6NJq9CiTvuwCAMAK Ft1A== 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=B5Phht2sIJwYJzcubViHj05Vf6r+icK0D401SCrfG1w=; b=GyKGwuzwFyEpc2m3BthczyU1WY881HKl3TkFZpZnYAR6KrBlO7fVPIranuRxmqMiZr RqtvHuIQ2opDkvuyJudqrFC59PYVlUSlow62PT0kw0hOu0yvNKwOouBO5LWj2f1FJGKh nQfaTGq+WvHsgS/5eqKqbA5jRmDQH+yrq40M49VAUQQrVelVN+QjCPQD5zguo0NFgJ8E AdmG3K9dV6BXDM2/fcQ9039Leef5gKNeArEZSe14yNCnlYdaa5ULDkASJogA45OBO+x/ EKdo3O5sUxaumhJJbuU2oXnLFN72BZ7OLdg08Kh3iAAZVY19EDfA3ubMfEzoP9DJBpnV m31Q== X-Gm-Message-State: AG10YOSTLijte5Um3EIFapJ5CJbFBHBSwUQ1BqpfYtuO7wUDQ2+FAJdRHtYH5Qz7ztJNBA== X-Received: by 10.66.184.15 with SMTP id eq15mr7958741pac.42.1454016520242; Thu, 28 Jan 2016 13:28:40 -0800 (PST) Received: from localhost.localdomain (wsip-70-184-93-199.ph.ph.cox.net. [70.184.93.199]) by smtp.googlemail.com with ESMTPSA id c90sm18583190pfd.31.2016.01.28.13.28.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 13:28:39 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next 19/40] net: fec: dump all tx queues in fec_dump Date: Thu, 28 Jan 2016 14:25:43 -0700 Message-Id: <1454016364-30985-20-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> References: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_132859_812205_E40F71A2 X-CRM114-Status: GOOD ( 11.77 ) 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: fabio.estevam@freescale.com, andrew@lunn.ch, linux@arm.linux.org.uk, Troy Kisky , laci@boundarydevices.com, l.stach@pengutronix.de, shawnguo@kernel.org, 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=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 --- drivers/net/ethernet/freescale/fec_main.c | 36 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 1759705..1225282 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -271,26 +271,30 @@ 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%08lx %4u %p\n", - index, - bdp == txq->bd.cur ? 'S' : ' ', - bdp == txq->dirty_tx ? 'H' : ' ', - bdp->cbd_sc, bdp->cbd_bufaddr, 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%08lx %4u %p\n", + index, + bdp == txq->bd.cur ? 'S' : ' ', + bdp == txq->dirty_tx ? 'H' : ' ', + bdp->cbd_sc, bdp->cbd_bufaddr, 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)