mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Jiahao <chenjiahao16@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>,
	<grygorii.strashko@ti.com>, <jesse.brandeburg@intel.com>,
	<vigneshr@ti.com>, <peter.ujfalusi@ti.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <chenjiahao16@huawei.com>, <heying24@huawei.com>
Subject: [PATCH] net: ethernet: ti: fix netdev_queue compiling error
Date: Thu, 17 Jun 2021 19:28:38 +0800	[thread overview]
Message-ID: <20210617112838.143314-1-chenjiahao16@huawei.com> (raw)

There is a compiling error in am65-cpsw-nuss.c while not selecting
CONFIG_BQL:

drivers/net/ethernet/ti/am65-cpsw-nuss.c: In function
‘am65_cpsw_nuss_ndo_host_tx_timeout’:
drivers/net/ethernet/ti/am65-cpsw-nuss.c:353:26: error:
‘struct netdev_queue’ has no member named ‘dql’
  353 |      dql_avail(&netif_txq->dql),
      |                          ^~

This problem is solved by adding the #ifdef CONFIG_BQL directive
where struct dql is used.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 6a67b026df0b..a0b30bb763ea 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -346,12 +346,20 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev,
 	tx_chn = &common->tx_chns[txqueue];
 	trans_start = netif_txq->trans_start;
 
+#ifdef CONFIG_BQL
 	netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u dql_avail:%d free_desc:%zu\n",
 		   txqueue,
 		   netif_tx_queue_stopped(netif_txq),
 		   jiffies_to_msecs(jiffies - trans_start),
 		   dql_avail(&netif_txq->dql),
 		   k3_cppi_desc_pool_avail(tx_chn->desc_pool));
+#else
+	netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u free_desc:%zu\n",
+		   txqueue,
+		   netif_tx_queue_stopped(netif_txq),
+		   jiffies_to_msecs(jiffies - trans_start),
+		   k3_cppi_desc_pool_avail(tx_chn->desc_pool));
+#endif
 
 	if (netif_tx_queue_stopped(netif_txq)) {
 		/* try recover if stopped by us */
-- 
2.31.1


             reply	other threads:[~2021-06-17 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 11:28 Chen Jiahao [this message]
2021-06-18 10:40 ` Grygorii Strashko
2021-06-21  8:18   ` chenjiahao (C)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210617112838.143314-1-chenjiahao16@huawei.com \
    --to=chenjiahao16@huawei.com \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=heying24@huawei.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®