From patchwork Thu Feb 25 00:36:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8415571 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 6A806C0553 for ; Thu, 25 Feb 2016 00:47:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83EE22010C for ; Thu, 25 Feb 2016 00:47:58 +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 9D74D20108 for ; Thu, 25 Feb 2016 00:47:57 +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 1aYk3O-0003G8-S9; Thu, 25 Feb 2016 00:45:14 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYjz9-00081A-Ve for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2016 00:40:52 +0000 Received: by mail-pa0-x22c.google.com with SMTP id yy13so21741432pab.3 for ; Wed, 24 Feb 2016 16:40:31 -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=SjEFi3S84Zow5Kh6a1iMX4vtudc4lKRnqOVY78X/eAc=; b=i0vG/QuMk5yLhlzVAs7FDvja7PXA5o09K7xOhVVVojJNAdzK1bbzY1LX4IC5lOQCBI DZED8405WPyspJGWMSbxWGsHQ2d17icqOyOyiVmFS7L3V16DGbDyojMlYMXNE6uz42/P PfkEuOsymPtyfgKp2RQQuZl9Myq/8FtcfUB0tLcUA3N++BboMaM1vsnvaMtFSQwEjUe/ 9LoKzDuHRLHmiQN/CqDmdeWWS0kAIatfTnPaiuXj0FKaaC5VNhwZ8DB2smT/VeoqgpCM ogLXBj32RZC/Fzu46CsbxEL0CzeSR0/YZ5ZiDJt/eKd3szDDPBSzS5fhmS6BTyp5C/eO ygxg== 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=SjEFi3S84Zow5Kh6a1iMX4vtudc4lKRnqOVY78X/eAc=; b=myLy9KeVL7GPcpmDlGW0PmS8F2qk5vYLIRqpbifj77Azh2ZHk8l+YltlJ4EvgKwmqF WuqWiCfy078981Zld1ooB/RL0I+/SZFIBgSY7DtCC1IG48DkSVJYbrJjBUNemdycLZ6e /ELLG0snZIX+RDhGeyjq2F/huXjzwr3oVINp76KzS6qD5DxYYNLolSKirXA/j9Fd36U3 Sw0pafYbdrodHa2RAOsOG9/oeNbGd7Nivss4EqhUYUBJEPTUAYGEWOWfU3hsYh1CHiQB h+O6FGZZHZPCyMoyVecF6yEADoERXDfzQ4AvA2GNgbGyW5JCxkQYeNsDO7f4uS9YQQNH NKIw== X-Gm-Message-State: AG10YOTZ0EMcvC3KNwDW1DfALY0PvEx9jX9SOAj/ORuWdxvKBMQa2+YhysTGJbmLBlFKnQ== X-Received: by 10.66.119.71 with SMTP id ks7mr59551038pab.151.1456360831336; Wed, 24 Feb 2016 16:40:31 -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 79sm7561982pfr.22.2016.02.24.16.40.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Feb 2016 16:40:30 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next V2 11/16] net: fec: dump all tx queues in fec_dump Date: Wed, 24 Feb 2016 17:36:54 -0700 Message-Id: <1456360619-24390-12-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> References: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160224_164052_149602_E380E7DF X-CRM114-Status: GOOD ( 12.52 ) 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, stillcompiling@gmail.com, linux@arm.linux.org.uk, arnd@arndb.de, sergei.shtylyov@cogentembedded.com, Troy Kisky , laci@boundarydevices.com, johannes@sipsolutions.net, 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=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 --- 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 96a0394..9b24669 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)