>From 00285a7d6308c9b22dc9ecd4da62ee4f33d88e26 Mon Sep 17 00:00:00 2001 Message-Id: <00285a7d6308c9b22dc9ecd4da62ee4f33d88e26.1338026442.git.romieu@fr.zoreil.com> In-Reply-To: <01e33a3f6c46db63ba90f1db3b99eaf62c7071d1.1338026442.git.romieu@fr.zoreil.com> References: <01e33a3f6c46db63ba90f1db3b99eaf62c7071d1.1338026442.git.romieu@fr.zoreil.com> From: Francois Romieu Date: Sat, 26 May 2012 11:59:33 +0200 Subject: [PATCH 6/6] r8169: print some device queue information. X-Organisation: Land of Sunshine Inc. Signed-off-by: Francois Romieu --- drivers/net/ethernet/realtek/r8169.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 834ff62..3450248 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -5483,6 +5483,28 @@ static void rtl_print_ring(struct rtl8169_private *tp) } } +static void rtl_print_queue(struct rtl8169_private *tp) +{ + struct net_device *dev = tp->dev; + struct netdev_queue *nq = netdev_get_tx_queue(dev, 0); + struct dql *dql = &nq->dql; + + netif_info(tp, drv, dev, "Device queue: avail=%d\n", dql_avail(dql)); + netif_info(tp, drv, dev, " num_queued=%d\n", dql->num_queued); + netif_info(tp, drv, dev, " adj_limit=%d\n", dql->adj_limit); + netif_info(tp, drv, dev, " last_obj_cnt=%d\n", dql->last_obj_cnt); + netif_info(tp, drv, dev, " limit=%d\n", dql->limit); + netif_info(tp, drv, dev, " num_completed=%d\n", dql->num_completed); + netif_info(tp, drv, dev, " prev_ovlimit=%d\n", dql->prev_ovlimit); + netif_info(tp, drv, dev, " prev_num_queued=%d\n", dql->prev_num_queued); + netif_info(tp, drv, dev, " prev_last_obj_cnt=%d\n", dql->prev_last_obj_cnt); + netif_info(tp, drv, dev, " lowest_slack=%d\n", dql->lowest_slack); + netif_info(tp, drv, dev, " slack_start_time=%ld\n", dql->slack_start_time); + netif_info(tp, drv, dev, " max_limit=%d\n", dql->max_limit); + netif_info(tp, drv, dev, " min_limit=%d\n", dql->min_limit); + netif_info(tp, drv, dev, " slack_hold_time=%d\n", dql->slack_hold_time); +} + static void rtl_reset_work(struct rtl8169_private *tp) { struct net_device *dev = tp->dev; @@ -5493,6 +5515,7 @@ static void rtl_reset_work(struct rtl8169_private *tp) synchronize_sched(); rtl_print_ring(tp); + rtl_print_queue(tp); rtl8169_hw_reset(tp); -- 1.7.7.6